blob: 9970a0dc0fd31e794dc4b578423f7c72469dd9b6 [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#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
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 Pantereac67be2016-07-28 01:28:27 +0000743PGEN_DEPENDENCY
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
Martin Panter1046d5c2016-04-23 00:58:44 +0000754cross_compiling
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500755HAS_HG
756HGBRANCH
757HGTAG
758HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400759BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000760target_alias
761host_alias
762build_alias
763LIBS
764ECHO_T
765ECHO_N
766ECHO_C
767DEFS
768mandir
769localedir
770libdir
771psdir
772pdfdir
773dvidir
774htmldir
775infodir
776docdir
777oldincludedir
778includedir
779localstatedir
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'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889includedir='${prefix}/include'
890oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
892infodir='${datarootdir}/info'
893htmldir='${docdir}'
894dvidir='${docdir}'
895pdfdir='${docdir}'
896psdir='${docdir}'
897libdir='${exec_prefix}/lib'
898localedir='${datarootdir}/locale'
899mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000900
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000902ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 # If the previous option needs an argument, assign it.
906 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000907 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908 ac_prev=
909 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000910 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200913 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
914 *=) ac_optarg= ;;
915 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000917
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000918 # Accept the important Cygnus configure options, so we can diagnose typos.
919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 case $ac_dashdash$ac_option in
921 --)
922 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924 -bindir | --bindir | --bindi | --bind | --bin | --bi)
925 ac_prev=bindir ;;
926 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000927 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928
929 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 -cache-file | --cache-file | --cache-fil | --cache-fi \
935 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
936 ac_prev=cache_file ;;
937 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
938 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 cache_file=$ac_optarg ;;
940
941 --config-cache | -C)
942 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000943
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000944 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000945 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000947 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000948
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000949 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
950 | --dataroo | --dataro | --datar)
951 ac_prev=datarootdir ;;
952 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
953 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
954 datarootdir=$ac_optarg ;;
955
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200960 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt_orig=$ac_useropt
962 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
963 case $ac_user_opts in
964 *"
965"enable_$ac_useropt"
966"*) ;;
967 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
968 ac_unrecognized_sep=', ';;
969 esac
970 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000971
972 -docdir | --docdir | --docdi | --doc | --do)
973 ac_prev=docdir ;;
974 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
975 docdir=$ac_optarg ;;
976
977 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
978 ac_prev=dvidir ;;
979 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
980 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000981
982 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000983 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000985 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200986 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt_orig=$ac_useropt
988 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
989 case $ac_user_opts in
990 *"
991"enable_$ac_useropt"
992"*) ;;
993 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
994 ac_unrecognized_sep=', ';;
995 esac
996 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
999 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1000 | --exec | --exe | --ex)
1001 ac_prev=exec_prefix ;;
1002 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1003 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1004 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006
1007 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001008 # Obsolete; use --with-gas.
1009 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
Martin v. Löwis11437992002-04-12 09:54:03 +00001011 -help | --help | --hel | --he | -h)
1012 ac_init_help=long ;;
1013 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1014 ac_init_help=recursive ;;
1015 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1016 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017
1018 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001023 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1024 ac_prev=htmldir ;;
1025 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1026 | --ht=*)
1027 htmldir=$ac_optarg ;;
1028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -includedir | --includedir | --includedi | --included | --include \
1030 | --includ | --inclu | --incl | --inc)
1031 ac_prev=includedir ;;
1032 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1033 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001034 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035
1036 -infodir | --infodir | --infodi | --infod | --info | --inf)
1037 ac_prev=infodir ;;
1038 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -libdir | --libdir | --libdi | --libd)
1042 ac_prev=libdir ;;
1043 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1047 | --libexe | --libex | --libe)
1048 ac_prev=libexecdir ;;
1049 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1050 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001053 -localedir | --localedir | --localedi | --localed | --locale)
1054 ac_prev=localedir ;;
1055 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1056 localedir=$ac_optarg ;;
1057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001059 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 ac_prev=localstatedir ;;
1061 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001062 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
1065 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1066 ac_prev=mandir ;;
1067 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001069
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 # Obsolete; use --without-fp.
1072 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
1074 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076 no_create=yes ;;
1077
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001078 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1079 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1080 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001082 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1083 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1084 | --oldin | --oldi | --old | --ol | --o)
1085 ac_prev=oldincludedir ;;
1086 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1087 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1088 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001089 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001090
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1092 ac_prev=prefix ;;
1093 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1097 | --program-pre | --program-pr | --program-p)
1098 ac_prev=program_prefix ;;
1099 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1100 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1104 | --program-suf | --program-su | --program-s)
1105 ac_prev=program_suffix ;;
1106 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1107 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001109
1110 -program-transform-name | --program-transform-name \
1111 | --program-transform-nam | --program-transform-na \
1112 | --program-transform-n | --program-transform- \
1113 | --program-transform | --program-transfor \
1114 | --program-transfo | --program-transf \
1115 | --program-trans | --program-tran \
1116 | --progr-tra | --program-tr | --program-t)
1117 ac_prev=program_transform_name ;;
1118 -program-transform-name=* | --program-transform-name=* \
1119 | --program-transform-nam=* | --program-transform-na=* \
1120 | --program-transform-n=* | --program-transform-=* \
1121 | --program-transform=* | --program-transfor=* \
1122 | --program-transfo=* | --program-transf=* \
1123 | --program-trans=* | --program-tran=* \
1124 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001127 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1128 ac_prev=pdfdir ;;
1129 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1130 pdfdir=$ac_optarg ;;
1131
1132 -psdir | --psdir | --psdi | --psd | --ps)
1133 ac_prev=psdir ;;
1134 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1135 psdir=$ac_optarg ;;
1136
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1138 | -silent | --silent | --silen | --sile | --sil)
1139 silent=yes ;;
1140
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1142 ac_prev=sbindir ;;
1143 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1144 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146
1147 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1148 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1149 | --sharedst | --shareds | --shared | --share | --shar \
1150 | --sha | --sh)
1151 ac_prev=sharedstatedir ;;
1152 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1153 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1154 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1155 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 -site | --site | --sit)
1159 ac_prev=site ;;
1160 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001162
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1164 ac_prev=srcdir ;;
1165 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1169 | --syscon | --sysco | --sysc | --sys | --sy)
1170 ac_prev=sysconfdir ;;
1171 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1172 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1181 verbose=yes ;;
1182
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 -version | --version | --versio | --versi | --vers | -V)
1184 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001187 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001190 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 ac_useropt_orig=$ac_useropt
1192 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1193 case $ac_user_opts in
1194 *"
1195"with_$ac_useropt"
1196"*) ;;
1197 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1198 ac_unrecognized_sep=', ';;
1199 esac
1200 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
1202 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001203 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001206 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 ac_useropt_orig=$ac_useropt
1208 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209 case $ac_user_opts in
1210 *"
1211"with_$ac_useropt"
1212"*) ;;
1213 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1214 ac_unrecognized_sep=', ';;
1215 esac
1216 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 --x)
1219 # Obsolete; use --with-x.
1220 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1223 | --x-incl | --x-inc | --x-in | --x-i)
1224 ac_prev=x_includes ;;
1225 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1226 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
1229 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1230 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1231 ac_prev=x_libraries ;;
1232 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1233 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001236 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1237Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 ;;
1239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 *=*)
1241 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1242 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001243 case $ac_envvar in #(
1244 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001246 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001247 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 export $ac_envvar ;;
1249
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001250 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001252 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001255 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
1258 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259done
1260
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001263 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264fi
1265
Matthias Kloseb9621712010-04-24 17:59:49 +00001266if test -n "$ac_unrecognized_opts"; then
1267 case $enable_option_checking in
1268 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001269 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001270 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1271 esac
1272fi
1273
1274# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1276 datadir sysconfdir sharedstatedir localstatedir includedir \
1277 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Xavier de Gayefd0d5932016-07-26 12:48:08 +02001278 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001280 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001281 # Remove trailing slashes.
1282 case $ac_val in
1283 */ )
1284 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1285 eval $ac_var=\$ac_val;;
1286 esac
1287 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289 [\\/$]* | ?:[\\/]* ) continue;;
1290 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001293done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294
Martin v. Löwis11437992002-04-12 09:54:03 +00001295# There might be people who depend on the old broken behavior: `$host'
1296# used to hold the argument of --host etc.
1297# FIXME: To remove some day.
1298build=$build_alias
1299host=$host_alias
1300target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302# FIXME: To remove some day.
1303if test "x$host_alias" != x; then
1304 if test "x$build_alias" = x; then
1305 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 elif test "x$build_alias" != "x$host_alias"; then
1307 cross_compiling=yes
1308 fi
1309fi
1310
1311ac_tool_prefix=
1312test -n "$host_alias" && ac_tool_prefix=$host_alias-
1313
1314test "$silent" = yes && exec 6>/dev/null
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001317ac_pwd=`pwd` && test -n "$ac_pwd" &&
1318ac_ls_di=`ls -di .` &&
1319ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001320 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001322 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325# Find the source files, if location was not specified.
1326if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001329 ac_confdir=`$as_dirname -- "$as_myself" ||
1330$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1331 X"$as_myself" : 'X\(//\)[^/]' \| \
1332 X"$as_myself" : 'X\(//\)$' \| \
1333 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1334$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1336 s//\1/
1337 q
1338 }
1339 /^X\(\/\/\)[^/].*/{
1340 s//\1/
1341 q
1342 }
1343 /^X\(\/\/\)$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\).*/{
1348 s//\1/
1349 q
1350 }
1351 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001352 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001353 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354 srcdir=..
1355 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356else
1357 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001359if test ! -r "$srcdir/$ac_unique_file"; then
1360 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001361 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1364ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001365 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366 pwd)`
1367# When building in place, set srcdir=.
1368if test "$ac_abs_confdir" = "$ac_pwd"; then
1369 srcdir=.
1370fi
1371# Remove unnecessary trailing slashes from srcdir.
1372# Double slashes in file names in object file debugging info
1373# mess up M-x gdb in Emacs.
1374case $srcdir in
1375*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1376esac
1377for ac_var in $ac_precious_vars; do
1378 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1379 eval ac_env_${ac_var}_value=\$${ac_var}
1380 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1381 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1382done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001383
Martin v. Löwis11437992002-04-12 09:54:03 +00001384#
1385# Report the --help message.
1386#
1387if test "$ac_init_help" = "long"; then
1388 # Omit some internal or obsolete options to make the list less imposing.
1389 # This message is too long to be a string in the A/UX 3.1 sh.
1390 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001391\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393Usage: $0 [OPTION]... [VAR=VALUE]...
1394
1395To assign environment variables (e.g., CC, CFLAGS...), specify them as
1396VAR=VALUE. See below for descriptions of some of the useful variables.
1397
1398Defaults for the options are specified in brackets.
1399
1400Configuration:
1401 -h, --help display this help and exit
1402 --help=short display options specific to this package
1403 --help=recursive display the short help of all the included packages
1404 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001405 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 --cache-file=FILE cache test results in FILE [disabled]
1407 -C, --config-cache alias for \`--cache-file=config.cache'
1408 -n, --no-create do not create output files
1409 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1410
Martin v. Löwis11437992002-04-12 09:54:03 +00001411Installation directories:
1412 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001413 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001415 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001416
1417By default, \`make install' will install all the files in
1418\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1419an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1420for instance \`--prefix=\$HOME'.
1421
1422For better control, use the options below.
1423
1424Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 --bindir=DIR user executables [EPREFIX/bin]
1426 --sbindir=DIR system admin executables [EPREFIX/sbin]
1427 --libexecdir=DIR program executables [EPREFIX/libexec]
1428 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1429 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1430 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1431 --libdir=DIR object code libraries [EPREFIX/lib]
1432 --includedir=DIR C header files [PREFIX/include]
1433 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1434 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1435 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1436 --infodir=DIR info documentation [DATAROOTDIR/info]
1437 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1438 --mandir=DIR man documentation [DATAROOTDIR/man]
1439 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1440 --htmldir=DIR html documentation [DOCDIR]
1441 --dvidir=DIR dvi documentation [DOCDIR]
1442 --pdfdir=DIR pdf documentation [DOCDIR]
1443 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001444_ACEOF
1445
1446 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001447
1448System types:
1449 --build=BUILD configure for building on BUILD [guessed]
1450 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001451_ACEOF
1452fi
1453
1454if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001455 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001456 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001457 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001458 cat <<\_ACEOF
1459
1460Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001461 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001462 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1463 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001464 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001465 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --enable-framework[=INSTALLDIR]
1467 Build (MacOSX|Darwin) framework
1468 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001469 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001470 --enable-loadable-sqlite-extensions
1471 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --enable-ipv6 Enable ipv6 (with ipv4) support
1473 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001474 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001476
1477Optional Packages:
1478 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1479 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001480 --with-universal-archs=ARCH
1481 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001482 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001483 --with-framework-name=FRAMEWORK
1484 specify an alternate name of the framework built
1485 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001487 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001488 --with-cxx-main=<compiler>
1489 compile main() and link python executable with C++
1490 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --with-suffix=.exe set executable suffix
1492 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001493 --with-lto Enable Link Time Optimization in PGO builds.
1494 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001495 --with-hash-algorithm=[fnv|siphash24]
1496 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001497 --with-address-sanitizer
1498 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001500 --with-system-expat build pyexpat module using an installed expat
1501 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001502 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001503 --with-system-libmpdec build _decimal module using an installed libmpdec
1504 library
Ned Deilyd819b932013-09-06 01:07:05 -07001505 --with-tcltk-includes='-I...'
1506 override search for Tcl and Tk include files
1507 --with-tcltk-libs='-L...'
1508 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001509 --with-dbmliborder=db1:db2:...
1510 order to check db backends for dbm. Valid value is a
1511 colon separated string with the backend names
1512 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with(out)-threads[=DIRECTORY]
1515 disable/enable thread support
1516 --with(out)-thread[=DIRECTORY]
1517 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001519 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001521 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001522 --with-fpectl enable SIGFPE catching
1523 --with-libm=STRING math library
1524 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001525 --with(out)-computed-gotos
1526 Use computed gotos in evaluation loop (enabled by
1527 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001528 --with(out)-ensurepip=[=upgrade]
1529 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001530
1531Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001532 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 CC C compiler command
1534 CFLAGS C compiler flags
1535 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1536 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001537 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001538 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001539 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001540 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001541 PKG_CONFIG path to pkg-config utility
1542 PKG_CONFIG_PATH
1543 directories to add to pkg-config's search path
1544 PKG_CONFIG_LIBDIR
1545 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
1547Use these variables to override the choices made by `configure' or to help
1548it to find libraries and programs with nonstandard names/locations.
1549
Georg Brandle2e15612009-05-20 18:25:10 +00001550Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001551_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001552ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001553fi
1554
1555if test "$ac_init_help" = "recursive"; then
1556 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001557 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001558 test -d "$ac_dir" ||
1559 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1560 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 ac_builddir=.
1562
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563case "$ac_dir" in
1564.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1565*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001566 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001568 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 case $ac_top_builddir_sub in
1570 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1571 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1572 esac ;;
1573esac
1574ac_abs_top_builddir=$ac_pwd
1575ac_abs_builddir=$ac_pwd$ac_dir_suffix
1576# for backward compatibility:
1577ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001578
1579case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001581 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 ac_top_srcdir=$ac_top_builddir_sub
1583 ac_abs_top_srcdir=$ac_pwd ;;
1584 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 ac_top_srcdir=$srcdir
1587 ac_abs_top_srcdir=$srcdir ;;
1588 *) # Relative name.
1589 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1590 ac_top_srcdir=$ac_top_build_prefix$srcdir
1591 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001592esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001595 cd "$ac_dir" || { ac_status=$?; continue; }
1596 # Check for guested configure.
1597 if test -f "$ac_srcdir/configure.gnu"; then
1598 echo &&
1599 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1600 elif test -f "$ac_srcdir/configure"; then
1601 echo &&
1602 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001604 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001605 fi || ac_status=$?
1606 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 done
1608fi
1609
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001610test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001611if $ac_init_version; then
1612 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001613python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001614generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001615
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001616Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001617This configure script is free software; the Free Software Foundation
1618gives unlimited permission to copy, distribute and modify it.
1619_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001620 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001621fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001622
1623## ------------------------ ##
1624## Autoconf initialization. ##
1625## ------------------------ ##
1626
1627# ac_fn_c_try_compile LINENO
1628# --------------------------
1629# Try to compile conftest.$ac_ext, and return whether this succeeded.
1630ac_fn_c_try_compile ()
1631{
1632 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1633 rm -f conftest.$ac_objext
1634 if { { ac_try="$ac_compile"
1635case "(($ac_try" in
1636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1637 *) ac_try_echo=$ac_try;;
1638esac
1639eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1640$as_echo "$ac_try_echo"; } >&5
1641 (eval "$ac_compile") 2>conftest.err
1642 ac_status=$?
1643 if test -s conftest.err; then
1644 grep -v '^ *+' conftest.err >conftest.er1
1645 cat conftest.er1 >&5
1646 mv -f conftest.er1 conftest.err
1647 fi
1648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1649 test $ac_status = 0; } && {
1650 test -z "$ac_c_werror_flag" ||
1651 test ! -s conftest.err
1652 } && test -s conftest.$ac_objext; then :
1653 ac_retval=0
1654else
1655 $as_echo "$as_me: failed program was:" >&5
1656sed 's/^/| /' conftest.$ac_ext >&5
1657
1658 ac_retval=1
1659fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001660 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001661 as_fn_set_status $ac_retval
1662
1663} # ac_fn_c_try_compile
1664
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001665# ac_fn_c_try_cpp LINENO
1666# ----------------------
1667# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1668ac_fn_c_try_cpp ()
1669{
1670 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1671 if { { ac_try="$ac_cpp conftest.$ac_ext"
1672case "(($ac_try" in
1673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1674 *) ac_try_echo=$ac_try;;
1675esac
1676eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1677$as_echo "$ac_try_echo"; } >&5
1678 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1679 ac_status=$?
1680 if test -s conftest.err; then
1681 grep -v '^ *+' conftest.err >conftest.er1
1682 cat conftest.er1 >&5
1683 mv -f conftest.er1 conftest.err
1684 fi
1685 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1686 test $ac_status = 0; } > conftest.i && {
1687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1688 test ! -s conftest.err
1689 }; then :
1690 ac_retval=0
1691else
1692 $as_echo "$as_me: failed program was:" >&5
1693sed 's/^/| /' conftest.$ac_ext >&5
1694
1695 ac_retval=1
1696fi
1697 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1698 as_fn_set_status $ac_retval
1699
1700} # ac_fn_c_try_cpp
1701
Matthias Kloseb9621712010-04-24 17:59:49 +00001702# ac_fn_c_try_link LINENO
1703# -----------------------
1704# Try to link conftest.$ac_ext, and return whether this succeeded.
1705ac_fn_c_try_link ()
1706{
1707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1708 rm -f conftest.$ac_objext conftest$ac_exeext
1709 if { { ac_try="$ac_link"
1710case "(($ac_try" in
1711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1712 *) ac_try_echo=$ac_try;;
1713esac
1714eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1715$as_echo "$ac_try_echo"; } >&5
1716 (eval "$ac_link") 2>conftest.err
1717 ac_status=$?
1718 if test -s conftest.err; then
1719 grep -v '^ *+' conftest.err >conftest.er1
1720 cat conftest.er1 >&5
1721 mv -f conftest.er1 conftest.err
1722 fi
1723 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1724 test $ac_status = 0; } && {
1725 test -z "$ac_c_werror_flag" ||
1726 test ! -s conftest.err
1727 } && test -s conftest$ac_exeext && {
1728 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001729 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001730 }; then :
1731 ac_retval=0
1732else
1733 $as_echo "$as_me: failed program was:" >&5
1734sed 's/^/| /' conftest.$ac_ext >&5
1735
1736 ac_retval=1
1737fi
1738 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1739 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1740 # interfere with the next link command; also delete a directory that is
1741 # left behind by Apple's compiler. We do this before executing the actions.
1742 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001743 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001744 as_fn_set_status $ac_retval
1745
1746} # ac_fn_c_try_link
1747
Matthias Kloseb9621712010-04-24 17:59:49 +00001748# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1749# -------------------------------------------------------
1750# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1751# the include files in INCLUDES and setting the cache variable VAR
1752# accordingly.
1753ac_fn_c_check_header_mongrel ()
1754{
1755 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001756 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1758$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001759if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 $as_echo_n "(cached) " >&6
1761fi
1762eval ac_res=\$$3
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1764$as_echo "$ac_res" >&6; }
1765else
1766 # Is the header compilable?
1767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1768$as_echo_n "checking $2 usability... " >&6; }
1769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1770/* end confdefs.h. */
1771$4
1772#include <$2>
1773_ACEOF
1774if ac_fn_c_try_compile "$LINENO"; then :
1775 ac_header_compiler=yes
1776else
1777 ac_header_compiler=no
1778fi
1779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1781$as_echo "$ac_header_compiler" >&6; }
1782
1783# Is the header present?
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1785$as_echo_n "checking $2 presence... " >&6; }
1786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1787/* end confdefs.h. */
1788#include <$2>
1789_ACEOF
1790if ac_fn_c_try_cpp "$LINENO"; then :
1791 ac_header_preproc=yes
1792else
1793 ac_header_preproc=no
1794fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001795rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1797$as_echo "$ac_header_preproc" >&6; }
1798
1799# So? What about this header?
1800case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1801 yes:no: )
1802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1803$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1805$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1806 ;;
1807 no:yes:* )
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1809$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1811$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1813$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1815$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1817$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001818( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001819## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001820## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001821 ) | sed "s/^/$as_me: WARNING: /" >&2
1822 ;;
1823esac
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1825$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001826if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001827 $as_echo_n "(cached) " >&6
1828else
1829 eval "$3=\$ac_header_compiler"
1830fi
1831eval ac_res=\$$3
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1833$as_echo "$ac_res" >&6; }
1834fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001835 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001836
1837} # ac_fn_c_check_header_mongrel
1838
1839# ac_fn_c_try_run LINENO
1840# ----------------------
1841# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1842# that executables *can* be run.
1843ac_fn_c_try_run ()
1844{
1845 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1846 if { { ac_try="$ac_link"
1847case "(($ac_try" in
1848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1849 *) ac_try_echo=$ac_try;;
1850esac
1851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1852$as_echo "$ac_try_echo"; } >&5
1853 (eval "$ac_link") 2>&5
1854 ac_status=$?
1855 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1856 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1857 { { case "(($ac_try" in
1858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1859 *) ac_try_echo=$ac_try;;
1860esac
1861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1862$as_echo "$ac_try_echo"; } >&5
1863 (eval "$ac_try") 2>&5
1864 ac_status=$?
1865 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1866 test $ac_status = 0; }; }; then :
1867 ac_retval=0
1868else
1869 $as_echo "$as_me: program exited with status $ac_status" >&5
1870 $as_echo "$as_me: failed program was:" >&5
1871sed 's/^/| /' conftest.$ac_ext >&5
1872
1873 ac_retval=$ac_status
1874fi
1875 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001877 as_fn_set_status $ac_retval
1878
1879} # ac_fn_c_try_run
1880
1881# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1882# -------------------------------------------------------
1883# Tests whether HEADER exists and can be compiled using the include files in
1884# INCLUDES, setting the cache variable VAR accordingly.
1885ac_fn_c_check_header_compile ()
1886{
1887 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1889$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001890if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001891 $as_echo_n "(cached) " >&6
1892else
1893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1894/* end confdefs.h. */
1895$4
1896#include <$2>
1897_ACEOF
1898if ac_fn_c_try_compile "$LINENO"; then :
1899 eval "$3=yes"
1900else
1901 eval "$3=no"
1902fi
1903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1904fi
1905eval ac_res=\$$3
1906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1907$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001908 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001909
1910} # ac_fn_c_check_header_compile
1911
Matthias Kloseb9621712010-04-24 17:59:49 +00001912# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1913# -------------------------------------------
1914# Tests whether TYPE exists after having included INCLUDES, setting cache
1915# variable VAR accordingly.
1916ac_fn_c_check_type ()
1917{
1918 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1920$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001921if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001922 $as_echo_n "(cached) " >&6
1923else
1924 eval "$3=no"
1925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1926/* end confdefs.h. */
1927$4
1928int
1929main ()
1930{
1931if (sizeof ($2))
1932 return 0;
1933 ;
1934 return 0;
1935}
1936_ACEOF
1937if ac_fn_c_try_compile "$LINENO"; then :
1938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1939/* end confdefs.h. */
1940$4
1941int
1942main ()
1943{
1944if (sizeof (($2)))
1945 return 0;
1946 ;
1947 return 0;
1948}
1949_ACEOF
1950if ac_fn_c_try_compile "$LINENO"; then :
1951
1952else
1953 eval "$3=yes"
1954fi
1955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1956fi
1957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1958fi
1959eval ac_res=\$$3
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1961$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001962 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001963
1964} # ac_fn_c_check_type
1965
1966# ac_fn_c_find_uintX_t LINENO BITS VAR
1967# ------------------------------------
1968# Finds an unsigned integer type with width BITS, setting cache variable VAR
1969# accordingly.
1970ac_fn_c_find_uintX_t ()
1971{
1972 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1974$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001975if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001976 $as_echo_n "(cached) " >&6
1977else
1978 eval "$3=no"
1979 # Order is important - never check a type that is potentially smaller
1980 # than half of the expected target width.
1981 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1982 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1984/* end confdefs.h. */
1985$ac_includes_default
1986int
1987main ()
1988{
1989static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001990test_array [0] = 0;
1991return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001992
1993 ;
1994 return 0;
1995}
1996_ACEOF
1997if ac_fn_c_try_compile "$LINENO"; then :
1998 case $ac_type in #(
1999 uint$2_t) :
2000 eval "$3=yes" ;; #(
2001 *) :
2002 eval "$3=\$ac_type" ;;
2003esac
2004fi
2005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002006 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008else
2009 break
2010fi
2011 done
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002017
2018} # ac_fn_c_find_uintX_t
2019
2020# ac_fn_c_find_intX_t LINENO BITS VAR
2021# -----------------------------------
2022# Finds a signed integer type with width BITS, setting cache variable VAR
2023# accordingly.
2024ac_fn_c_find_intX_t ()
2025{
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2028$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002029if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002030 $as_echo_n "(cached) " >&6
2031else
2032 eval "$3=no"
2033 # Order is important - never check a type that is potentially smaller
2034 # than half of the expected target width.
2035 for ac_type in int$2_t 'int' 'long int' \
2036 'long long int' 'short int' 'signed char'; do
2037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2038/* end confdefs.h. */
2039$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002040 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002041int
2042main ()
2043{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002044static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002045test_array [0] = 0;
2046return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002047
2048 ;
2049 return 0;
2050}
2051_ACEOF
2052if ac_fn_c_try_compile "$LINENO"; then :
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002056 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002057int
2058main ()
2059{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002060static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002061 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070
2071else
2072 case $ac_type in #(
2073 int$2_t) :
2074 eval "$3=yes" ;; #(
2075 *) :
2076 eval "$3=\$ac_type" ;;
2077esac
2078fi
2079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2080fi
2081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002082 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002083
2084else
2085 break
2086fi
2087 done
2088fi
2089eval ac_res=\$$3
2090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2091$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002092 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002093
2094} # ac_fn_c_find_intX_t
2095
2096# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2097# --------------------------------------------
2098# Tries to find the compile-time value of EXPR in a program that includes
2099# INCLUDES, setting VAR accordingly. Returns whether the value could be
2100# computed
2101ac_fn_c_compute_int ()
2102{
2103 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2104 if test "$cross_compiling" = yes; then
2105 # Depending upon the size, compute the lo and hi bounds.
2106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2107/* end confdefs.h. */
2108$4
2109int
2110main ()
2111{
2112static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002113test_array [0] = 0;
2114return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002115
2116 ;
2117 return 0;
2118}
2119_ACEOF
2120if ac_fn_c_try_compile "$LINENO"; then :
2121 ac_lo=0 ac_mid=0
2122 while :; do
2123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2124/* end confdefs.h. */
2125$4
2126int
2127main ()
2128{
2129static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002130test_array [0] = 0;
2131return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002132
2133 ;
2134 return 0;
2135}
2136_ACEOF
2137if ac_fn_c_try_compile "$LINENO"; then :
2138 ac_hi=$ac_mid; break
2139else
2140 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2141 if test $ac_lo -le $ac_mid; then
2142 ac_lo= ac_hi=
2143 break
2144 fi
2145 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148 done
2149else
2150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2151/* end confdefs.h. */
2152$4
2153int
2154main ()
2155{
2156static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002157test_array [0] = 0;
2158return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002159
2160 ;
2161 return 0;
2162}
2163_ACEOF
2164if ac_fn_c_try_compile "$LINENO"; then :
2165 ac_hi=-1 ac_mid=-1
2166 while :; do
2167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2168/* end confdefs.h. */
2169$4
2170int
2171main ()
2172{
2173static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002174test_array [0] = 0;
2175return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002176
2177 ;
2178 return 0;
2179}
2180_ACEOF
2181if ac_fn_c_try_compile "$LINENO"; then :
2182 ac_lo=$ac_mid; break
2183else
2184 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2185 if test $ac_mid -le $ac_hi; then
2186 ac_lo= ac_hi=
2187 break
2188 fi
2189 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2190fi
2191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2192 done
2193else
2194 ac_lo= ac_hi=
2195fi
2196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2197fi
2198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2199# Binary search between lo and hi bounds.
2200while test "x$ac_lo" != "x$ac_hi"; do
2201 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2203/* end confdefs.h. */
2204$4
2205int
2206main ()
2207{
2208static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002209test_array [0] = 0;
2210return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002211
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_compile "$LINENO"; then :
2217 ac_hi=$ac_mid
2218else
2219 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2220fi
2221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2222done
2223case $ac_lo in #((
2224?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2225'') ac_retval=1 ;;
2226esac
2227 else
2228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2229/* end confdefs.h. */
2230$4
2231static long int longval () { return $2; }
2232static unsigned long int ulongval () { return $2; }
2233#include <stdio.h>
2234#include <stdlib.h>
2235int
2236main ()
2237{
2238
2239 FILE *f = fopen ("conftest.val", "w");
2240 if (! f)
2241 return 1;
2242 if (($2) < 0)
2243 {
2244 long int i = longval ();
2245 if (i != ($2))
2246 return 1;
2247 fprintf (f, "%ld", i);
2248 }
2249 else
2250 {
2251 unsigned long int i = ulongval ();
2252 if (i != ($2))
2253 return 1;
2254 fprintf (f, "%lu", i);
2255 }
2256 /* Do not output a trailing newline, as this causes \r\n confusion
2257 on some platforms. */
2258 return ferror (f) || fclose (f) != 0;
2259
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_run "$LINENO"; then :
2265 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2266else
2267 ac_retval=1
2268fi
2269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2270 conftest.$ac_objext conftest.beam conftest.$ac_ext
2271rm -f conftest.val
2272
2273 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002275 as_fn_set_status $ac_retval
2276
2277} # ac_fn_c_compute_int
2278
2279# ac_fn_c_check_func LINENO FUNC VAR
2280# ----------------------------------
2281# Tests whether FUNC exists, setting the cache variable VAR accordingly
2282ac_fn_c_check_func ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2286$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002287if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2293 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2294#define $2 innocuous_$2
2295
2296/* System header to define __stub macros and hopefully few prototypes,
2297 which can conflict with char $2 (); below.
2298 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2299 <limits.h> exists even on freestanding compilers. */
2300
2301#ifdef __STDC__
2302# include <limits.h>
2303#else
2304# include <assert.h>
2305#endif
2306
2307#undef $2
2308
2309/* Override any GCC internal prototype to avoid an error.
2310 Use char because int might match the return type of a GCC
2311 builtin and then its argument prototype would still apply. */
2312#ifdef __cplusplus
2313extern "C"
2314#endif
2315char $2 ();
2316/* The GNU C library defines this for functions which it implements
2317 to always fail with ENOSYS. Some functions are actually named
2318 something starting with __ and the normal name is an alias. */
2319#if defined __stub_$2 || defined __stub___$2
2320choke me
2321#endif
2322
2323int
2324main ()
2325{
2326return $2 ();
2327 ;
2328 return 0;
2329}
2330_ACEOF
2331if ac_fn_c_try_link "$LINENO"; then :
2332 eval "$3=yes"
2333else
2334 eval "$3=no"
2335fi
2336rm -f core conftest.err conftest.$ac_objext \
2337 conftest$ac_exeext conftest.$ac_ext
2338fi
2339eval ac_res=\$$3
2340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2341$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002342 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002343
2344} # ac_fn_c_check_func
2345
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002346# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2347# ---------------------------------------------
2348# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2349# accordingly.
2350ac_fn_c_check_decl ()
2351{
2352 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2353 as_decl_name=`echo $2|sed 's/ *(.*//'`
2354 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2356$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2357if eval \${$3+:} false; then :
2358 $as_echo_n "(cached) " >&6
2359else
2360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2361/* end confdefs.h. */
2362$4
2363int
2364main ()
2365{
2366#ifndef $as_decl_name
2367#ifdef __cplusplus
2368 (void) $as_decl_use;
2369#else
2370 (void) $as_decl_name;
2371#endif
2372#endif
2373
2374 ;
2375 return 0;
2376}
2377_ACEOF
2378if ac_fn_c_try_compile "$LINENO"; then :
2379 eval "$3=yes"
2380else
2381 eval "$3=no"
2382fi
2383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2384fi
2385eval ac_res=\$$3
2386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2387$as_echo "$ac_res" >&6; }
2388 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2389
2390} # ac_fn_c_check_decl
2391
Matthias Kloseb9621712010-04-24 17:59:49 +00002392# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2393# ----------------------------------------------------
2394# Tries to find if the field MEMBER exists in type AGGR, after including
2395# INCLUDES, setting cache variable VAR accordingly.
2396ac_fn_c_check_member ()
2397{
2398 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2400$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002401if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002402 $as_echo_n "(cached) " >&6
2403else
2404 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2405/* end confdefs.h. */
2406$5
2407int
2408main ()
2409{
2410static $2 ac_aggr;
2411if (ac_aggr.$3)
2412return 0;
2413 ;
2414 return 0;
2415}
2416_ACEOF
2417if ac_fn_c_try_compile "$LINENO"; then :
2418 eval "$4=yes"
2419else
2420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h. */
2422$5
2423int
2424main ()
2425{
2426static $2 ac_aggr;
2427if (sizeof ac_aggr.$3)
2428return 0;
2429 ;
2430 return 0;
2431}
2432_ACEOF
2433if ac_fn_c_try_compile "$LINENO"; then :
2434 eval "$4=yes"
2435else
2436 eval "$4=no"
2437fi
2438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439fi
2440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2441fi
2442eval ac_res=\$$4
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2444$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002445 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002446
2447} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002449This file contains any messages produced by compilers while
2450running configure, to aid debugging if configure makes a mistake.
2451
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002452It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002453generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455 $ $0 $@
2456
2457_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002458exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002459{
2460cat <<_ASUNAME
2461## --------- ##
2462## Platform. ##
2463## --------- ##
2464
2465hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2466uname -m = `(uname -m) 2>/dev/null || echo unknown`
2467uname -r = `(uname -r) 2>/dev/null || echo unknown`
2468uname -s = `(uname -s) 2>/dev/null || echo unknown`
2469uname -v = `(uname -v) 2>/dev/null || echo unknown`
2470
2471/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2472/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2473
2474/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2475/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2476/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002478/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2479/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2480/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2481
2482_ASUNAME
2483
2484as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2485for as_dir in $PATH
2486do
2487 IFS=$as_save_IFS
2488 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 $as_echo "PATH: $as_dir"
2490 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002492
2493} >&5
2494
2495cat >&5 <<_ACEOF
2496
2497
2498## ----------- ##
2499## Core tests. ##
2500## ----------- ##
2501
2502_ACEOF
2503
2504
2505# Keep a trace of the command line.
2506# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002507# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002508# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002509# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002510ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002511ac_configure_args0=
2512ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002513ac_must_keep_next=false
2514for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002515do
Skip Montanaro6dead952003-09-25 14:50:04 +00002516 for ac_arg
2517 do
2518 case $ac_arg in
2519 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2520 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2521 | -silent | --silent | --silen | --sile | --sil)
2522 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002523 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002525 esac
2526 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002527 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002529 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002530 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002531 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002532 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002533 case $ac_arg in
2534 *=* | --config-cache | -C | -disable-* | --disable-* \
2535 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2536 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2537 | -with-* | --with-* | -without-* | --without-* | --x)
2538 case "$ac_configure_args0 " in
2539 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2540 esac
2541 ;;
2542 -* ) ac_must_keep_next=true ;;
2543 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002544 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002545 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002546 ;;
2547 esac
2548 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002549done
Matthias Kloseb9621712010-04-24 17:59:49 +00002550{ ac_configure_args0=; unset ac_configure_args0;}
2551{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002552
2553# When interrupted or exit'd, cleanup temporary files, and complete
2554# config.log. We remove comments because anyway the quotes in there
2555# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556# WARNING: Use '\'' to represent an apostrophe within the trap.
2557# 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 +00002558trap 'exit_status=$?
2559 # Save into config.log some information that might help in debugging.
2560 {
2561 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002562
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002564## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 echo
2567 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568(
2569 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2570 eval ac_val=\$$ac_var
2571 case $ac_val in #(
2572 *${as_nl}*)
2573 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2575$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002576 esac
2577 case $ac_var in #(
2578 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002579 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2580 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581 esac ;;
2582 esac
2583 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2586 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588 "s/'\''/'\''\\\\'\'''\''/g;
2589 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2590 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002591 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002593 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 esac |
2595 sort
2596)
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002598
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002600## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002601## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002602 echo
2603 for ac_var in $ac_subst_vars
2604 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 eval ac_val=\$$ac_var
2606 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002607 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002609 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002610 done | sort
2611 echo
2612
2613 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002614 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002615## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002616## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002617 echo
2618 for ac_var in $ac_subst_files
2619 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002620 eval ac_val=\$$ac_var
2621 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002622 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002624 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002625 done | sort
2626 echo
2627 fi
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002630 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002631## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002632## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002635 echo
2636 fi
2637 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 $as_echo "$as_me: caught signal $ac_signal"
2639 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002641 rm -f core *.core core.conftest.* &&
2642 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002644' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002645for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002647done
2648ac_signal=0
2649
2650# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002651rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002652
Matthias Kloseb9621712010-04-24 17:59:49 +00002653$as_echo "/* confdefs.h */" > confdefs.h
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655# Predefined preprocessor variables.
2656
2657cat >>confdefs.h <<_ACEOF
2658#define PACKAGE_NAME "$PACKAGE_NAME"
2659_ACEOF
2660
Martin v. Löwis11437992002-04-12 09:54:03 +00002661cat >>confdefs.h <<_ACEOF
2662#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2663_ACEOF
2664
Martin v. Löwis11437992002-04-12 09:54:03 +00002665cat >>confdefs.h <<_ACEOF
2666#define PACKAGE_VERSION "$PACKAGE_VERSION"
2667_ACEOF
2668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669cat >>confdefs.h <<_ACEOF
2670#define PACKAGE_STRING "$PACKAGE_STRING"
2671_ACEOF
2672
Martin v. Löwis11437992002-04-12 09:54:03 +00002673cat >>confdefs.h <<_ACEOF
2674#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2675_ACEOF
2676
Matthias Kloseb9621712010-04-24 17:59:49 +00002677cat >>confdefs.h <<_ACEOF
2678#define PACKAGE_URL "$PACKAGE_URL"
2679_ACEOF
2680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681
2682# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002683# Prefer an explicitly selected file to automatically selected ones.
2684ac_site_file1=NONE
2685ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002686if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002687 # We do not want a PATH search for config.site.
2688 case $CONFIG_SITE in #((
2689 -*) ac_site_file1=./$CONFIG_SITE;;
2690 */*) ac_site_file1=$CONFIG_SITE;;
2691 *) ac_site_file1=./$CONFIG_SITE;;
2692 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002693elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 ac_site_file1=$prefix/share/config.site
2695 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002696else
Matthias Kloseb9621712010-04-24 17:59:49 +00002697 ac_site_file1=$ac_default_prefix/share/config.site
2698 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002700for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002701do
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 test "x$ac_site_file" = xNONE && continue
2703 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2705$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002707 . "$ac_site_file" \
2708 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2709$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2710as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002711See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002712 fi
2713done
2714
2715if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002716 # Some versions of bash will fail to source /dev/null (special files
2717 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2718 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2719 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2720$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002721 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002722 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2723 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 esac
2725 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002726else
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2728$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 >$cache_file
2730fi
2731
2732# Check that the precious variables saved in the cache have kept the same
2733# value.
2734ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002735for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2737 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002738 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2739 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 case $ac_old_set,$ac_new_set in
2741 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002742 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2743$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 +00002744 ac_cache_corrupted=: ;;
2745 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002746 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2747$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002748 ac_cache_corrupted=: ;;
2749 ,);;
2750 *)
2751 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002752 # differences in whitespace do not lead to failure.
2753 ac_old_val_w=`echo x $ac_old_val`
2754 ac_new_val_w=`echo x $ac_new_val`
2755 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2756 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2757$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2758 ac_cache_corrupted=:
2759 else
2760 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2761$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2762 eval $ac_var=\$ac_old_val
2763 fi
2764 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2765$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2766 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2767$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 fi;;
2769 esac
2770 # Pass precious variables to config.status.
2771 if test "$ac_new_set" = set; then
2772 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002773 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 *) ac_arg=$ac_var=$ac_new_val ;;
2775 esac
2776 case " $ac_configure_args " in
2777 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002778 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 esac
2780 fi
2781done
2782if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002783 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2785 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2786$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002787 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002789## -------------------- ##
2790## Main body of script. ##
2791## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002792
Guido van Rossum7f43da71994-08-01 12:15:30 +00002793ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002794ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2797ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002798
Guido van Rossum627b2d71993-12-24 10:39:16 +00002799
Michael W. Hudson54241132001-12-07 15:38:26 +00002800
Trent Nelson4d4ec652012-10-16 08:51:24 -04002801
Trent Nelson5595ab52012-10-17 04:47:31 -04002802if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002803 # If we're building out-of-tree, we need to make sure the following
2804 # resources get picked up before their $srcdir counterparts.
2805 # Objects/ -> typeslots.inc
2806 # Include/ -> Python-ast.h, graminit.h
2807 # Python/ -> importlib.h
2808 # (A side effect of this is that these resources will automatically be
2809 # regenerated when building out-of-tree, regardless of whether or not
2810 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2811 # off.)
2812 BASECPPFLAGS="-IObjects -IInclude -IPython"
2813else
2814 BASECPPFLAGS=""
2815fi
2816
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002817
2818
2819
2820
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002821if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002822then
2823# Extract the first word of "hg", so it can be a program name with args.
2824set dummy hg; ac_word=$2
2825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2826$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002827if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002828 $as_echo_n "(cached) " >&6
2829else
2830 if test -n "$HAS_HG"; then
2831 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2832else
2833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2834for as_dir in $PATH
2835do
2836 IFS=$as_save_IFS
2837 test -z "$as_dir" && as_dir=.
2838 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002839 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002840 ac_cv_prog_HAS_HG="found"
2841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2842 break 2
2843 fi
2844done
2845 done
2846IFS=$as_save_IFS
2847
2848 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2849fi
2850fi
2851HAS_HG=$ac_cv_prog_HAS_HG
2852if test -n "$HAS_HG"; then
2853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2854$as_echo "$HAS_HG" >&6; }
2855else
2856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2857$as_echo "no" >&6; }
2858fi
2859
2860
2861else
2862HAS_HG=no-repository
2863fi
2864if test $HAS_HG = found
2865then
2866 HGVERSION="hg id -i \$(srcdir)"
2867 HGTAG="hg id -t \$(srcdir)"
2868 HGBRANCH="hg id -b \$(srcdir)"
2869else
2870 HGVERSION=""
2871 HGTAG=""
2872 HGBRANCH=""
2873fi
2874
2875
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002876ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002877
2878
Victor Stinnerdddf4842016-06-07 11:21:42 +02002879
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002880ac_aux_dir=
2881for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2882 if test -f "$ac_dir/install-sh"; then
2883 ac_aux_dir=$ac_dir
2884 ac_install_sh="$ac_aux_dir/install-sh -c"
2885 break
2886 elif test -f "$ac_dir/install.sh"; then
2887 ac_aux_dir=$ac_dir
2888 ac_install_sh="$ac_aux_dir/install.sh -c"
2889 break
2890 elif test -f "$ac_dir/shtool"; then
2891 ac_aux_dir=$ac_dir
2892 ac_install_sh="$ac_aux_dir/shtool install -c"
2893 break
2894 fi
2895done
2896if test -z "$ac_aux_dir"; then
2897 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2898fi
2899
2900# These three variables are undocumented and unsupported,
2901# and are intended to be withdrawn in a future Autoconf release.
2902# They can cause serious problems if a builder's source tree is in a directory
2903# whose full name contains unusual characters.
2904ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2905ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2906ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2907
2908
2909# Make sure we can run config.sub.
2910$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2911 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2912
2913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2914$as_echo_n "checking build system type... " >&6; }
2915if ${ac_cv_build+:} false; then :
2916 $as_echo_n "(cached) " >&6
2917else
2918 ac_build_alias=$build_alias
2919test "x$ac_build_alias" = x &&
2920 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2921test "x$ac_build_alias" = x &&
2922 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2923ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2924 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2925
2926fi
2927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2928$as_echo "$ac_cv_build" >&6; }
2929case $ac_cv_build in
2930*-*-*) ;;
2931*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2932esac
2933build=$ac_cv_build
2934ac_save_IFS=$IFS; IFS='-'
2935set x $ac_cv_build
2936shift
2937build_cpu=$1
2938build_vendor=$2
2939shift; shift
2940# Remember, the first character of IFS is used to create $*,
2941# except with old shells:
2942build_os=$*
2943IFS=$ac_save_IFS
2944case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2945
2946
2947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2948$as_echo_n "checking host system type... " >&6; }
2949if ${ac_cv_host+:} false; then :
2950 $as_echo_n "(cached) " >&6
2951else
2952 if test "x$host_alias" = x; then
2953 ac_cv_host=$ac_cv_build
2954else
2955 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2956 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2957fi
2958
2959fi
2960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2961$as_echo "$ac_cv_host" >&6; }
2962case $ac_cv_host in
2963*-*-*) ;;
2964*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2965esac
2966host=$ac_cv_host
2967ac_save_IFS=$IFS; IFS='-'
2968set x $ac_cv_host
2969shift
2970host_cpu=$1
2971host_vendor=$2
2972shift; shift
2973# Remember, the first character of IFS is used to create $*,
2974# except with old shells:
2975host_os=$*
2976IFS=$ac_save_IFS
2977case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2978
2979
2980
doko@python.orga10e4a92013-01-25 18:45:12 +01002981
2982
Ned Deilyfcbc2462014-08-22 13:32:49 -07002983# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2984rm -f pybuilddir.txt
2985
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002986for ac_prog in python$PACKAGE_VERSION python3 python
2987do
2988 # Extract the first word of "$ac_prog", so it can be a program name with args.
2989set dummy $ac_prog; ac_word=$2
2990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2991$as_echo_n "checking for $ac_word... " >&6; }
2992if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2993 $as_echo_n "(cached) " >&6
2994else
2995 if test -n "$PYTHON_FOR_GEN"; then
2996 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2997else
2998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2999for as_dir in $PATH
3000do
3001 IFS=$as_save_IFS
3002 test -z "$as_dir" && as_dir=.
3003 for ac_exec_ext in '' $ac_executable_extensions; do
3004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3005 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3006 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3007 break 2
3008 fi
3009done
3010 done
3011IFS=$as_save_IFS
3012
3013fi
3014fi
3015PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3016if test -n "$PYTHON_FOR_GEN"; then
3017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3018$as_echo "$PYTHON_FOR_GEN" >&6; }
3019else
3020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3021$as_echo "no" >&6; }
3022fi
3023
3024
3025 test -n "$PYTHON_FOR_GEN" && break
3026done
3027test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3028
3029if test "$PYTHON_FOR_GEN" = not-found; then
3030 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3031 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3032 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3033fi
3034
3035
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003036if test "$cross_compiling" = yes; then
3037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3038$as_echo_n "checking for python interpreter for cross build... " >&6; }
3039 if test -z "$PYTHON_FOR_BUILD"; then
3040 for interp in python$PACKAGE_VERSION python3 python; do
3041 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003042 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 +02003043 break
3044 fi
3045 interp=
3046 done
3047 if test x$interp = x; then
3048 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3049 fi
3050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3051$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003052 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 +02003053 fi
Martin Pantereac67be2016-07-28 01:28:27 +00003054 PGEN_DEPENDENCY=''
Christian Heimes954ac032012-12-12 13:10:21 +01003055elif test "$cross_compiling" = maybe; then
3056 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003057else
3058 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Pantereac67be2016-07-28 01:28:27 +00003059 PGEN_DEPENDENCY='$(PGEN)'
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003060fi
3061
3062
Martin v. Löwis11437992002-04-12 09:54:03 +00003063
Martin Pantereac67be2016-07-28 01:28:27 +00003064
Benjamin Petersond23f8222009-04-05 19:13:16 +00003065if test "$prefix" != "/"; then
3066 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3067fi
3068
3069
Martin v. Löwis11437992002-04-12 09:54:03 +00003070
3071
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003072# We don't use PACKAGE_ variables, and they cause conflicts
3073# with other autoconf-based packages that include Python.h
3074grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3075rm confdefs.h
3076mv confdefs.h.new confdefs.h
3077
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003078
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003079VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003080
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003081# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003082
3083SOVERSION=1.0
3084
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003085# The later defininition of _XOPEN_SOURCE disables certain features
3086# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3087
Matthias Kloseb9621712010-04-24 17:59:49 +00003088$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003089
3090
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003091# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3092# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3093# them.
3094
Matthias Kloseb9621712010-04-24 17:59:49 +00003095$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003096
3097
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003098# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3099# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3100# them.
3101
Matthias Kloseb9621712010-04-24 17:59:49 +00003102$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003103
3104
Martin v. Löwisd6320502004-08-12 13:45:08 +00003105# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3106# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3107
Matthias Kloseb9621712010-04-24 17:59:49 +00003108$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003109
3110
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003111# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3112# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3113# them.
3114
Matthias Kloseb9621712010-04-24 17:59:49 +00003115$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003116
3117
3118
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003119define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003120
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003121# Arguments passed to configure.
3122
3123CONFIG_ARGS="$ac_configure_args"
3124
Matthias Kloseb9621712010-04-24 17:59:49 +00003125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3126$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003127# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003128if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003129 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003130 case $enableval in
3131 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003132 # Locate the best usable SDK, see Mac/README.txt for more
3133 # information
3134 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003135 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003136 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003137 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3138 if test ! -d "${enableval}"
3139 then
3140 enableval=/
3141 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003142 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003143 ;;
3144 esac
3145 case $enableval in
3146 no)
3147 UNIVERSALSDK=
3148 enable_universalsdk=
3149 ;;
3150 *)
3151 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003152 if test ! -d "${UNIVERSALSDK}"
3153 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003154 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003155 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003156 ;;
3157 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003158
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003159
Thomas Wouters477c8d52006-05-27 19:21:47 +00003160else
3161
3162 UNIVERSALSDK=
3163 enable_universalsdk=
3164
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003166
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003167if test -n "${UNIVERSALSDK}"
3168then
Matthias Kloseb9621712010-04-24 17:59:49 +00003169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3170$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003171else
Matthias Kloseb9621712010-04-24 17:59:49 +00003172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3173$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003174fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003176
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003177
Ned Deily87adb6e2013-10-18 21:09:56 -07003178ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003179
Ned Deilycbfb9a52012-06-23 16:02:19 -07003180# For backward compatibility reasons we prefer to select '32-bit' if available,
3181# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003182UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003183if test "`uname -s`" = "Darwin"
3184then
3185 if test -n "${UNIVERSALSDK}"
3186 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003187 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003188 then
3189 UNIVERSAL_ARCHS="intel"
3190 fi
3191 fi
3192fi
3193
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003194
Matthias Kloseb9621712010-04-24 17:59:49 +00003195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3196$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003197
3198# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003199if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003200 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003201 UNIVERSAL_ARCHS="$withval"
3202
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003203fi
3204
Ned Deily87adb6e2013-10-18 21:09:56 -07003205if test -n "${UNIVERSALSDK}"
3206then
3207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3208$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3209else
3210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3211$as_echo "no" >&6; }
3212fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003213
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003214
3215# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003216if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003217 withval=$with_framework_name;
3218 PYTHONFRAMEWORK=${withval}
3219 PYTHONFRAMEWORKDIR=${withval}.framework
3220 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3221
3222else
3223
3224 PYTHONFRAMEWORK=Python
3225 PYTHONFRAMEWORKDIR=Python.framework
3226 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3227
3228fi
3229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003230# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003231if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003232 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003233 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003234 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003235 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003236 esac
3237 case $enableval in
3238 no)
3239 PYTHONFRAMEWORK=
3240 PYTHONFRAMEWORKDIR=no-framework
3241 PYTHONFRAMEWORKPREFIX=
3242 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243 FRAMEWORKINSTALLFIRST=
3244 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003245 FRAMEWORKALTINSTALLFIRST=
3246 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003247 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003248 if test "x${prefix}" = "xNONE"; then
3249 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3250 else
3251 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3252 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003253 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003254 ;;
3255 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003256 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003257 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003259 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003260 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3261 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003262 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003263 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003264
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003265 if test "x${prefix}" = "xNONE" ; then
3266 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003267
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003268 else
3269 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3270 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003271
3272 case "${enableval}" in
3273 /System*)
3274 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3275 if test "${prefix}" = "NONE" ; then
3276 # See below
3277 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3278 fi
3279 ;;
3280
3281 /Library*)
3282 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3283 ;;
3284
3285 */Library/Frameworks)
3286 MDIR="`dirname "${enableval}"`"
3287 MDIR="`dirname "${MDIR}"`"
3288 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3289
3290 if test "${prefix}" = "NONE"; then
3291 # User hasn't specified the
3292 # --prefix option, but wants to install
3293 # the framework in a non-default location,
3294 # ensure that the compatibility links get
3295 # installed relative to that prefix as well
3296 # instead of in /usr/local.
3297 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3298 fi
3299 ;;
3300
3301 *)
3302 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3303 ;;
3304 esac
3305
Jack Jansen127e56e2001-09-11 14:41:54 +00003306 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003307
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003308 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003309 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003312 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003313
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003314 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3315
3316 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3317
Jack Jansene578a632001-08-15 01:27:14 +00003318 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003319
Guido van Rossum563e7081996-09-10 18:20:48 +00003320else
Martin v. Löwis11437992002-04-12 09:54:03 +00003321
Jack Jansene578a632001-08-15 01:27:14 +00003322 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003323 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003324 PYTHONFRAMEWORKPREFIX=
3325 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003326 FRAMEWORKINSTALLFIRST=
3327 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003328 FRAMEWORKALTINSTALLFIRST=
3329 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003330 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003331 if test "x${prefix}" = "xNONE" ; then
3332 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3333 else
3334 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3335 fi
Jack Jansene578a632001-08-15 01:27:14 +00003336 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003337
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003338
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339fi
3340
Thomas Wouters477c8d52006-05-27 19:21:47 +00003341
3342
Michael W. Hudson54241132001-12-07 15:38:26 +00003343
3344
3345
3346
Jack Jansene578a632001-08-15 01:27:14 +00003347
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003348
3349
3350
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003351
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003352
Ned Deilyb8f944f2013-11-21 22:42:25 -08003353
Jack Jansene578a632001-08-15 01:27:14 +00003354##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003355## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003356## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003357##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003358# Set name for machine-dependent library files
3359
Matthias Kloseb9621712010-04-24 17:59:49 +00003360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3361$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003362if test -z "$MACHDEP"
3363then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003364 # avoid using uname for cross builds
3365 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003366 # ac_sys_system and ac_sys_release are used for setting
3367 # a lot of different things including 'define_xopen_source'
3368 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003369 case "$host" in
3370 *-*-linux*)
3371 ac_sys_system=Linux
3372 ;;
3373 *-*-cygwin*)
3374 ac_sys_system=Cygwin
3375 ;;
3376 *)
3377 # for now, limit cross builds to known configurations
3378 MACHDEP="unknown"
3379 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3380 esac
3381 ac_sys_release=
3382 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003383 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003384 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003385 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003386 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003387 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003388 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003389 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003390 fi
3391 ac_md_system=`echo $ac_sys_system |
3392 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3393 ac_md_release=`echo $ac_sys_release |
3394 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3395 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003396
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003397 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003398 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003399 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003400 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003401 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003402 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003403 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003404fi
Guido van Rossum91922671997-10-09 20:24:13 +00003405
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003406
3407if test "$cross_compiling" = yes; then
3408 case "$host" in
3409 *-*-linux*)
3410 case "$host_cpu" in
3411 arm*)
3412 _host_cpu=arm
3413 ;;
3414 *)
3415 _host_cpu=$host_cpu
3416 esac
3417 ;;
3418 *-*-cygwin*)
3419 _host_cpu=
3420 ;;
3421 *)
3422 # for now, limit cross builds to known configurations
3423 MACHDEP="unknown"
3424 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3425 esac
3426 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3427fi
3428
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003429# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3430# disable features if it is defined, without any means to access these
3431# features as extensions. For these systems, we skip the definition of
3432# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3433# some feature, make sure there is no alternative way to access this
3434# feature. Also, when using wildcards, make sure you have verified the
3435# need for not defining _XOPEN_SOURCE on all systems matching the
3436# wildcard, and that the wildcard does not include future systems
3437# (which may remove their limitations).
3438case $ac_sys_system/$ac_sys_release in
3439 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3440 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003441 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003442 # In addition, Stefan Krah confirms that issue #1244610 exists through
3443 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003444 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003445 define_xopen_source=no
3446 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3447 # also defined. This can be overridden by defining _BSD_SOURCE
3448 # As this has a different meaning on Linux, only define it on OpenBSD
3449
Matthias Kloseb9621712010-04-24 17:59:49 +00003450$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003451
3452 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003453 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003454 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3455 # also defined. This can be overridden by defining _BSD_SOURCE
3456 # As this has a different meaning on Linux, only define it on OpenBSD
3457
Matthias Kloseb9621712010-04-24 17:59:49 +00003458$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003459
3460 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003461 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3462 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3463 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003464 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 +00003465 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003466 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3467 # request to enable features supported by the standard as a request
3468 # to disable features not supported by the standard. The best way
3469 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3470 # entirely and define __EXTENSIONS__ instead.
3471 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003472 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003473 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3474 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003475 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003476 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003477 define_xopen_source=no;;
3478 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003479 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003480 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003481 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003482 # On FreeBSD 4, the math functions C89 does not cover are never defined
3483 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3484 FreeBSD/4.*)
3485 define_xopen_source=no;;
3486 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3487 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3488 # identifies itself as Darwin/7.*
3489 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3490 # disables platform specific features beyond repair.
3491 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3492 # has no effect, don't bother defining them
3493 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003494 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003495 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003496 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003497 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3498 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3499 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003500 AIX/4)
3501 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003502 AIX/5)
3503 if test `uname -r` -eq 1; then
3504 define_xopen_source=no
3505 fi
3506 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003507 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3508 # defining NI_NUMERICHOST.
3509 QNX/6.3.2)
3510 define_xopen_source=no
3511 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003512
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003513esac
3514
3515if test $define_xopen_source = yes
3516then
Victor Stinner14d098d2011-09-07 22:29:43 +02003517 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003518
Victor Stinner14d098d2011-09-07 22:29:43 +02003519$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003520
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003521
3522 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3523 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3524 # several APIs are not declared. Since this is also needed in some
3525 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003526
Matthias Kloseb9621712010-04-24 17:59:49 +00003527$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003528
3529
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003530
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003531$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003532
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003533fi
3534
Christian Heimes647cd872013-12-07 23:39:33 +01003535# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3536case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003537 hp*|HP*)
3538 define_stdc_a1=yes;;
3539 *)
3540 define_stdc_a1=no;;
3541esac
3542
3543if test $define_stdc_a1 = yes
3544then
Christian Heimes647cd872013-12-07 23:39:33 +01003545
3546$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3547
Christian Heimesb02bcae2013-12-08 15:21:08 +01003548fi
Christian Heimes647cd872013-12-07 23:39:33 +01003549
Guido van Rossum91922671997-10-09 20:24:13 +00003550#
3551# SGI compilers allow the specification of the both the ABI and the
3552# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003553# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003554#
3555# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3556# thus supply support for various ABI/ISA combinations. The MACHDEP
3557# variable is also adjusted.
3558#
3559
3560if test ! -z "$SGI_ABI"
3561then
3562 CC="cc $SGI_ABI"
3563 LDFLAGS="$SGI_ABI $LDFLAGS"
3564 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3567$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003568
Jack Jansen6b08a402004-06-03 12:41:45 +00003569# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3570# it may influence the way we can build extensions, so distutils
3571# needs to check it
3572
Thomas Wouters477c8d52006-05-27 19:21:47 +00003573
Jack Jansen6b08a402004-06-03 12:41:45 +00003574CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003575EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003576
Guido van Rossum627b2d71993-12-24 10:39:16 +00003577# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003578
3579# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3580# for debug/optimization stuff. BASECFLAGS is for flags that are required
3581# just to get things to compile and link. Users are free to override OPT
3582# when running configure or make. The build should not break if they do.
3583# BASECFLAGS should generally not be messed with, however.
3584
3585# XXX shouldn't some/most/all of this code be merged with the stuff later
3586# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3588$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003591if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003592 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003593 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003594 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003595 without_gcc=yes;;
3596 yes) CC=gcc
3597 without_gcc=no;;
3598 *) CC=$withval
3599 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003600 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003601else
Martin v. Löwis11437992002-04-12 09:54:03 +00003602
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003603 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003604 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003605 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003606 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003607 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003608fi
3609
Matthias Kloseb9621712010-04-24 17:59:49 +00003610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3611$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003612
Zachary Ware5af85642015-12-21 12:09:17 -06003613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3614$as_echo_n "checking for --with-icc... " >&6; }
3615
3616# Check whether --with-icc was given.
3617if test "${with_icc+set}" = set; then :
3618 withval=$with_icc;
3619 case $withval in
3620 no) CC=${CC:-cc}
3621 with_icc=no;;
3622 yes) CC=icc
3623 CXX=icpc
3624 with_icc=yes;;
3625 *) CC=$withval
3626 with_icc=$withval;;
3627 esac
3628else
3629
3630 with_icc=no
3631fi
3632
3633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3634$as_echo "$with_icc" >&6; }
3635
Guido van Rossum8b131c51995-03-09 14:10:13 +00003636# If the user switches compilers, we can't believe the cache
3637if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3638then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003639 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003640(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003641fi
3642
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003643# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3644# when the compiler supports them, but we don't always want -O2, and
3645# we set -g later.
3646if test -z "$CFLAGS"; then
3647 CFLAGS=
3648fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003649
3650if test "$ac_sys_system" = "Darwin"
3651then
3652 # Compiler selection on MacOSX is more complicated than
3653 # AC_PROG_CC can handle, see Mac/README.txt for more
3654 # information
3655 if test -z "${CC}"
3656 then
3657 found_gcc=
3658 found_clang=
3659 as_save_IFS=$IFS; IFS=:
3660 for as_dir in $PATH
3661 do
3662 IFS=$as_save_IFS
3663 if test -x $as_dir/gcc; then
3664 if test -z "${found_gcc}"; then
3665 found_gcc=$as_dir/gcc
3666 fi
3667 fi
3668 if test -x $as_dir/clang; then
3669 if test -z "${found_clang}"; then
3670 found_clang=$as_dir/clang
3671 fi
3672 fi
3673 done
3674 IFS=$as_save_IFS
3675
3676 if test -n "$found_gcc" -a -n "$found_clang"
3677 then
3678 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3679 then
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3681$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3682 CC="$found_clang"
3683 CXX="$found_clang++"
3684 fi
3685
3686
3687 elif test -z "$found_gcc" -a -n "$found_clang"
3688 then
3689 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3690$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3691 CC="$found_clang"
3692 CXX="$found_clang++"
3693
3694 elif test -z "$found_gcc" -a -z "$found_clang"
3695 then
3696 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3697 if test -n "${found_clang}"
3698 then
3699 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3700$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3701 CC="${found_clang}"
3702 CXX="`/usr/bin/xcrun -find clang++`"
3703
3704 # else: use default behaviour
3705 fi
3706 fi
3707 fi
3708fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003709ac_ext=c
3710ac_cpp='$CPP $CPPFLAGS'
3711ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3712ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3713ac_compiler_gnu=$ac_cv_c_compiler_gnu
3714if test -n "$ac_tool_prefix"; then
3715 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3716set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3718$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003719if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003720 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721else
3722 if test -n "$CC"; then
3723 ac_cv_prog_CC="$CC" # Let the user override the test.
3724else
Martin v. Löwis11437992002-04-12 09:54:03 +00003725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3726for as_dir in $PATH
3727do
3728 IFS=$as_save_IFS
3729 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003733 $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 +00003734 break 2
3735 fi
3736done
Matthias Kloseb9621712010-04-24 17:59:49 +00003737 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003739
Jack Jansendd19cf82001-12-06 22:36:17 +00003740fi
3741fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003742CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003743if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3745$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003746else
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3748$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
3750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
3753if test -z "$ac_cv_prog_CC"; then
3754 ac_ct_CC=$CC
3755 # Extract the first word of "gcc", so it can be a program name with args.
3756set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3758$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003759if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003761else
3762 if test -n "$ac_ct_CC"; then
3763 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3764else
3765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3766for as_dir in $PATH
3767do
3768 IFS=$as_save_IFS
3769 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003772 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $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 +00003774 break 2
3775 fi
3776done
Matthias Kloseb9621712010-04-24 17:59:49 +00003777 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003778IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003779
3780fi
3781fi
3782ac_ct_CC=$ac_cv_prog_ac_ct_CC
3783if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3785$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003786else
Matthias Kloseb9621712010-04-24 17:59:49 +00003787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3788$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003789fi
3790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791 if test "x$ac_ct_CC" = x; then
3792 CC=""
3793 else
3794 case $cross_compiling:$ac_tool_warned in
3795yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003796{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3797$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798ac_tool_warned=yes ;;
3799esac
3800 CC=$ac_ct_CC
3801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
3803 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003804fi
3805
Jack Jansendd19cf82001-12-06 22:36:17 +00003806if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003807 if test -n "$ac_tool_prefix"; then
3808 # 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 +00003809set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3811$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003812if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003814else
3815 if test -n "$CC"; then
3816 ac_cv_prog_CC="$CC" # Let the user override the test.
3817else
Martin v. Löwis11437992002-04-12 09:54:03 +00003818as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3819for as_dir in $PATH
3820do
3821 IFS=$as_save_IFS
3822 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003825 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 $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 +00003827 break 2
3828 fi
3829done
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003832
3833fi
3834fi
3835CC=$ac_cv_prog_CC
3836if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3838$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003839else
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3841$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842fi
3843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003846fi
3847if test -z "$CC"; then
3848 # Extract the first word of "cc", so it can be a program name with args.
3849set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3851$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003852if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003853 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003854else
3855 if test -n "$CC"; then
3856 ac_cv_prog_CC="$CC" # Let the user override the test.
3857else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003858 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003859as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3860for as_dir in $PATH
3861do
3862 IFS=$as_save_IFS
3863 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003865 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003866 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3867 ac_prog_rejected=yes
3868 continue
3869 fi
3870 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003871 $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 +00003872 break 2
3873 fi
3874done
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003877
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003878if test $ac_prog_rejected = yes; then
3879 # We found a bogon in the path, so make sure we never use it.
3880 set dummy $ac_cv_prog_CC
3881 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003882 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003883 # We chose a different compiler from the bogus one.
3884 # However, it has the same basename, so the bogon will be chosen
3885 # first if we set CC to just the basename; use the full file name.
3886 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003887 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003888 fi
3889fi
3890fi
3891fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003892CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003893if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3895$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003896else
Matthias Kloseb9621712010-04-24 17:59:49 +00003897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3898$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003899fi
3900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003901
Martin v. Löwis11437992002-04-12 09:54:03 +00003902fi
3903if test -z "$CC"; then
3904 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003906 do
3907 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3908set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3910$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003911if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003913else
3914 if test -n "$CC"; then
3915 ac_cv_prog_CC="$CC" # Let the user override the test.
3916else
Martin v. Löwis11437992002-04-12 09:54:03 +00003917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3918for as_dir in $PATH
3919do
3920 IFS=$as_save_IFS
3921 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003922 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003923 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003924 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 $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 +00003926 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003927 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003928done
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003931
3932fi
3933fi
3934CC=$ac_cv_prog_CC
3935if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3937$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003938else
Matthias Kloseb9621712010-04-24 17:59:49 +00003939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3940$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003941fi
3942
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943
Martin v. Löwis11437992002-04-12 09:54:03 +00003944 test -n "$CC" && break
3945 done
3946fi
3947if test -z "$CC"; then
3948 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003949 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003950do
3951 # Extract the first word of "$ac_prog", so it can be a program name with args.
3952set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3954$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003955if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003956 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003957else
3958 if test -n "$ac_ct_CC"; then
3959 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3960else
3961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3962for as_dir in $PATH
3963do
3964 IFS=$as_save_IFS
3965 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003966 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003967 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003968 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003969 $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 +00003970 break 2
3971 fi
3972done
Matthias Kloseb9621712010-04-24 17:59:49 +00003973 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003975
Martin v. Löwis11437992002-04-12 09:54:03 +00003976fi
3977fi
3978ac_ct_CC=$ac_cv_prog_ac_ct_CC
3979if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3981$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003982else
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3984$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003985fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003986
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003987
Martin v. Löwis11437992002-04-12 09:54:03 +00003988 test -n "$ac_ct_CC" && break
3989done
Michael W. Hudson54241132001-12-07 15:38:26 +00003990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991 if test "x$ac_ct_CC" = x; then
3992 CC=""
3993 else
3994 case $cross_compiling:$ac_tool_warned in
3995yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003996{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3997$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998ac_tool_warned=yes ;;
3999esac
4000 CC=$ac_ct_CC
4001 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004002fi
4003
4004fi
4005
4006
Matthias Kloseb9621712010-04-24 17:59:49 +00004007test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4008$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004009as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004010See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004011
4012# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004013$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4014set X $ac_compile
4015ac_compiler=$2
4016for ac_option in --version -v -V -qversion; do
4017 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018case "(($ac_try" in
4019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4020 *) ac_try_echo=$ac_try;;
4021esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4023$as_echo "$ac_try_echo"; } >&5
4024 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 if test -s conftest.err; then
4027 sed '10a\
4028... rest of stderr output deleted ...
4029 10q' conftest.err >conftest.er1
4030 cat conftest.er1 >&5
4031 fi
4032 rm -f conftest.er1 conftest.err
4033 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4034 test $ac_status = 0; }
4035done
Martin v. Löwis11437992002-04-12 09:54:03 +00004036
Matthias Kloseb9621712010-04-24 17:59:49 +00004037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004038/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004039
Martin v. Löwis11437992002-04-12 09:54:03 +00004040int
4041main ()
4042{
4043
4044 ;
4045 return 0;
4046}
4047_ACEOF
4048ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004049ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004050# Try to create an executable without -o first, disregard a.out.
4051# It will help us diagnose broken compilers, and finding out an intuition
4052# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4054$as_echo_n "checking whether the C compiler works... " >&6; }
4055ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4056
4057# The possible output files:
4058ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004060ac_rmfiles=
4061for ac_file in $ac_files
4062do
4063 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004064 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004065 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4066 esac
4067done
4068rm -f $ac_rmfiles
4069
Matthias Kloseb9621712010-04-24 17:59:49 +00004070if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004071case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004077 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004078 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004081 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4082# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4083# in a Makefile. We should not override ac_cv_exeext if it was cached,
4084# so that the user can short-circuit this test for compilers unknown to
4085# Autoconf.
4086for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004087do
4088 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004089 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004091 ;;
4092 [ab].out )
4093 # We found the default executable, but exeext='' is most
4094 # certainly right.
4095 break;;
4096 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004097 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004098 then :; else
4099 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4100 fi
4101 # We set ac_cv_exeext here because the later test for it is not
4102 # safe: cross compilers may not add the suffix if given an `-o'
4103 # argument, so we may need to know it at that point already.
4104 # Even if this section looks crufty: it has the advantage of
4105 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004106 break;;
4107 * )
4108 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004109 esac
4110done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004111test "$ac_cv_exeext" = no && ac_cv_exeext=
4112
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004113else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114 ac_file=''
4115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004116if test -z "$ac_file"; then :
4117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4118$as_echo "no" >&6; }
4119$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004120sed 's/^/| /' conftest.$ac_ext >&5
4121
Matthias Kloseb9621712010-04-24 17:59:49 +00004122{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4123$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004124as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004125See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004126else
4127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4128$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4131$as_echo_n "checking for C compiler default output file name... " >&6; }
4132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4133$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004134ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004135
Matthias Kloseb9621712010-04-24 17:59:49 +00004136rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004137ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4139$as_echo_n "checking for suffix of executables... " >&6; }
4140if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004141case "(($ac_try" in
4142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4143 *) ac_try_echo=$ac_try;;
4144esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4146$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004147 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004148 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004149 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004151 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4152# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4153# work properly (i.e., refer to `conftest.exe'), while it won't with
4154# `rm'.
4155for ac_file in conftest.exe conftest conftest.*; do
4156 test -f "$ac_file" || continue
4157 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004158 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004159 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4160 break;;
4161 * ) break;;
4162 esac
4163done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004164else
Matthias Kloseb9621712010-04-24 17:59:49 +00004165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004167as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004168See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004170rm -f conftest conftest$ac_cv_exeext
4171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4172$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004173
4174rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004175EXEEXT=$ac_cv_exeext
4176ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4178/* end confdefs.h. */
4179#include <stdio.h>
4180int
4181main ()
4182{
4183FILE *f = fopen ("conftest.out", "w");
4184 return ferror (f) || fclose (f) != 0;
4185
4186 ;
4187 return 0;
4188}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004190ac_clean_files="$ac_clean_files conftest.out"
4191# Check that the compiler produces executables we can run. If not, either
4192# the compiler is broken, or we cross compile.
4193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4194$as_echo_n "checking whether we are cross compiling... " >&6; }
4195if test "$cross_compiling" != yes; then
4196 { { ac_try="$ac_link"
4197case "(($ac_try" in
4198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4199 *) ac_try_echo=$ac_try;;
4200esac
4201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4202$as_echo "$ac_try_echo"; } >&5
4203 (eval "$ac_link") 2>&5
4204 ac_status=$?
4205 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4206 test $ac_status = 0; }
4207 if { ac_try='./conftest$ac_cv_exeext'
4208 { { case "(($ac_try" in
4209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4210 *) ac_try_echo=$ac_try;;
4211esac
4212eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4213$as_echo "$ac_try_echo"; } >&5
4214 (eval "$ac_try") 2>&5
4215 ac_status=$?
4216 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4217 test $ac_status = 0; }; }; then
4218 cross_compiling=no
4219 else
4220 if test "$cross_compiling" = maybe; then
4221 cross_compiling=yes
4222 else
4223 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4224$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004225as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004226If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004227See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 fi
4229 fi
4230fi
4231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4232$as_echo "$cross_compiling" >&6; }
4233
4234rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4235ac_clean_files=$ac_clean_files_save
4236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4237$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004238if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 $as_echo_n "(cached) " >&6
4240else
4241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004242/* end confdefs.h. */
4243
4244int
4245main ()
4246{
4247
4248 ;
4249 return 0;
4250}
4251_ACEOF
4252rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004253if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254case "(($ac_try" in
4255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4256 *) ac_try_echo=$ac_try;;
4257esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004258eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4259$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004261 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004262 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4263 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264 for ac_file in conftest.o conftest.obj conftest.*; do
4265 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004267 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004268 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4269 break;;
4270 esac
4271done
4272else
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004274sed 's/^/| /' conftest.$ac_ext >&5
4275
Matthias Kloseb9621712010-04-24 17:59:49 +00004276{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4277$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004278as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004279See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004280fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004281rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4284$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004285OBJEXT=$ac_cv_objext
4286ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4288$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004289if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004290 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004291else
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004294
Martin v. Löwis11437992002-04-12 09:54:03 +00004295int
4296main ()
4297{
4298#ifndef __GNUC__
4299 choke me
4300#endif
4301
4302 ;
4303 return 0;
4304}
4305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004306if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004307 ac_compiler_gnu=yes
4308else
Matthias Kloseb9621712010-04-24 17:59:49 +00004309 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004312ac_cv_c_compiler_gnu=$ac_compiler_gnu
4313
4314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4316$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4317if test $ac_compiler_gnu = yes; then
4318 GCC=yes
4319else
4320 GCC=
4321fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004322ac_test_CFLAGS=${CFLAGS+set}
4323ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4325$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004326if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004327 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004328else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 ac_save_c_werror_flag=$ac_c_werror_flag
4330 ac_c_werror_flag=yes
4331 ac_cv_prog_cc_g=no
4332 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004335
Martin v. Löwis11437992002-04-12 09:54:03 +00004336int
4337main ()
4338{
4339
4340 ;
4341 return 0;
4342}
4343_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004344if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004345 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004346else
Matthias Kloseb9621712010-04-24 17:59:49 +00004347 CFLAGS=""
4348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349/* end confdefs.h. */
4350
4351int
4352main ()
4353{
4354
4355 ;
4356 return 0;
4357}
4358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004359if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360
Matthias Kloseb9621712010-04-24 17:59:49 +00004361else
4362 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365/* end confdefs.h. */
4366
4367int
4368main ()
4369{
4370
4371 ;
4372 return 0;
4373}
4374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004375if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4383 ac_c_werror_flag=$ac_save_c_werror_flag
4384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4386$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004387if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004388 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004389elif test $ac_cv_prog_cc_g = yes; then
4390 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004391 CFLAGS="-g -O2"
4392 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004393 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004394 fi
4395else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004396 if test "$GCC" = yes; then
4397 CFLAGS="-O2"
4398 else
4399 CFLAGS=
4400 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004401fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4403$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004404if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004405 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004406else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004407 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004408ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004410/* end confdefs.h. */
4411#include <stdarg.h>
4412#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004413struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004414/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4415struct buf { int x; };
4416FILE * (*rcsopen) (struct buf *, struct stat *, int);
4417static char *e (p, i)
4418 char **p;
4419 int i;
4420{
4421 return p[i];
4422}
4423static char *f (char * (*g) (char **, int), char **p, ...)
4424{
4425 char *s;
4426 va_list v;
4427 va_start (v,p);
4428 s = g (p, va_arg (v,int));
4429 va_end (v);
4430 return s;
4431}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004432
4433/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4434 function prototypes and stuff, but not '\xHH' hex character constants.
4435 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004436 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004437 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4438 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004439 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004440int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004442/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4443 inside strings and character constants. */
4444#define FOO(x) 'x'
4445int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4446
Skip Montanaro6dead952003-09-25 14:50:04 +00004447int test (int i, double x);
4448struct s1 {int (*f) (int a);};
4449struct s2 {int (*f) (double a);};
4450int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4451int argc;
4452char **argv;
4453int
4454main ()
4455{
4456return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4457 ;
4458 return 0;
4459}
4460_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004461for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4462 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004463do
4464 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004465 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004466 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004468rm -f core conftest.err conftest.$ac_objext
4469 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004470done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004471rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004472CC=$ac_save_CC
4473
4474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004475# AC_CACHE_VAL
4476case "x$ac_cv_prog_cc_c89" in
4477 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4479$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004480 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4482$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004484 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4486$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004487esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004488if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004489
Matthias Kloseb9621712010-04-24 17:59:49 +00004490fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004491
Martin v. Löwis11437992002-04-12 09:54:03 +00004492ac_ext=c
4493ac_cpp='$CPP $CPPFLAGS'
4494ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4495ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4496ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004497
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004498ac_ext=c
4499ac_cpp='$CPP $CPPFLAGS'
4500ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4501ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4502ac_compiler_gnu=$ac_cv_c_compiler_gnu
4503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4504$as_echo_n "checking how to run the C preprocessor... " >&6; }
4505# On Suns, sometimes $CPP names a directory.
4506if test -n "$CPP" && test -d "$CPP"; then
4507 CPP=
4508fi
4509if test -z "$CPP"; then
4510 if ${ac_cv_prog_CPP+:} false; then :
4511 $as_echo_n "(cached) " >&6
4512else
4513 # Double quotes because CPP needs to be expanded
4514 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4515 do
4516 ac_preproc_ok=false
4517for ac_c_preproc_warn_flag in '' yes
4518do
4519 # Use a header file that comes with gcc, so configuring glibc
4520 # with a fresh cross-compiler works.
4521 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4522 # <limits.h> exists even on freestanding compilers.
4523 # On the NeXT, cc -E runs the code through the compiler's parser,
4524 # not just through cpp. "Syntax error" is here to catch this case.
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526/* end confdefs.h. */
4527#ifdef __STDC__
4528# include <limits.h>
4529#else
4530# include <assert.h>
4531#endif
4532 Syntax error
4533_ACEOF
4534if ac_fn_c_try_cpp "$LINENO"; then :
4535
4536else
4537 # Broken: fails on valid input.
4538continue
4539fi
4540rm -f conftest.err conftest.i conftest.$ac_ext
4541
4542 # OK, works on sane cases. Now check whether nonexistent headers
4543 # can be detected and how.
4544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4545/* end confdefs.h. */
4546#include <ac_nonexistent.h>
4547_ACEOF
4548if ac_fn_c_try_cpp "$LINENO"; then :
4549 # Broken: success on invalid input.
4550continue
4551else
4552 # Passes both tests.
4553ac_preproc_ok=:
4554break
4555fi
4556rm -f conftest.err conftest.i conftest.$ac_ext
4557
4558done
4559# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4560rm -f conftest.i conftest.err conftest.$ac_ext
4561if $ac_preproc_ok; then :
4562 break
4563fi
4564
4565 done
4566 ac_cv_prog_CPP=$CPP
4567
4568fi
4569 CPP=$ac_cv_prog_CPP
4570else
4571 ac_cv_prog_CPP=$CPP
4572fi
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4574$as_echo "$CPP" >&6; }
4575ac_preproc_ok=false
4576for ac_c_preproc_warn_flag in '' yes
4577do
4578 # Use a header file that comes with gcc, so configuring glibc
4579 # with a fresh cross-compiler works.
4580 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4581 # <limits.h> exists even on freestanding compilers.
4582 # On the NeXT, cc -E runs the code through the compiler's parser,
4583 # not just through cpp. "Syntax error" is here to catch this case.
4584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4585/* end confdefs.h. */
4586#ifdef __STDC__
4587# include <limits.h>
4588#else
4589# include <assert.h>
4590#endif
4591 Syntax error
4592_ACEOF
4593if ac_fn_c_try_cpp "$LINENO"; then :
4594
4595else
4596 # Broken: fails on valid input.
4597continue
4598fi
4599rm -f conftest.err conftest.i conftest.$ac_ext
4600
4601 # OK, works on sane cases. Now check whether nonexistent headers
4602 # can be detected and how.
4603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4604/* end confdefs.h. */
4605#include <ac_nonexistent.h>
4606_ACEOF
4607if ac_fn_c_try_cpp "$LINENO"; then :
4608 # Broken: success on invalid input.
4609continue
4610else
4611 # Passes both tests.
4612ac_preproc_ok=:
4613break
4614fi
4615rm -f conftest.err conftest.i conftest.$ac_ext
4616
4617done
4618# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4619rm -f conftest.i conftest.err conftest.$ac_ext
4620if $ac_preproc_ok; then :
4621
4622else
4623 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4624$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4625as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4626See \`config.log' for more details" "$LINENO" 5; }
4627fi
4628
4629ac_ext=c
4630ac_cpp='$CPP $CPPFLAGS'
4631ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4632ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4633ac_compiler_gnu=$ac_cv_c_compiler_gnu
4634
4635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4636$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4637if ${ac_cv_path_GREP+:} false; then :
4638 $as_echo_n "(cached) " >&6
4639else
4640 if test -z "$GREP"; then
4641 ac_path_GREP_found=false
4642 # Loop through the user's path and test for each of PROGNAME-LIST
4643 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4644for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4645do
4646 IFS=$as_save_IFS
4647 test -z "$as_dir" && as_dir=.
4648 for ac_prog in grep ggrep; do
4649 for ac_exec_ext in '' $ac_executable_extensions; do
4650 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4651 as_fn_executable_p "$ac_path_GREP" || continue
4652# Check for GNU ac_path_GREP and select it if it is found.
4653 # Check for GNU $ac_path_GREP
4654case `"$ac_path_GREP" --version 2>&1` in
4655*GNU*)
4656 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4657*)
4658 ac_count=0
4659 $as_echo_n 0123456789 >"conftest.in"
4660 while :
4661 do
4662 cat "conftest.in" "conftest.in" >"conftest.tmp"
4663 mv "conftest.tmp" "conftest.in"
4664 cp "conftest.in" "conftest.nl"
4665 $as_echo 'GREP' >> "conftest.nl"
4666 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4667 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4668 as_fn_arith $ac_count + 1 && ac_count=$as_val
4669 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4670 # Best one so far, save it but keep looking for a better one
4671 ac_cv_path_GREP="$ac_path_GREP"
4672 ac_path_GREP_max=$ac_count
4673 fi
4674 # 10*(2^10) chars as input seems more than enough
4675 test $ac_count -gt 10 && break
4676 done
4677 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4678esac
4679
4680 $ac_path_GREP_found && break 3
4681 done
4682 done
4683 done
4684IFS=$as_save_IFS
4685 if test -z "$ac_cv_path_GREP"; then
4686 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4687 fi
4688else
4689 ac_cv_path_GREP=$GREP
4690fi
4691
4692fi
4693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4694$as_echo "$ac_cv_path_GREP" >&6; }
4695 GREP="$ac_cv_path_GREP"
4696
4697
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004698
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004699
4700
Matthias Kloseb9621712010-04-24 17:59:49 +00004701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4702$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004703
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004704# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004705if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004706 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004707
4708 case $withval in
4709 no) with_cxx_main=no
4710 MAINCC='$(CC)';;
4711 yes) with_cxx_main=yes
4712 MAINCC='$(CXX)';;
4713 *) with_cxx_main=yes
4714 MAINCC=$withval
4715 if test -z "$CXX"
4716 then
4717 CXX=$withval
4718 fi;;
4719 esac
4720else
4721
4722 with_cxx_main=no
4723 MAINCC='$(CC)'
4724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004725fi
4726
Matthias Kloseb9621712010-04-24 17:59:49 +00004727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4728$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004729
4730preset_cxx="$CXX"
4731if test -z "$CXX"
4732then
4733 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004734 gcc) if test -n "$ac_tool_prefix"; then
4735 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4736set dummy ${ac_tool_prefix}g++; ac_word=$2
4737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738$as_echo_n "checking for $ac_word... " >&6; }
4739if ${ac_cv_path_CXX+:} false; then :
4740 $as_echo_n "(cached) " >&6
4741else
4742 case $CXX in
4743 [\\/]* | ?:[\\/]*)
4744 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4745 ;;
4746 *)
4747 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748for as_dir in notfound
4749do
4750 IFS=$as_save_IFS
4751 test -z "$as_dir" && as_dir=.
4752 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004753 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4755 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4756 break 2
4757 fi
4758done
4759 done
4760IFS=$as_save_IFS
4761
4762 ;;
4763esac
4764fi
4765CXX=$ac_cv_path_CXX
4766if test -n "$CXX"; then
4767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4768$as_echo "$CXX" >&6; }
4769else
4770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771$as_echo "no" >&6; }
4772fi
4773
4774
4775fi
4776if test -z "$ac_cv_path_CXX"; then
4777 ac_pt_CXX=$CXX
4778 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004779set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4781$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004782if ${ac_cv_path_ac_pt_CXX+:} false; then :
4783 $as_echo_n "(cached) " >&6
4784else
4785 case $ac_pt_CXX in
4786 [\\/]* | ?:[\\/]*)
4787 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4788 ;;
4789 *)
4790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4791for as_dir in notfound
4792do
4793 IFS=$as_save_IFS
4794 test -z "$as_dir" && as_dir=.
4795 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004797 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4799 break 2
4800 fi
4801done
4802 done
4803IFS=$as_save_IFS
4804
4805 ;;
4806esac
4807fi
4808ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4809if test -n "$ac_pt_CXX"; then
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4811$as_echo "$ac_pt_CXX" >&6; }
4812else
4813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814$as_echo "no" >&6; }
4815fi
4816
4817 if test "x$ac_pt_CXX" = x; then
4818 CXX="g++"
4819 else
4820 case $cross_compiling:$ac_tool_warned in
4821yes:)
4822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4824ac_tool_warned=yes ;;
4825esac
4826 CXX=$ac_pt_CXX
4827 fi
4828else
4829 CXX="$ac_cv_path_CXX"
4830fi
4831 ;;
4832 cc) if test -n "$ac_tool_prefix"; then
4833 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4834set dummy ${ac_tool_prefix}c++; ac_word=$2
4835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4836$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004837if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004839else
4840 case $CXX in
4841 [\\/]* | ?:[\\/]*)
4842 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4843 ;;
4844 *)
4845 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4846for as_dir in notfound
4847do
4848 IFS=$as_save_IFS
4849 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004850 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004851 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004852 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004853 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004854 break 2
4855 fi
4856done
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004858IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004859
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004860 ;;
4861esac
4862fi
4863CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004864if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4866$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004867else
Matthias Kloseb9621712010-04-24 17:59:49 +00004868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4869$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004871
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004872
4873fi
4874if test -z "$ac_cv_path_CXX"; then
4875 ac_pt_CXX=$CXX
4876 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004877set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4879$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004880if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004881 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004882else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004883 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004884 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004885 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 +00004886 ;;
4887 *)
4888 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4889for as_dir in notfound
4890do
4891 IFS=$as_save_IFS
4892 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004893 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004894 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004895 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004897 break 2
4898 fi
4899done
Matthias Kloseb9621712010-04-24 17:59:49 +00004900 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004901IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004902
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004903 ;;
4904esac
4905fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004906ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4907if test -n "$ac_pt_CXX"; then
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4909$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004910else
Matthias Kloseb9621712010-04-24 17:59:49 +00004911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4912$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004914
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004915 if test "x$ac_pt_CXX" = x; then
4916 CXX="c++"
4917 else
4918 case $cross_compiling:$ac_tool_warned in
4919yes:)
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4921$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4922ac_tool_warned=yes ;;
4923esac
4924 CXX=$ac_pt_CXX
4925 fi
4926else
4927 CXX="$ac_cv_path_CXX"
4928fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004929 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004930 clang|*/clang) if test -n "$ac_tool_prefix"; then
4931 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4932set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4934$as_echo_n "checking for $ac_word... " >&6; }
4935if ${ac_cv_path_CXX+:} false; then :
4936 $as_echo_n "(cached) " >&6
4937else
4938 case $CXX in
4939 [\\/]* | ?:[\\/]*)
4940 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4941 ;;
4942 *)
4943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4944for as_dir in notfound
4945do
4946 IFS=$as_save_IFS
4947 test -z "$as_dir" && as_dir=.
4948 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004949 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004950 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4952 break 2
4953 fi
4954done
4955 done
4956IFS=$as_save_IFS
4957
Ned Deilycbfb9a52012-06-23 16:02:19 -07004958 ;;
4959esac
4960fi
4961CXX=$ac_cv_path_CXX
4962if test -n "$CXX"; then
4963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4964$as_echo "$CXX" >&6; }
4965else
4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4967$as_echo "no" >&6; }
4968fi
4969
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004970
4971fi
4972if test -z "$ac_cv_path_CXX"; then
4973 ac_pt_CXX=$CXX
4974 # Extract the first word of "clang++", so it can be a program name with args.
4975set dummy clang++; ac_word=$2
4976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4977$as_echo_n "checking for $ac_word... " >&6; }
4978if ${ac_cv_path_ac_pt_CXX+:} false; then :
4979 $as_echo_n "(cached) " >&6
4980else
4981 case $ac_pt_CXX in
4982 [\\/]* | ?:[\\/]*)
4983 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4984 ;;
4985 *)
4986 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4987for as_dir in notfound
4988do
4989 IFS=$as_save_IFS
4990 test -z "$as_dir" && as_dir=.
4991 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004993 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4995 break 2
4996 fi
4997done
4998 done
4999IFS=$as_save_IFS
5000
5001 ;;
5002esac
5003fi
5004ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5005if test -n "$ac_pt_CXX"; then
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5007$as_echo "$ac_pt_CXX" >&6; }
5008else
5009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5010$as_echo "no" >&6; }
5011fi
5012
5013 if test "x$ac_pt_CXX" = x; then
5014 CXX="clang++"
5015 else
5016 case $cross_compiling:$ac_tool_warned in
5017yes:)
5018{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5019$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5020ac_tool_warned=yes ;;
5021esac
5022 CXX=$ac_pt_CXX
5023 fi
5024else
5025 CXX="$ac_cv_path_CXX"
5026fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005027 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005028 icc|*/icc) if test -n "$ac_tool_prefix"; then
5029 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5030set dummy ${ac_tool_prefix}icpc; ac_word=$2
5031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5032$as_echo_n "checking for $ac_word... " >&6; }
5033if ${ac_cv_path_CXX+:} false; then :
5034 $as_echo_n "(cached) " >&6
5035else
5036 case $CXX in
5037 [\\/]* | ?:[\\/]*)
5038 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5039 ;;
5040 *)
5041 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5042for as_dir in notfound
5043do
5044 IFS=$as_save_IFS
5045 test -z "$as_dir" && as_dir=.
5046 for ac_exec_ext in '' $ac_executable_extensions; do
5047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5048 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5050 break 2
5051 fi
5052done
5053 done
5054IFS=$as_save_IFS
5055
5056 ;;
5057esac
5058fi
5059CXX=$ac_cv_path_CXX
5060if test -n "$CXX"; then
5061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5062$as_echo "$CXX" >&6; }
5063else
5064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5065$as_echo "no" >&6; }
5066fi
5067
5068
5069fi
5070if test -z "$ac_cv_path_CXX"; then
5071 ac_pt_CXX=$CXX
5072 # Extract the first word of "icpc", so it can be a program name with args.
5073set dummy icpc; ac_word=$2
5074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5075$as_echo_n "checking for $ac_word... " >&6; }
5076if ${ac_cv_path_ac_pt_CXX+:} false; then :
5077 $as_echo_n "(cached) " >&6
5078else
5079 case $ac_pt_CXX in
5080 [\\/]* | ?:[\\/]*)
5081 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5082 ;;
5083 *)
5084 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085for as_dir in notfound
5086do
5087 IFS=$as_save_IFS
5088 test -z "$as_dir" && as_dir=.
5089 for ac_exec_ext in '' $ac_executable_extensions; do
5090 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5091 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5092 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5093 break 2
5094 fi
5095done
5096 done
5097IFS=$as_save_IFS
5098
5099 ;;
5100esac
5101fi
5102ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5103if test -n "$ac_pt_CXX"; then
5104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5105$as_echo "$ac_pt_CXX" >&6; }
5106else
5107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5108$as_echo "no" >&6; }
5109fi
5110
5111 if test "x$ac_pt_CXX" = x; then
5112 CXX="icpc"
5113 else
5114 case $cross_compiling:$ac_tool_warned in
5115yes:)
5116{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5117$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5118ac_tool_warned=yes ;;
5119esac
5120 CXX=$ac_pt_CXX
5121 fi
5122else
5123 CXX="$ac_cv_path_CXX"
5124fi
5125 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005126 esac
5127 if test "$CXX" = "notfound"
5128 then
5129 CXX=""
5130 fi
5131fi
5132if test -z "$CXX"
5133then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005134 if test -n "$ac_tool_prefix"; then
5135 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5136 do
5137 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5138set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5140$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005141if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005142 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005143else
5144 if test -n "$CXX"; then
5145 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5146else
5147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5148for as_dir in $PATH
5149do
5150 IFS=$as_save_IFS
5151 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005152 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005153 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005154 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005155 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005156 break 2
5157 fi
5158done
Matthias Kloseb9621712010-04-24 17:59:49 +00005159 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005160IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005161
5162fi
5163fi
5164CXX=$ac_cv_prog_CXX
5165if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5167$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005168else
Matthias Kloseb9621712010-04-24 17:59:49 +00005169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5170$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005171fi
5172
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005173
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005174 test -n "$CXX" && break
5175 done
5176fi
5177if test -z "$CXX"; then
5178 ac_ct_CXX=$CXX
5179 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5180do
5181 # Extract the first word of "$ac_prog", so it can be a program name with args.
5182set dummy $ac_prog; ac_word=$2
5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5184$as_echo_n "checking for $ac_word... " >&6; }
5185if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5186 $as_echo_n "(cached) " >&6
5187else
5188 if test -n "$ac_ct_CXX"; then
5189 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5190else
5191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5192for as_dir in $PATH
5193do
5194 IFS=$as_save_IFS
5195 test -z "$as_dir" && as_dir=.
5196 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005197 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005198 ac_cv_prog_ac_ct_CXX="$ac_prog"
5199 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5200 break 2
5201 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005202done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005203 done
5204IFS=$as_save_IFS
5205
5206fi
5207fi
5208ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5209if test -n "$ac_ct_CXX"; then
5210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5211$as_echo "$ac_ct_CXX" >&6; }
5212else
5213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5214$as_echo "no" >&6; }
5215fi
5216
5217
5218 test -n "$ac_ct_CXX" && break
5219done
5220
5221 if test "x$ac_ct_CXX" = x; then
5222 CXX="notfound"
5223 else
5224 case $cross_compiling:$ac_tool_warned in
5225yes:)
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5227$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5228ac_tool_warned=yes ;;
5229esac
5230 CXX=$ac_ct_CXX
5231 fi
5232fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005233
5234 if test "$CXX" = "notfound"
5235 then
5236 CXX=""
5237 fi
5238fi
5239if test "$preset_cxx" != "$CXX"
5240then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005241 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005242
5243 By default, distutils will build C++ extension modules with \"$CXX\".
5244 If this is not intended, then set CXX on the configure command line.
5245 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005246$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005247
5248 By default, distutils will build C++ extension modules with \"$CXX\".
5249 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005250 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005251fi
5252
5253
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005254MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5255
5256
5257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5258$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5259cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005260#undef bfin
5261#undef cris
5262#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005263#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005264#undef hppa
5265#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005266#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005267#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005268#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005269#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005270#undef unix
5271#if defined(__linux__)
5272# if defined(__x86_64__) && defined(__LP64__)
5273 x86_64-linux-gnu
5274# elif defined(__x86_64__) && defined(__ILP32__)
5275 x86_64-linux-gnux32
5276# elif defined(__i386__)
5277 i386-linux-gnu
5278# elif defined(__aarch64__) && defined(__AARCH64EL__)
5279# if defined(__ILP32__)
5280 aarch64_ilp32-linux-gnu
5281# else
5282 aarch64-linux-gnu
5283# endif
5284# elif defined(__aarch64__) && defined(__AARCH64EB__)
5285# if defined(__ILP32__)
5286 aarch64_be_ilp32-linux-gnu
5287# else
5288 aarch64_be-linux-gnu
5289# endif
5290# elif defined(__alpha__)
5291 alpha-linux-gnu
5292# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5293# if defined(__ARMEL__)
5294 arm-linux-gnueabihf
5295# else
5296 armeb-linux-gnueabihf
5297# endif
5298# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5299# if defined(__ARMEL__)
5300 arm-linux-gnueabi
5301# else
5302 armeb-linux-gnueabi
5303# endif
5304# elif defined(__hppa__)
5305 hppa-linux-gnu
5306# elif defined(__ia64__)
5307 ia64-linux-gnu
5308# elif defined(__m68k__) && !defined(__mcoldfire__)
5309 m68k-linux-gnu
5310# elif defined(__mips_hard_float) && defined(_MIPSEL)
5311# if _MIPS_SIM == _ABIO32
5312 mipsel-linux-gnu
5313# elif _MIPS_SIM == _ABIN32
5314 mips64el-linux-gnuabin32
5315# elif _MIPS_SIM == _ABI64
5316 mips64el-linux-gnuabi64
5317# else
5318# error unknown platform triplet
5319# endif
5320# elif defined(__mips_hard_float)
5321# if _MIPS_SIM == _ABIO32
5322 mips-linux-gnu
5323# elif _MIPS_SIM == _ABIN32
5324 mips64-linux-gnuabin32
5325# elif _MIPS_SIM == _ABI64
5326 mips64-linux-gnuabi64
5327# else
5328# error unknown platform triplet
5329# endif
5330# elif defined(__or1k__)
5331 or1k-linux-gnu
5332# elif defined(__powerpc__) && defined(__SPE__)
5333 powerpc-linux-gnuspe
5334# elif defined(__powerpc64__)
5335# if defined(__LITTLE_ENDIAN__)
5336 powerpc64le-linux-gnu
5337# else
5338 powerpc64-linux-gnu
5339# endif
5340# elif defined(__powerpc__)
5341 powerpc-linux-gnu
5342# elif defined(__s390x__)
5343 s390x-linux-gnu
5344# elif defined(__s390__)
5345 s390-linux-gnu
5346# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5347 sh4-linux-gnu
5348# elif defined(__sparc__) && defined(__arch64__)
5349 sparc64-linux-gnu
5350# elif defined(__sparc__)
5351 sparc-linux-gnu
5352# else
5353# error unknown platform triplet
5354# endif
5355#elif defined(__FreeBSD_kernel__)
5356# if defined(__LP64__)
5357 x86_64-kfreebsd-gnu
5358# elif defined(__i386__)
5359 i386-kfreebsd-gnu
5360# else
5361# error unknown platform triplet
5362# endif
5363#elif defined(__gnu_hurd__)
5364 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005365#elif defined(__APPLE__)
5366 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005367#else
5368# error unknown platform triplet
5369#endif
5370
5371EOF
5372
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005373if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005374 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5376$as_echo "$PLATFORM_TRIPLET" >&6; }
5377else
5378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5379$as_echo "none" >&6; }
5380fi
5381rm -f conftest.c conftest.out
5382
5383if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5384 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5385 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5386 fi
5387fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005388if test x$PLATFORM_TRIPLET = x; then
5389 PLATDIR=plat-$MACHDEP
5390else
5391 PLATDIR=plat-$PLATFORM_TRIPLET
5392fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005393
5394
doko@ubuntu.com55532312016-06-14 08:55:19 +02005395if test x$MULTIARCH != x; then
5396 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5397fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005398
5399
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5401$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5402save_LDFLAGS="$LDFLAGS"
5403LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005404
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5406/* end confdefs.h. */
5407
5408int
5409main ()
5410{
5411
5412 ;
5413 return 0;
5414}
5415_ACEOF
5416if ac_fn_c_try_link "$LINENO"; then :
5417 NO_AS_NEEDED="-Wl,--no-as-needed"
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5419$as_echo "yes" >&6; }
5420else
5421 NO_AS_NEEDED=""
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5423$as_echo "no" >&6; }
5424fi
5425rm -f core conftest.err conftest.$ac_objext \
5426 conftest$ac_exeext conftest.$ac_ext
5427LDFLAGS="$save_LDFLAGS"
5428
5429
5430
5431# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432
Matthias Kloseb9621712010-04-24 17:59:49 +00005433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5434$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005435if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005436 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005437else
5438 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5439 then ac_cv_path_EGREP="$GREP -E"
5440 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005442 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 # Loop through the user's path and test for each of PROGNAME-LIST
5444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5446do
5447 IFS=$as_save_IFS
5448 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005449 for ac_prog in egrep; do
5450 for ac_exec_ext in '' $ac_executable_extensions; do
5451 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005452 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005453# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005454 # Check for GNU $ac_path_EGREP
5455case `"$ac_path_EGREP" --version 2>&1` in
5456*GNU*)
5457 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5458*)
5459 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005461 while :
5462 do
5463 cat "conftest.in" "conftest.in" >"conftest.tmp"
5464 mv "conftest.tmp" "conftest.in"
5465 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005466 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005467 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5468 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005469 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005470 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5471 # Best one so far, save it but keep looking for a better one
5472 ac_cv_path_EGREP="$ac_path_EGREP"
5473 ac_path_EGREP_max=$ac_count
5474 fi
5475 # 10*(2^10) chars as input seems more than enough
5476 test $ac_count -gt 10 && break
5477 done
5478 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5479esac
5480
Matthias Kloseb9621712010-04-24 17:59:49 +00005481 $ac_path_EGREP_found && break 3
5482 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005483 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005484 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005485IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005486 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005487 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 +00005488 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005489else
5490 ac_cv_path_EGREP=$EGREP
5491fi
5492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005493 fi
5494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5496$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005497 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005498
5499
Matthias Kloseb9621712010-04-24 17:59:49 +00005500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5501$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005502if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005503 $as_echo_n "(cached) " >&6
5504else
5505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005506/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005507#include <stdlib.h>
5508#include <stdarg.h>
5509#include <string.h>
5510#include <float.h>
5511
5512int
5513main ()
5514{
5515
5516 ;
5517 return 0;
5518}
5519_ACEOF
5520if ac_fn_c_try_compile "$LINENO"; then :
5521 ac_cv_header_stdc=yes
5522else
5523 ac_cv_header_stdc=no
5524fi
5525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5526
5527if test $ac_cv_header_stdc = yes; then
5528 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5530/* end confdefs.h. */
5531#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005532
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005533_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005534if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005535 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005537else
Matthias Kloseb9621712010-04-24 17:59:49 +00005538 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005539fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005540rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541
Matthias Kloseb9621712010-04-24 17:59:49 +00005542fi
5543
5544if test $ac_cv_header_stdc = yes; then
5545 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5547/* end confdefs.h. */
5548#include <stdlib.h>
5549
5550_ACEOF
5551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5552 $EGREP "free" >/dev/null 2>&1; then :
5553
5554else
5555 ac_cv_header_stdc=no
5556fi
5557rm -f conftest*
5558
5559fi
5560
5561if test $ac_cv_header_stdc = yes; then
5562 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5563 if test "$cross_compiling" = yes; then :
5564 :
5565else
5566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5567/* end confdefs.h. */
5568#include <ctype.h>
5569#include <stdlib.h>
5570#if ((' ' & 0x0FF) == 0x020)
5571# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5572# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5573#else
5574# define ISLOWER(c) \
5575 (('a' <= (c) && (c) <= 'i') \
5576 || ('j' <= (c) && (c) <= 'r') \
5577 || ('s' <= (c) && (c) <= 'z'))
5578# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5579#endif
5580
5581#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5582int
5583main ()
5584{
5585 int i;
5586 for (i = 0; i < 256; i++)
5587 if (XOR (islower (i), ISLOWER (i))
5588 || toupper (i) != TOUPPER (i))
5589 return 2;
5590 return 0;
5591}
5592_ACEOF
5593if ac_fn_c_try_run "$LINENO"; then :
5594
5595else
5596 ac_cv_header_stdc=no
5597fi
5598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5599 conftest.$ac_objext conftest.beam conftest.$ac_ext
5600fi
5601
5602fi
5603fi
5604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5605$as_echo "$ac_cv_header_stdc" >&6; }
5606if test $ac_cv_header_stdc = yes; then
5607
5608$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5609
5610fi
5611
5612# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5613for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5614 inttypes.h stdint.h unistd.h
5615do :
5616 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5617ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5618"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005619if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005620 cat >>confdefs.h <<_ACEOF
5621#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5622_ACEOF
5623
5624fi
5625
5626done
5627
5628
5629
5630 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 +02005631if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005632 MINIX=yes
5633else
5634 MINIX=
5635fi
5636
5637
5638 if test "$MINIX" = yes; then
5639
5640$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5641
5642
5643$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5644
5645
5646$as_echo "#define _MINIX 1" >>confdefs.h
5647
5648 fi
5649
5650
5651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5652$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005653if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 $as_echo_n "(cached) " >&6
5655else
5656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5657/* end confdefs.h. */
5658
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005659# define __EXTENSIONS__ 1
5660 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005661int
5662main ()
5663{
5664
5665 ;
5666 return 0;
5667}
5668_ACEOF
5669if ac_fn_c_try_compile "$LINENO"; then :
5670 ac_cv_safe_to_define___extensions__=yes
5671else
5672 ac_cv_safe_to_define___extensions__=no
5673fi
5674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5675fi
5676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5677$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5678 test $ac_cv_safe_to_define___extensions__ = yes &&
5679 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5680
5681 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5682
5683 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5684
5685 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5686
5687 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5688
5689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690
Xavier de Gaye95750b12016-07-09 11:05:42 +02005691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5692$as_echo_n "checking for the Android API level... " >&6; }
5693cat >> conftest.c <<EOF
5694#ifdef __ANDROID__
5695#include <android/api-level.h>
5696__ANDROID_API__
5697#else
5698#error not Android
5699#endif
5700EOF
5701
5702if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5703 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5705$as_echo "$ANDROID_API_LEVEL" >&6; }
5706
5707cat >>confdefs.h <<_ACEOF
5708#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5709_ACEOF
5710
5711else
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5713$as_echo "not Android" >&6; }
5714fi
5715rm -f conftest.c conftest.out
5716
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717# Check for unsupported systems
5718case $ac_sys_system/$ac_sys_release in
5719atheos*|Linux*/1*)
5720 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5721 echo See README for details.
5722 exit 1;;
5723esac
5724
5725
Matthias Kloseb9621712010-04-24 17:59:49 +00005726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5727$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728
5729# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005730if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731 withval=$with_suffix;
5732 case $withval in
5733 no) EXEEXT=;;
5734 yes) EXEEXT=.exe;;
5735 *) EXEEXT=$withval;;
5736 esac
5737fi
5738
Matthias Kloseb9621712010-04-24 17:59:49 +00005739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5740$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005741
5742# Test whether we're running on a non-case-sensitive system, in which
5743# case we give a warning if no ext is given
5744
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5746$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747if test ! -d CaseSensitiveTestDir; then
5748mkdir CaseSensitiveTestDir
5749fi
5750
5751if test -d casesensitivetestdir
5752then
Matthias Kloseb9621712010-04-24 17:59:49 +00005753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5754$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005755 BUILDEXEEXT=.exe
5756else
Matthias Kloseb9621712010-04-24 17:59:49 +00005757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5758$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759 BUILDEXEEXT=$EXEEXT
5760fi
5761rmdir CaseSensitiveTestDir
5762
5763case $MACHDEP in
5764bsdos*)
5765 case $CC in
5766 gcc) CC="$CC -D_HAVE_BSDI";;
5767 esac;;
5768esac
5769
5770case $ac_sys_system in
5771hp*|HP*)
5772 case $CC in
5773 cc|*/cc) CC="$CC -Ae";;
5774 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775esac
5776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5779$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780if test -z "$LIBRARY"
5781then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005782 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5785$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786
5787# LDLIBRARY is the name of the library to link against (as opposed to the
5788# name of the library into which to insert object files). BLDLIBRARY is also
5789# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5790# is blank as the main program is not linked directly against LDLIBRARY.
5791# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5792# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5793# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5794# DLLLIBRARY is the shared (i.e., DLL) library.
5795#
5796# RUNSHARED is used to run shared python without installed libraries
5797#
5798# INSTSONAME is the name of the shared library that will be use to install
5799# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005800#
5801# LDVERSION is the shared library version number, normally the Python version
5802# with the ABI build flags appended.
5803
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005804
5805
5806
5807
5808
5809
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005810
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005811LDLIBRARY="$LIBRARY"
5812BLDLIBRARY='$(LDLIBRARY)'
5813INSTSONAME='$(LDLIBRARY)'
5814DLLLIBRARY=''
5815LDLIBRARYDIR=''
5816RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005817LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005818
5819# LINKCC is the command that links the python executable -- default is $(CC).
5820# If CXX is set, and if it is needed to link a main function that was
5821# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5822# python might then depend on the C++ runtime
5823# This is altered for AIX in order to build the export list before
5824# linking.
5825
Matthias Kloseb9621712010-04-24 17:59:49 +00005826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5827$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005828if test -z "$LINKCC"
5829then
5830 LINKCC='$(PURIFY) $(MAINCC)'
5831 case $ac_sys_system in
5832 AIX*)
5833 exp_extra="\"\""
5834 if test $ac_sys_release -ge 5 -o \
5835 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5836 exp_extra="."
5837 fi
5838 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839 QNX*)
5840 # qcc must be used because the other compilers do not
5841 # support -N.
5842 LINKCC=qcc;;
5843 esac
5844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5846$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005847
5848# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5849# make sure we default having it set to "no": this is used by
5850# distutils.unixccompiler to know if it should add --enable-new-dtags
5851# to linker command lines, and failing to detect GNU ld simply results
5852# in the same bahaviour as before.
5853
Matthias Kloseb9621712010-04-24 17:59:49 +00005854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5855$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005856ac_prog=ld
5857if test "$GCC" = yes; then
5858 ac_prog=`$CC -print-prog-name=ld`
5859fi
5860case `"$ac_prog" -V 2>&1 < /dev/null` in
5861 *GNU*)
5862 GNULD=yes;;
5863 *)
5864 GNULD=no;;
5865esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5867$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005868
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5870$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005871if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005872 $as_echo_n "(cached) " >&6
5873else
5874 ac_cv_c_inline=no
5875for ac_kw in inline __inline__ __inline; do
5876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5877/* end confdefs.h. */
5878#ifndef __cplusplus
5879typedef int foo_t;
5880static $ac_kw foo_t static_foo () {return 0; }
5881$ac_kw foo_t foo () {return 0; }
5882#endif
5883
5884_ACEOF
5885if ac_fn_c_try_compile "$LINENO"; then :
5886 ac_cv_c_inline=$ac_kw
5887fi
5888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5889 test "$ac_cv_c_inline" != no && break
5890done
5891
5892fi
5893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5894$as_echo "$ac_cv_c_inline" >&6; }
5895
5896case $ac_cv_c_inline in
5897 inline | yes) ;;
5898 *)
5899 case $ac_cv_c_inline in
5900 no) ac_val=;;
5901 *) ac_val=$ac_cv_c_inline;;
5902 esac
5903 cat >>confdefs.h <<_ACEOF
5904#ifndef __cplusplus
5905#define inline $ac_val
5906#endif
5907_ACEOF
5908 ;;
5909esac
5910
5911if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005912
5913$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005914
5915
5916fi
5917
5918
Matthias Kloseb9621712010-04-24 17:59:49 +00005919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5920$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005921# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005922if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 enableval=$enable_shared;
5924fi
5925
5926
5927if test -z "$enable_shared"
5928then
5929 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005930 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005931 enable_shared="yes";;
5932 *)
5933 enable_shared="no";;
5934 esac
5935fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5937$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938
Matthias Kloseb9621712010-04-24 17:59:49 +00005939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5940$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005941# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005942if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005943 enableval=$enable_profiling;
5944fi
5945
5946if test "x$enable_profiling" = xyes; then
5947 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005948 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950/* end confdefs.h. */
5951int main() { return 0; }
5952_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005953if ac_fn_c_try_link "$LINENO"; then :
5954
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005956 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005957fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005958rm -f core conftest.err conftest.$ac_objext \
5959 conftest$ac_exeext conftest.$ac_ext
5960 CC="$ac_save_cc"
5961else
5962 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005963fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5965$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966
doko@ubuntu.comba015832012-06-30 16:52:05 +02005967if test "x$enable_profiling" = xyes; then
5968 BASECFLAGS="-pg $BASECFLAGS"
5969 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005970fi
5971
Matthias Kloseb9621712010-04-24 17:59:49 +00005972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5973$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974
5975# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5976# library that we build, but we do not want to link against it (we
5977# will find it with a -framework option). For this reason there is an
5978# extra variable BLDLIBRARY against which Python and the extension
5979# modules are linked, BLDLIBRARY. This is normally the same as
5980# LDLIBRARY, but empty for MacOSX framework builds.
5981if test "$enable_framework"
5982then
5983 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005984 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985 BLDLIBRARY=''
5986else
5987 BLDLIBRARY='$(LDLIBRARY)'
5988fi
5989
5990# Other platforms follow
5991if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005992 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993
Matthias Kloseb9621712010-04-24 17:59:49 +00005994$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005995
5996 case $ac_sys_system in
5997 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005998 LDLIBRARY='libpython$(LDVERSION).dll.a'
5999 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006000 ;;
6001 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006002 LDLIBRARY='libpython$(LDVERSION).so'
6003 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006004 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006006 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006007 then
6008 PY3LIBRARY=libpython3.so
6009 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006010 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02006011 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006012 LDLIBRARY='libpython$(LDVERSION).so'
6013 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006014 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006015 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006016 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006017 then
6018 PY3LIBRARY=libpython3.so
6019 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020 ;;
6021 hp*|HP*)
6022 case `uname -m` in
6023 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006024 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025 ;;
6026 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006027 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028 ;;
6029 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006030 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006031 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006034 LDLIBRARY='libpython$(LDVERSION).dylib'
6035 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006036 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006038 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006039 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006040 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006041 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042
6043 esac
6044else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006045 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006046 case $ac_sys_system in
6047 CYGWIN*)
6048 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006049 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 ;;
6051 esac
6052fi
6053
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006054if test "$cross_compiling" = yes; then
6055 RUNSHARED=
6056fi
6057
Matthias Kloseb9621712010-04-24 17:59:49 +00006058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6059$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060
6061if test -n "$ac_tool_prefix"; then
6062 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6063set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6065$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006066if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068else
6069 if test -n "$RANLIB"; then
6070 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6071else
6072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6073for as_dir in $PATH
6074do
6075 IFS=$as_save_IFS
6076 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006077 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006078 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006080 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006081 break 2
6082 fi
6083done
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006085IFS=$as_save_IFS
6086
6087fi
6088fi
6089RANLIB=$ac_cv_prog_RANLIB
6090if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6092$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006093else
Matthias Kloseb9621712010-04-24 17:59:49 +00006094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6095$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096fi
6097
6098
6099fi
6100if test -z "$ac_cv_prog_RANLIB"; then
6101 ac_ct_RANLIB=$RANLIB
6102 # Extract the first word of "ranlib", so it can be a program name with args.
6103set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6105$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006106if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006107 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006108else
6109 if test -n "$ac_ct_RANLIB"; then
6110 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6111else
6112as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6113for as_dir in $PATH
6114do
6115 IFS=$as_save_IFS
6116 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006117 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006118 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006120 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006121 break 2
6122 fi
6123done
Matthias Kloseb9621712010-04-24 17:59:49 +00006124 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006125IFS=$as_save_IFS
6126
6127fi
6128fi
6129ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6130if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6132$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006133else
Matthias Kloseb9621712010-04-24 17:59:49 +00006134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6135$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136fi
6137
6138 if test "x$ac_ct_RANLIB" = x; then
6139 RANLIB=":"
6140 else
6141 case $cross_compiling:$ac_tool_warned in
6142yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006143{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6144$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145ac_tool_warned=yes ;;
6146esac
6147 RANLIB=$ac_ct_RANLIB
6148 fi
6149else
6150 RANLIB="$ac_cv_prog_RANLIB"
6151fi
6152
6153
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006154if test -n "$ac_tool_prefix"; then
6155 for ac_prog in ar aal
6156 do
6157 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6158set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6160$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006161if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006162 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163else
6164 if test -n "$AR"; then
6165 ac_cv_prog_AR="$AR" # Let the user override the test.
6166else
6167as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6168for as_dir in $PATH
6169do
6170 IFS=$as_save_IFS
6171 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006172 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006173 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006174 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006175 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176 break 2
6177 fi
6178done
Matthias Kloseb9621712010-04-24 17:59:49 +00006179 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180IFS=$as_save_IFS
6181
6182fi
6183fi
6184AR=$ac_cv_prog_AR
6185if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6187$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188else
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191fi
6192
6193
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006194 test -n "$AR" && break
6195 done
6196fi
6197if test -z "$AR"; then
6198 ac_ct_AR=$AR
6199 for ac_prog in ar aal
6200do
6201 # Extract the first word of "$ac_prog", so it can be a program name with args.
6202set dummy $ac_prog; ac_word=$2
6203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6204$as_echo_n "checking for $ac_word... " >&6; }
6205if ${ac_cv_prog_ac_ct_AR+:} false; then :
6206 $as_echo_n "(cached) " >&6
6207else
6208 if test -n "$ac_ct_AR"; then
6209 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6210else
6211as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6212for as_dir in $PATH
6213do
6214 IFS=$as_save_IFS
6215 test -z "$as_dir" && as_dir=.
6216 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006217 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006218 ac_cv_prog_ac_ct_AR="$ac_prog"
6219 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6220 break 2
6221 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006222done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006223 done
6224IFS=$as_save_IFS
6225
6226fi
6227fi
6228ac_ct_AR=$ac_cv_prog_ac_ct_AR
6229if test -n "$ac_ct_AR"; then
6230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6231$as_echo "$ac_ct_AR" >&6; }
6232else
6233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6234$as_echo "no" >&6; }
6235fi
6236
6237
6238 test -n "$ac_ct_AR" && break
6239done
6240
6241 if test "x$ac_ct_AR" = x; then
6242 AR="ar"
6243 else
6244 case $cross_compiling:$ac_tool_warned in
6245yes:)
6246{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6247$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6248ac_tool_warned=yes ;;
6249esac
6250 AR=$ac_ct_AR
6251 fi
6252fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006253
6254
6255# tweak ARFLAGS only if the user didn't set it on the command line
6256
6257if test -z "$ARFLAGS"
6258then
6259 ARFLAGS="rc"
6260fi
6261
doko@ubuntu.com58844492012-06-30 18:25:32 +02006262if test -n "$ac_tool_prefix"; then
6263 for ac_prog in readelf
6264 do
6265 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6266set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6268$as_echo_n "checking for $ac_word... " >&6; }
6269if ${ac_cv_prog_READELF+:} false; then :
6270 $as_echo_n "(cached) " >&6
6271else
6272 if test -n "$READELF"; then
6273 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6274else
6275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6276for as_dir in $PATH
6277do
6278 IFS=$as_save_IFS
6279 test -z "$as_dir" && as_dir=.
6280 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006281 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006282 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6283 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6284 break 2
6285 fi
6286done
6287 done
6288IFS=$as_save_IFS
6289
6290fi
6291fi
6292READELF=$ac_cv_prog_READELF
6293if test -n "$READELF"; then
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6295$as_echo "$READELF" >&6; }
6296else
6297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6298$as_echo "no" >&6; }
6299fi
6300
6301
6302 test -n "$READELF" && break
6303 done
6304fi
6305if test -z "$READELF"; then
6306 ac_ct_READELF=$READELF
6307 for ac_prog in readelf
6308do
6309 # Extract the first word of "$ac_prog", so it can be a program name with args.
6310set dummy $ac_prog; ac_word=$2
6311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6312$as_echo_n "checking for $ac_word... " >&6; }
6313if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6314 $as_echo_n "(cached) " >&6
6315else
6316 if test -n "$ac_ct_READELF"; then
6317 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6318else
6319as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6320for as_dir in $PATH
6321do
6322 IFS=$as_save_IFS
6323 test -z "$as_dir" && as_dir=.
6324 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006325 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006326 ac_cv_prog_ac_ct_READELF="$ac_prog"
6327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6328 break 2
6329 fi
6330done
6331 done
6332IFS=$as_save_IFS
6333
6334fi
6335fi
6336ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6337if test -n "$ac_ct_READELF"; then
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6339$as_echo "$ac_ct_READELF" >&6; }
6340else
6341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6342$as_echo "no" >&6; }
6343fi
6344
6345
6346 test -n "$ac_ct_READELF" && break
6347done
6348
6349 if test "x$ac_ct_READELF" = x; then
6350 READELF=":"
6351 else
6352 case $cross_compiling:$ac_tool_warned in
6353yes:)
6354{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6355$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6356ac_tool_warned=yes ;;
6357esac
6358 READELF=$ac_ct_READELF
6359 fi
6360fi
6361
6362if test "$cross_compiling" = yes; then
6363 case "$READELF" in
6364 readelf|:)
6365 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6366 ;;
6367 esac
6368fi
6369
6370
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006371
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006372case $MACHDEP in
6373bsdos*|hp*|HP*)
6374 # install -d does not work on BSDI or HP-UX
6375 if test -z "$INSTALL"
6376 then
6377 INSTALL="${srcdir}/install-sh -c"
6378 fi
6379esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380# Find a good install program. We prefer a C program (faster),
6381# so one script is as good as another. But avoid the broken or
6382# incompatible versions:
6383# SysV /etc/install, /usr/sbin/install
6384# SunOS /usr/etc/install
6385# IRIX /sbin/install
6386# AIX /bin/install
6387# AmigaOS /C/install, which installs bootblocks on floppy discs
6388# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6389# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6390# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6391# OS/2's system install, which has a completely different semantic
6392# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006393# Reject install programs that cannot install multiple files.
6394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6395$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006396if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006397if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006398 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006399else
6400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6401for as_dir in $PATH
6402do
6403 IFS=$as_save_IFS
6404 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006405 # Account for people who put trailing slashes in PATH elements.
6406case $as_dir/ in #((
6407 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006408 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006409 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006410 /usr/ucb/* ) ;;
6411 *)
6412 # OSF1 and SCO ODT 3.0 have their own names for install.
6413 # Don't use installbsd from OSF since it installs stuff as root
6414 # by default.
6415 for ac_prog in ginstall scoinst install; do
6416 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006417 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006418 if test $ac_prog = install &&
6419 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6420 # AIX install. It has an incompatible calling convention.
6421 :
6422 elif test $ac_prog = install &&
6423 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6424 # program-specific install script used by HP pwplus--don't use.
6425 :
6426 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006427 rm -rf conftest.one conftest.two conftest.dir
6428 echo one > conftest.one
6429 echo two > conftest.two
6430 mkdir conftest.dir
6431 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6432 test -s conftest.one && test -s conftest.two &&
6433 test -s conftest.dir/conftest.one &&
6434 test -s conftest.dir/conftest.two
6435 then
6436 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6437 break 3
6438 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006439 fi
6440 fi
6441 done
6442 done
6443 ;;
6444esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006445
6446 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447IFS=$as_save_IFS
6448
Matthias Kloseb9621712010-04-24 17:59:49 +00006449rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450
6451fi
6452 if test "${ac_cv_path_install+set}" = set; then
6453 INSTALL=$ac_cv_path_install
6454 else
6455 # As a last resort, use the slow shell script. Don't cache a
6456 # value for INSTALL within a source directory, because that will
6457 # break other packages using the cache if that directory is
6458 # removed, or if the value is a relative name.
6459 INSTALL=$ac_install_sh
6460 fi
6461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6463$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464
6465# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6466# It thinks the first close brace ends the variable substitution.
6467test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6468
6469test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6470
6471test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6472
Matthias Klose93a0ef12012-03-15 18:08:34 +01006473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6474$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6475if test -z "$MKDIR_P"; then
6476 if ${ac_cv_path_mkdir+:} false; then :
6477 $as_echo_n "(cached) " >&6
6478else
6479 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6480for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6481do
6482 IFS=$as_save_IFS
6483 test -z "$as_dir" && as_dir=.
6484 for ac_prog in mkdir gmkdir; do
6485 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006486 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006487 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6488 'mkdir (GNU coreutils) '* | \
6489 'mkdir (coreutils) '* | \
6490 'mkdir (fileutils) '4.1*)
6491 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6492 break 3;;
6493 esac
6494 done
6495 done
6496 done
6497IFS=$as_save_IFS
6498
6499fi
6500
6501 test -d ./--version && rmdir ./--version
6502 if test "${ac_cv_path_mkdir+set}" = set; then
6503 MKDIR_P="$ac_cv_path_mkdir -p"
6504 else
6505 # As a last resort, use the slow shell script. Don't cache a
6506 # value for MKDIR_P within a source directory, because that will
6507 # break other packages using the cache if that directory is
6508 # removed, or if the value is a relative name.
6509 MKDIR_P="$ac_install_sh -d"
6510 fi
6511fi
6512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6513$as_echo "$MKDIR_P" >&6; }
6514
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006515
6516# Not every filesystem supports hard links
6517
6518if test -z "$LN" ; then
6519 case $ac_sys_system in
6520 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006521 *) LN=ln;;
6522 esac
6523fi
6524
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006525# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006526
6527ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006528
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006529# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6531$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532
6533# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006534if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006535 withval=$with_pydebug;
6536if test "$withval" != no
6537then
6538
Matthias Kloseb9621712010-04-24 17:59:49 +00006539$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006540
Matthias Kloseb9621712010-04-24 17:59:49 +00006541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6542$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006543 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006544 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006545else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547fi
6548else
Matthias Kloseb9621712010-04-24 17:59:49 +00006549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551fi
6552
6553
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006554# Enable LTO flags
6555
6556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6557$as_echo_n "checking for --with-lto... " >&6; }
6558
6559# Check whether --with-lto was given.
6560if test "${with_lto+set}" = set; then :
6561 withval=$with_lto;
6562if test "$withval" != no
6563then
6564 Py_LTO='true'
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6566$as_echo "yes" >&6; };
6567else
6568 Py_LTO='false'
6569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6570$as_echo "no" >&6; };
6571fi
6572else
6573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6574$as_echo "no" >&6; }
6575fi
6576
6577if test "$Py_LTO" = 'true' ; then
6578 case $CC in
6579 *clang*)
6580 # Any changes made here should be reflected in the GCC+Darwin case below
6581 LTOFLAGS="-flto"
6582 ;;
6583 *gcc*)
6584 case $ac_sys_system in
6585 Darwin*)
6586 LTOFLAGS="-flto"
6587 ;;
6588 *)
6589 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6590 ;;
6591 esac
6592 ;;
6593 esac
6594fi
6595
Brett Cannon7188a3e2015-09-18 15:13:44 -07006596# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006597
6598
6599
6600
6601
6602
Brett Cannon7188a3e2015-09-18 15:13:44 -07006603# Extract the first word of "llvm-profdata", so it can be a program name with args.
6604set dummy llvm-profdata; ac_word=$2
6605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6606$as_echo_n "checking for $ac_word... " >&6; }
6607if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6608 $as_echo_n "(cached) " >&6
6609else
6610 if test -n "$LLVM_PROF_FOUND"; then
6611 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6612else
6613as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6614for as_dir in $PATH
6615do
6616 IFS=$as_save_IFS
6617 test -z "$as_dir" && as_dir=.
6618 for ac_exec_ext in '' $ac_executable_extensions; do
6619 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6620 ac_cv_prog_LLVM_PROF_FOUND="found"
6621 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6622 break 2
6623 fi
6624done
6625 done
6626IFS=$as_save_IFS
6627
6628 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6629fi
6630fi
6631LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6632if test -n "$LLVM_PROF_FOUND"; then
6633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6634$as_echo "$LLVM_PROF_FOUND" >&6; }
6635else
6636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6637$as_echo "no" >&6; }
6638fi
6639
6640
6641LLVM_PROF_ERR=no
6642case $CC in
6643 *clang*)
6644 # Any changes made here should be reflected in the GCC+Darwin case below
6645 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6646 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6647 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6648 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6649 if test $LLVM_PROF_FOUND = not-found
6650 then
6651 LLVM_PROF_ERR=yes
6652 fi
6653 ;;
6654 *gcc*)
6655 case $ac_sys_system in
6656 Darwin*)
6657 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6658 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6659 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6660 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6661 if test $LLVM_PROF_FOUND = not-found
6662 then
6663 LLVM_PROF_ERR=yes
6664 fi
6665 ;;
6666 *)
6667 PGO_PROF_GEN_FLAG="-fprofile-generate"
6668 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6669 LLVM_PROF_MERGER="true"
6670 LLVM_PROF_FILE=""
6671 ;;
6672 esac
6673 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006674 *icc*)
6675 PGO_PROF_GEN_FLAG="-prof-gen"
6676 PGO_PROF_USE_FLAG="-prof-use"
6677 LLVM_PROF_MERGER="true"
6678 LLVM_PROF_FILE=""
6679 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006680esac
6681
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006682# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6683# merged with this chunk of code?
6684
6685# Optimizer/debugger flags
6686# ------------------------
6687# (The following bit of code is complicated enough - please keep things
6688# indented properly. Just pretend you're editing Python code. ;-)
6689
6690# There are two parallel sets of case statements below, one that checks to
6691# see if OPT was set and one that does BASECFLAGS setting based upon
6692# compiler and platform. BASECFLAGS tweaks need to be made even if the
6693# user set OPT.
6694
6695# tweak OPT based on compiler and platform, only if the user didn't set
6696# it on the command line
6697
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006698if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006699then
6700 case $GCC in
6701 yes)
6702 if test "$CC" != 'g++' ; then
6703 STRICT_PROTO="-Wstrict-prototypes"
6704 fi
6705 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6706 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6707 WRAP="-fwrapv"
6708 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006709
6710 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006711 case $CC in
6712 *clang*) WRAP="-fwrapv"
6713 ;;
6714 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716 case $ac_cv_prog_cc_g in
6717 yes)
6718 if test "$Py_DEBUG" = 'true' ; then
6719 # Optimization messes up debuggers, so turn it off for
6720 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006721 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6722 OPT="-g -Og -Wall $STRICT_PROTO"
6723 else
6724 OPT="-g -O0 -Wall $STRICT_PROTO"
6725 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006726 else
6727 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6728 fi
6729 ;;
6730 *)
6731 OPT="-O3 -Wall $STRICT_PROTO"
6732 ;;
6733 esac
6734 case $ac_sys_system in
6735 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6736 ;;
6737 esac
6738 ;;
6739
6740 *)
6741 OPT="-O"
6742 ;;
6743 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006744fi
6745
6746
6747
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006748
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749# The -arch flags for universal builds on OSX
6750UNIVERSAL_ARCH_FLAGS=
6751
6752
6753# tweak BASECFLAGS based on compiler and platform
6754case $GCC in
6755yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006756 # Python doesn't violate C99 aliasing rules, but older versions of
6757 # GCC produce warnings for legal Python code. Enable
6758 # -fno-strict-aliasing on versions of GCC that support but produce
6759 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6761$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006762 ac_save_cc="$CC"
6763 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006764 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006765 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006766 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006767else
Matthias Kloseb9621712010-04-24 17:59:49 +00006768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006770
Matthias Kloseb159a552010-04-25 21:00:44 +00006771
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006772int
6773main ()
6774{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006775
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006776 ;
6777 return 0;
6778}
Matthias Kloseb159a552010-04-25 21:00:44 +00006779
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006781if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006782
6783 CC="$ac_save_cc -fstrict-aliasing"
6784 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006786/* end confdefs.h. */
6787
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006788 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006789int
6790main ()
6791{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006792double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006793 ;
6794 return 0;
6795}
Matthias Kloseb159a552010-04-25 21:00:44 +00006796
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006798if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006799
6800 ac_cv_no_strict_aliasing=no
6801
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006802else
Matthias Kloseb159a552010-04-25 21:00:44 +00006803
6804 ac_cv_no_strict_aliasing=yes
6805
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006806fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006808
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006809else
Matthias Kloseb159a552010-04-25 21:00:44 +00006810
6811 ac_cv_no_strict_aliasing=no
6812
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006815fi
6816
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006817 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006818 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6820$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006821 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006822 then
6823 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6824 fi
6825
Zachary Ware5af85642015-12-21 12:09:17 -06006826 # ICC doesn't recognize the option, but only emits a warning
6827 ## XXX does it emit an unused result warning and can it be disabled?
6828 case "$CC" in
6829 *icc*)
6830 ac_cv_disable_unused_result_warning=no
6831 ;;
6832 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6834$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6835 ac_save_cc="$CC"
6836 CC="$CC -Wunused-result -Werror"
6837 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006838 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006839 $as_echo_n "(cached) " >&6
6840else
6841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6842/* end confdefs.h. */
6843
6844
6845int
6846main ()
6847{
6848
6849 ;
6850 return 0;
6851}
6852
6853_ACEOF
6854if ac_fn_c_try_compile "$LINENO"; then :
6855
6856 ac_cv_disable_unused_result_warning=yes
6857
6858else
6859
6860 ac_cv_disable_unused_result_warning=no
6861
6862fi
6863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6864fi
6865
6866 CFLAGS="$save_CFLAGS"
6867 CC="$ac_save_cc"
6868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6869$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006870 ;;
6871 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006872
6873 if test $ac_cv_disable_unused_result_warning = yes
6874 then
6875 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6876 fi
6877
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6879$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6880 ac_save_cc="$CC"
6881 CC="$CC -Werror=declaration-after-statement"
6882 save_CFLAGS="$CFLAGS"
6883 if ${ac_cv_declaration_after_statement_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_declaration_after_statement_warning=yes
6902
6903else
6904
6905 ac_cv_declaration_after_statement_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"
6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6914$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6915
6916 if test $ac_cv_declaration_after_statement_warning = yes
6917 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006918 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006919 fi
6920
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6922$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6923 ac_save_cc="$CC"
6924 CC="$CC -Wsign-compare"
6925 save_CFLAGS="$CFLAGS"
6926 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6927 $as_echo_n "(cached) " >&6
6928else
6929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6930/* end confdefs.h. */
6931
6932
6933int
6934main ()
6935{
6936
6937 ;
6938 return 0;
6939}
6940
6941_ACEOF
6942if ac_fn_c_try_compile "$LINENO"; then :
6943
6944 ac_cv_enable_sign_compare_warning=yes
6945
6946else
6947
6948 ac_cv_enable_sign_compare_warning=no
6949
6950fi
6951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6952fi
6953
6954 CFLAGS="$save_CFLAGS"
6955 CC="$ac_save_cc"
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6957$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6958
6959 if test $ac_cv_enable_sign_compare_warning = yes
6960 then
6961 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6962 fi
6963
6964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6965$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6966 ac_save_cc="$CC"
6967 CC="$CC -Wunreachable-code"
6968 save_CFLAGS="$CFLAGS"
6969 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6970 $as_echo_n "(cached) " >&6
6971else
6972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6973/* end confdefs.h. */
6974
6975
6976int
6977main ()
6978{
6979
6980 ;
6981 return 0;
6982}
6983
6984_ACEOF
6985if ac_fn_c_try_compile "$LINENO"; then :
6986
6987 ac_cv_enable_unreachable_code_warning=yes
6988
6989else
6990
6991 ac_cv_enable_unreachable_code_warning=no
6992
6993fi
6994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6995fi
6996
6997 CFLAGS="$save_CFLAGS"
6998 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006999
7000 # Don't enable unreachable code warning in debug mode, since it usually
7001 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007002 # Issue #24324: Unfortunately, the unreachable code warning does not work
7003 # correctly on gcc and has been silently removed from the compiler.
7004 # It is supported on clang but on OS X systems gcc may be an alias
7005 # for clang. Try to determine if the compiler is not really gcc and,
7006 # if so, only then enable the warning.
7007 if test $ac_cv_enable_unreachable_code_warning = yes && \
7008 test "$Py_DEBUG" != "true" && \
7009 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007010 then
7011 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007012 else
7013 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007014 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7016$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007017
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7019 # support. Without this, treatment of subnormals doesn't follow
7020 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007021 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007022 alpha*)
7023 BASECFLAGS="$BASECFLAGS -mieee"
7024 ;;
7025 esac
7026
7027 case $ac_sys_system in
7028 SCO_SV*)
7029 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7030 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007031
7032 # is there any other compiler on Darwin besides gcc?
7033 Darwin*)
7034 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7035 # used to be here, but non-Apple gcc doesn't accept them.
7036 if test "${CC}" = gcc
7037 then
7038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007039$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007040 case "${UNIVERSALSDK}" in
7041 */MacOSX10.4u.sdk)
7042 # Build using 10.4 SDK, force usage of gcc when the
7043 # compiler is gcc, otherwise the user will get very
7044 # confusing error messages when building on OSX 10.6
7045 CC=gcc-4.0
7046 CPP=cpp-4.0
7047 ;;
7048 esac
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007050$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007051 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007052
Ned Deily87adb6e2013-10-18 21:09:56 -07007053 if test "${enable_universalsdk}"
7054 then
7055 case "$UNIVERSAL_ARCHS" in
7056 32-bit)
7057 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7058 LIPO_32BIT_FLAGS=""
7059 ARCH_RUN_32BIT=""
7060 ;;
7061 64-bit)
7062 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7063 LIPO_32BIT_FLAGS=""
7064 ARCH_RUN_32BIT="true"
7065 ;;
7066 all)
7067 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7068 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7069 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7070 ;;
7071 intel)
7072 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7073 LIPO_32BIT_FLAGS="-extract i386"
7074 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7075 ;;
7076 intel-32)
7077 UNIVERSAL_ARCH_FLAGS="-arch i386"
7078 LIPO_32BIT_FLAGS=""
7079 ARCH_RUN_32BIT=""
7080 ;;
7081 3-way)
7082 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7083 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7084 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7085 ;;
7086 *)
7087 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7088 ;;
7089 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007090
Ned Deily87adb6e2013-10-18 21:09:56 -07007091 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7092 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7093 if test "${UNIVERSALSDK}" != "/"
7094 then
7095 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7096 fi
7097 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007098
Ned Deily87adb6e2013-10-18 21:09:56 -07007099 # Calculate an appropriate deployment target for this build:
7100 # The deployment target value is used explicitly to enable certain
7101 # features are enabled (such as builtin libedit support for readline)
7102 # through the use of Apple's Availabiliy Macros and is used as a
7103 # component of the string returned by distutils.get_platform().
7104 #
7105 # Use the value from:
7106 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7107 # 2. the operating system version of the build machine if >= 10.6
7108 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7109 # below to pick either 10.3, 10.4, or 10.5 as the target.
7110 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007111
Ned Deily87adb6e2013-10-18 21:09:56 -07007112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7113$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007114 cur_target_major=`sw_vers -productVersion | \
7115 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7116 cur_target_minor=`sw_vers -productVersion | \
7117 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7118 cur_target="${cur_target_major}.${cur_target_minor}"
7119 if test ${cur_target_major} -eq 10 && \
7120 test ${cur_target_minor} -ge 3 && \
7121 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007122 then
Ned Deily36820b62014-06-25 13:44:22 -07007123 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007124 cur_target=10.3
7125 if test ${enable_universalsdk}
7126 then
7127 case "$UNIVERSAL_ARCHS" in
7128 all|3-way|intel|64-bit)
7129 # These configurations were first supported in 10.5
7130 cur_target='10.5'
7131 ;;
7132 esac
7133 else
7134 if test `/usr/bin/arch` = "i386"
7135 then
7136 # 10.4 was the first release to support Intel archs
7137 cur_target="10.4"
7138 fi
7139 fi
7140 fi
7141 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007142
Ned Deily87adb6e2013-10-18 21:09:56 -07007143 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7144 # environment with a value that is the same as what we'll use
7145 # in the Makefile to ensure that we'll get the same compiler
7146 # environment during configure and build time.
7147 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7148 export MACOSX_DEPLOYMENT_TARGET
7149 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7151$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007152
Ned Deily87adb6e2013-10-18 21:09:56 -07007153 # end of Darwin* tests
7154 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007155 esac
7156 ;;
7157
7158*)
7159 case $ac_sys_system in
7160 OpenUNIX*|UnixWare*)
7161 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7162 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007163 SCO_SV*)
7164 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7165 ;;
7166 esac
7167 ;;
7168esac
7169
Zachary Ware5af85642015-12-21 12:09:17 -06007170# ICC needs -fp-model strict or floats behave badly
7171case "$CC" in
7172*icc*)
7173 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7174 ;;
7175esac
7176
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007177if test "$Py_DEBUG" = 'true'; then
7178 :
7179else
7180 OPT="-DNDEBUG $OPT"
7181fi
7182
7183if test "$ac_arch_flags"
7184then
7185 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7186fi
7187
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007188# On some compilers, pthreads are available without further options
7189# (e.g. MacOS X). On some of these systems, the compiler will not
7190# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7191# So we have to see first whether pthreads are available without
7192# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7194$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007195if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007196 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007197else
Matthias Kloseb9621712010-04-24 17:59:49 +00007198 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007199 ac_cv_pthread_is_default=no
7200else
Matthias Kloseb9621712010-04-24 17:59:49 +00007201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007202/* end confdefs.h. */
7203
Stefan Krah7dba5942012-11-22 22:49:11 +01007204#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007205#include <pthread.h>
7206
7207void* routine(void* p){return NULL;}
7208
7209int main(){
7210 pthread_t p;
7211 if(pthread_create(&p,NULL,routine,NULL)!=0)
7212 return 1;
7213 (void)pthread_detach(p);
7214 return 0;
7215}
7216
7217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007218if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007219
7220 ac_cv_pthread_is_default=yes
7221 ac_cv_kthread=no
7222 ac_cv_pthread=no
7223
7224else
Matthias Kloseb9621712010-04-24 17:59:49 +00007225 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7228 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007229fi
7230
7231
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232fi
7233
Matthias Kloseb9621712010-04-24 17:59:49 +00007234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7235$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007236
7237
7238if test $ac_cv_pthread_is_default = yes
7239then
7240 ac_cv_kpthread=no
7241else
7242# -Kpthread, if available, provides the right #defines
7243# and linker options to make pthread_create available
7244# Some compilers won't report that they do not support -Kpthread,
7245# so we need to run a program to see whether it really made the
7246# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7248$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007249if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007251else
7252 ac_save_cc="$CC"
7253CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007254if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007255 ac_cv_kpthread=no
7256else
Matthias Kloseb9621712010-04-24 17:59:49 +00007257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007258/* end confdefs.h. */
7259
Stefan Krah7dba5942012-11-22 22:49:11 +01007260#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007261#include <pthread.h>
7262
7263void* routine(void* p){return NULL;}
7264
7265int main(){
7266 pthread_t p;
7267 if(pthread_create(&p,NULL,routine,NULL)!=0)
7268 return 1;
7269 (void)pthread_detach(p);
7270 return 0;
7271}
7272
7273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007274if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007275 ac_cv_kpthread=yes
7276else
Matthias Kloseb9621712010-04-24 17:59:49 +00007277 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007279rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7280 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007281fi
7282
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007283CC="$ac_save_cc"
7284fi
7285
Matthias Kloseb9621712010-04-24 17:59:49 +00007286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7287$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288fi
7289
7290if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7291then
7292# -Kthread, if available, provides the right #defines
7293# and linker options to make pthread_create available
7294# Some compilers won't report that they do not support -Kthread,
7295# so we need to run a program to see whether it really made the
7296# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7298$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007299if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007300 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007301else
7302 ac_save_cc="$CC"
7303CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007304if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007305 ac_cv_kthread=no
7306else
Matthias Kloseb9621712010-04-24 17:59:49 +00007307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007308/* end confdefs.h. */
7309
Stefan Krah7dba5942012-11-22 22:49:11 +01007310#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007311#include <pthread.h>
7312
7313void* routine(void* p){return NULL;}
7314
7315int main(){
7316 pthread_t p;
7317 if(pthread_create(&p,NULL,routine,NULL)!=0)
7318 return 1;
7319 (void)pthread_detach(p);
7320 return 0;
7321}
7322
7323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007324if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007325 ac_cv_kthread=yes
7326else
Matthias Kloseb9621712010-04-24 17:59:49 +00007327 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007328fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007329rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7330 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007331fi
7332
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007333CC="$ac_save_cc"
7334fi
7335
Matthias Kloseb9621712010-04-24 17:59:49 +00007336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7337$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338fi
7339
7340if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7341then
7342# -pthread, if available, provides the right #defines
7343# and linker options to make pthread_create available
7344# Some compilers won't report that they do not support -pthread,
7345# so we need to run a program to see whether it really made the
7346# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7348$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007349if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007350 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351else
7352 ac_save_cc="$CC"
7353CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007354if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355 ac_cv_pthread=no
7356else
Matthias Kloseb9621712010-04-24 17:59:49 +00007357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358/* end confdefs.h. */
7359
Stefan Krah7dba5942012-11-22 22:49:11 +01007360#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007361#include <pthread.h>
7362
7363void* routine(void* p){return NULL;}
7364
7365int main(){
7366 pthread_t p;
7367 if(pthread_create(&p,NULL,routine,NULL)!=0)
7368 return 1;
7369 (void)pthread_detach(p);
7370 return 0;
7371}
7372
7373_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007374if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375 ac_cv_pthread=yes
7376else
Matthias Kloseb9621712010-04-24 17:59:49 +00007377 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7380 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007381fi
7382
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007383CC="$ac_save_cc"
7384fi
7385
Matthias Kloseb9621712010-04-24 17:59:49 +00007386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7387$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388fi
7389
7390# If we have set a CC compiler flag for thread support then
7391# check if it works for CXX, too.
7392ac_cv_cxx_thread=no
7393if test ! -z "$CXX"
7394then
Matthias Kloseb9621712010-04-24 17:59:49 +00007395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7396$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007397ac_save_cxx="$CXX"
7398
7399if test "$ac_cv_kpthread" = "yes"
7400then
7401 CXX="$CXX -Kpthread"
7402 ac_cv_cxx_thread=yes
7403elif test "$ac_cv_kthread" = "yes"
7404then
7405 CXX="$CXX -Kthread"
7406 ac_cv_cxx_thread=yes
7407elif test "$ac_cv_pthread" = "yes"
7408then
7409 CXX="$CXX -pthread"
7410 ac_cv_cxx_thread=yes
7411fi
7412
7413if test $ac_cv_cxx_thread = yes
7414then
7415 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7416 $CXX -c conftest.$ac_ext 2>&5
7417 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7418 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7419 then
7420 ac_cv_cxx_thread=yes
7421 else
7422 ac_cv_cxx_thread=no
7423 fi
7424 rm -fr conftest*
7425fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7427$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007428fi
7429CXX="$ac_save_cxx"
7430
7431
7432# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7434$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007435if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007437else
Matthias Kloseb9621712010-04-24 17:59:49 +00007438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439/* end confdefs.h. */
7440#include <stdlib.h>
7441#include <stdarg.h>
7442#include <string.h>
7443#include <float.h>
7444
7445int
7446main ()
7447{
7448
7449 ;
7450 return 0;
7451}
7452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007453if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007454 ac_cv_header_stdc=yes
7455else
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007457fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7459
7460if test $ac_cv_header_stdc = yes; then
7461 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007463/* end confdefs.h. */
7464#include <string.h>
7465
7466_ACEOF
7467if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007468 $EGREP "memchr" >/dev/null 2>&1; then :
7469
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470else
7471 ac_cv_header_stdc=no
7472fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007473rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474
7475fi
7476
7477if test $ac_cv_header_stdc = yes; then
7478 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480/* end confdefs.h. */
7481#include <stdlib.h>
7482
7483_ACEOF
7484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007485 $EGREP "free" >/dev/null 2>&1; then :
7486
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487else
7488 ac_cv_header_stdc=no
7489fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007490rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491
7492fi
7493
7494if test $ac_cv_header_stdc = yes; then
7495 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007497 :
7498else
Matthias Kloseb9621712010-04-24 17:59:49 +00007499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500/* end confdefs.h. */
7501#include <ctype.h>
7502#include <stdlib.h>
7503#if ((' ' & 0x0FF) == 0x020)
7504# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7505# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7506#else
7507# define ISLOWER(c) \
7508 (('a' <= (c) && (c) <= 'i') \
7509 || ('j' <= (c) && (c) <= 'r') \
7510 || ('s' <= (c) && (c) <= 'z'))
7511# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7512#endif
7513
7514#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7515int
7516main ()
7517{
7518 int i;
7519 for (i = 0; i < 256; i++)
7520 if (XOR (islower (i), ISLOWER (i))
7521 || toupper (i) != TOUPPER (i))
7522 return 2;
7523 return 0;
7524}
7525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007526if ac_fn_c_try_run "$LINENO"; then :
7527
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528else
Matthias Kloseb9621712010-04-24 17:59:49 +00007529 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7532 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007533fi
7534
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535fi
7536fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7538$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539if test $ac_cv_header_stdc = yes; then
7540
Matthias Kloseb9621712010-04-24 17:59:49 +00007541$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007542
7543fi
7544
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007545for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007546fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007547ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007548sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007549unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007550poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007551sys/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 +01007552sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007553sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007554sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007555sys/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 -07007556libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007557bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007558sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007559do :
7560 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7561ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007562if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007563 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007564#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007565_ACEOF
7566
7567fi
7568
Guido van Rossum627b2d71993-12-24 10:39:16 +00007569done
7570
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007571ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007572for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007573 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7575$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007576if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007577 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007578else
Matthias Kloseb9621712010-04-24 17:59:49 +00007579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007580/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007581#include <sys/types.h>
7582#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007583
Martin v. Löwis11437992002-04-12 09:54:03 +00007584int
7585main ()
7586{
7587if ((DIR *) 0)
7588return 0;
7589 ;
7590 return 0;
7591}
7592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007594 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007595else
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007599fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007600eval ac_res=\$$as_ac_Header
7601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7602$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007603if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007604 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007605#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007606_ACEOF
7607
7608ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007609fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007610
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007611done
7612# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7613if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7615$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007616if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007617 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007618else
Martin v. Löwis11437992002-04-12 09:54:03 +00007619 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007620cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007622
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623/* Override any GCC internal prototype to avoid an error.
7624 Use char because int might match the return type of a GCC
7625 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007626#ifdef __cplusplus
7627extern "C"
7628#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007629char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007630int
7631main ()
7632{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007633return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 ;
7635 return 0;
7636}
7637_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007638for ac_lib in '' dir; do
7639 if test -z "$ac_lib"; then
7640 ac_res="none required"
7641 else
7642 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007643 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007644 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007645 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007646 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007648rm -f core conftest.err conftest.$ac_objext \
7649 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007650 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653done
Victor Stinnere0be4232011-10-25 13:06:09 +02007654if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007655
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007656else
7657 ac_cv_search_opendir=no
7658fi
7659rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007660LIBS=$ac_func_search_save_LIBS
7661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7663$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007665if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007667
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007668fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007669
Michael W. Hudson54241132001-12-07 15:38:26 +00007670else
Matthias Kloseb9621712010-04-24 17:59:49 +00007671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7672$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007673if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007674 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007675else
7676 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007678/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680/* Override any GCC internal prototype to avoid an error.
7681 Use char because int might match the return type of a GCC
7682 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007683#ifdef __cplusplus
7684extern "C"
7685#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007686char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007687int
7688main ()
7689{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007690return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007691 ;
7692 return 0;
7693}
7694_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695for ac_lib in '' x; do
7696 if test -z "$ac_lib"; then
7697 ac_res="none required"
7698 else
7699 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007700 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007702 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007704fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007705rm -f core conftest.err conftest.$ac_objext \
7706 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007707 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007708 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710done
Victor Stinnere0be4232011-10-25 13:06:09 +02007711if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007712
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007713else
7714 ac_cv_search_opendir=no
7715fi
7716rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007717LIBS=$ac_func_search_save_LIBS
7718fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7720$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007722if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007724
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007725fi
7726
7727fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007728
Matthias Kloseb9621712010-04-24 17:59:49 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7730$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007731if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007733else
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007735/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007736#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007737int
7738main ()
7739{
7740return makedev(0, 0);
7741 ;
7742 return 0;
7743}
7744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007745if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007746 ac_cv_header_sys_types_h_makedev=yes
7747else
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750rm -f core conftest.err conftest.$ac_objext \
7751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007752
7753fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7755$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007756
7757if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007758ac_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 +02007759if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007760
Matthias Kloseb9621712010-04-24 17:59:49 +00007761$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007762
7763fi
7764
7765
7766
7767 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007768 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 +02007769if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007770
Matthias Kloseb9621712010-04-24 17:59:49 +00007771$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007772
7773fi
7774
7775
7776 fi
7777fi
7778
Michael W. Hudson54241132001-12-07 15:38:26 +00007779
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007780# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7781for ac_header in net/if.h
7782do :
7783 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7784#ifdef STDC_HEADERS
7785# include <stdlib.h>
7786# include <stddef.h>
7787#else
7788# ifdef HAVE_STDLIB_H
7789# include <stdlib.h>
7790# endif
7791#endif
7792#ifdef HAVE_SYS_SOCKET_H
7793# include <sys/socket.h>
7794#endif
7795
7796"
Victor Stinnere0be4232011-10-25 13:06:09 +02007797if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007798 cat >>confdefs.h <<_ACEOF
7799#define HAVE_NET_IF_H 1
7800_ACEOF
7801
7802fi
7803
7804done
7805
7806
Martin v. Löwis11017b12006-01-14 18:12:57 +00007807# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007808for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007809do :
7810 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 +00007811#ifdef HAVE_ASM_TYPES_H
7812#include <asm/types.h>
7813#endif
7814#ifdef HAVE_SYS_SOCKET_H
7815#include <sys/socket.h>
7816#endif
7817
Matthias Kloseb9621712010-04-24 17:59:49 +00007818"
Victor Stinnere0be4232011-10-25 13:06:09 +02007819if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007820 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007821#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007822_ACEOF
7823
7824fi
7825
7826done
7827
7828
Charles-François Natali47413c12011-10-06 19:47:44 +02007829# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007830for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007831do :
7832 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7833ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7834#ifdef HAVE_SYS_SOCKET_H
7835#include <sys/socket.h>
7836#endif
7837
7838"
7839if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7840 cat >>confdefs.h <<_ACEOF
7841#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7842_ACEOF
7843
7844fi
7845
7846done
7847
7848
Guido van Rossum627b2d71993-12-24 10:39:16 +00007849# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007850was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7852$as_echo_n "checking for clock_t in time.h... " >&6; }
7853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007854/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007855#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007856
7857_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007858if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007859 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007860 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007861else
Martin v. Löwis11437992002-04-12 09:54:03 +00007862
7863
Matthias Kloseb9621712010-04-24 17:59:49 +00007864$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007865
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007866
Guido van Rossum627b2d71993-12-24 10:39:16 +00007867fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007868rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007869
Matthias Kloseb9621712010-04-24 17:59:49 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7871$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007872
Matthias Kloseb9621712010-04-24 17:59:49 +00007873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7874$as_echo_n "checking for makedev... " >&6; }
7875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007876/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007877
Jesus Cea740f53a2010-04-28 11:35:30 +00007878#if defined(MAJOR_IN_MKDEV)
7879#include <sys/mkdev.h>
7880#elif defined(MAJOR_IN_SYSMACROS)
7881#include <sys/sysmacros.h>
7882#else
7883#include <sys/types.h>
7884#endif
7885
Neal Norwitz11690112002-07-30 01:08:28 +00007886int
7887main ()
7888{
Jesus Cea740f53a2010-04-28 11:35:30 +00007889
7890 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007891 ;
7892 return 0;
7893}
Matthias Kloseb159a552010-04-25 21:00:44 +00007894
Neal Norwitz11690112002-07-30 01:08:28 +00007895_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007896if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007897 ac_cv_has_makedev=yes
7898else
Matthias Kloseb9621712010-04-24 17:59:49 +00007899 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007901rm -f core conftest.err conftest.$ac_objext \
7902 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7904$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007905if test "$ac_cv_has_makedev" = "yes"; then
7906
Matthias Kloseb9621712010-04-24 17:59:49 +00007907$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007908
7909fi
7910
Christian Heimes985ecdc2013-11-20 11:46:18 +01007911# byte swapping
7912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7913$as_echo_n "checking for le64toh... " >&6; }
7914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7915/* end confdefs.h. */
7916
7917#ifdef HAVE_ENDIAN_H
7918#include <endian.h>
7919#elif defined(HAVE_SYS_ENDIAN_H)
7920#include <sys/endian.h>
7921#endif
7922
7923int
7924main ()
7925{
7926
7927 le64toh(1)
7928 ;
7929 return 0;
7930}
7931
7932_ACEOF
7933if ac_fn_c_try_link "$LINENO"; then :
7934 ac_cv_has_le64toh=yes
7935else
7936 ac_cv_has_le64toh=no
7937fi
7938rm -f core conftest.err conftest.$ac_objext \
7939 conftest$ac_exeext conftest.$ac_ext
7940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7941$as_echo "$ac_cv_has_le64toh" >&6; }
7942if test "$ac_cv_has_le64toh" = "yes"; then
7943
7944$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7945
7946fi
7947
Martin v. Löwis399a6892002-10-04 10:22:02 +00007948# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7949# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7950# defined, but the compiler does not support pragma redefine_extname,
7951# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7952# structures (such as rlimit64) without declaring them. As a
7953# work-around, disable LFS on such configurations
7954
7955use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7957$as_echo_n "checking Solaris LFS bug... " >&6; }
7958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007959/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007960
7961#define _LARGEFILE_SOURCE 1
7962#define _FILE_OFFSET_BITS 64
7963#include <sys/resource.h>
7964
Martin v. Löwis399a6892002-10-04 10:22:02 +00007965int
7966main ()
7967{
7968struct rlimit foo;
7969 ;
7970 return 0;
7971}
7972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007973if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007974 sol_lfs_bug=no
7975else
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7980$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007981if test "$sol_lfs_bug" = "yes"; then
7982 use_lfs=no
7983fi
7984
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007985# Don't use largefile support for GNU/Hurd
7986case $ac_sys_system in GNU*)
7987 use_lfs=no
7988esac
7989
Martin v. Löwis399a6892002-10-04 10:22:02 +00007990if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007991# Two defines needed to enable largefile support on various platforms
7992# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007993case $ac_sys_system/$ac_sys_release in
7994AIX*)
7995
7996$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7997
7998 ;;
7999esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008000
Matthias Kloseb9621712010-04-24 17:59:49 +00008001$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008002
8003
Matthias Kloseb9621712010-04-24 17:59:49 +00008004$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008005
Martin v. Löwis399a6892002-10-04 10:22:02 +00008006fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008007
Guido van Rossum84e7b241996-08-19 21:59:00 +00008008# Add some code to confdefs.h so that the test for off_t works on SCO
8009cat >> confdefs.h <<\EOF
8010#if defined(SCO_DS)
8011#undef _OFF_T
8012#endif
8013EOF
8014
Guido van Rossumef2255b2000-03-10 22:30:29 +00008015# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008016ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008017if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008018
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019else
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
8021cat >>confdefs.h <<_ACEOF
8022#define mode_t int
8023_ACEOF
8024
8025fi
8026
Matthias Kloseb9621712010-04-24 17:59:49 +00008027ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030else
Martin v. Löwis11437992002-04-12 09:54:03 +00008031
8032cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008033#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008034_ACEOF
8035
8036fi
8037
Matthias Kloseb9621712010-04-24 17:59:49 +00008038ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008039if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008041else
Martin v. Löwis11437992002-04-12 09:54:03 +00008042
8043cat >>confdefs.h <<_ACEOF
8044#define pid_t int
8045_ACEOF
8046
8047fi
8048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008049
Martin v. Löwis11437992002-04-12 09:54:03 +00008050cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008051#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008052_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008053
Matthias Kloseb9621712010-04-24 17:59:49 +00008054ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008055if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008056
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008057else
Martin v. Löwis11437992002-04-12 09:54:03 +00008058
8059cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008060#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008061_ACEOF
8062
8063fi
8064
Matthias Kloseb9621712010-04-24 17:59:49 +00008065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8066$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008067if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008068 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008069else
Matthias Kloseb9621712010-04-24 17:59:49 +00008070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008071/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008072#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008073
8074_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008077 ac_cv_type_uid_t=yes
8078else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008079 ac_cv_type_uid_t=no
8080fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008081rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008082
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008083fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8085$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008086if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008087
Matthias Kloseb9621712010-04-24 17:59:49 +00008088$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008089
8090
Matthias Kloseb9621712010-04-24 17:59:49 +00008091$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008092
8093fi
8094
Mark Dickinson983bc162012-12-02 12:11:38 +00008095
8096# There are two separate checks for each of the exact-width integer types we
8097# need. First we check whether the type is available using the usual
8098# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8099# and <stdint.h> where available). We then also use the special type checks of
8100# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8101# directly, #define's uint32_t to be a suitable type.
8102
8103ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8104if test "x$ac_cv_type_uint32_t" = xyes; then :
8105
8106$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8107
8108fi
8109
Matthias Kloseb9621712010-04-24 17:59:49 +00008110ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8111case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008112 no|yes) ;; #(
8113 *)
8114
Matthias Kloseb9621712010-04-24 17:59:49 +00008115$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008116
8117
8118cat >>confdefs.h <<_ACEOF
8119#define uint32_t $ac_cv_c_uint32_t
8120_ACEOF
8121;;
8122 esac
8123
Mark Dickinson983bc162012-12-02 12:11:38 +00008124
8125ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8126if test "x$ac_cv_type_uint64_t" = xyes; then :
8127
8128$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8129
8130fi
8131
Matthias Kloseb9621712010-04-24 17:59:49 +00008132ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8133case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008134 no|yes) ;; #(
8135 *)
8136
Matthias Kloseb9621712010-04-24 17:59:49 +00008137$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008138
8139
8140cat >>confdefs.h <<_ACEOF
8141#define uint64_t $ac_cv_c_uint64_t
8142_ACEOF
8143;;
8144 esac
8145
Mark Dickinson983bc162012-12-02 12:11:38 +00008146
8147ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8148if test "x$ac_cv_type_int32_t" = xyes; then :
8149
8150$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8151
8152fi
8153
Matthias Kloseb9621712010-04-24 17:59:49 +00008154ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8155case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008156 no|yes) ;; #(
8157 *)
8158
8159cat >>confdefs.h <<_ACEOF
8160#define int32_t $ac_cv_c_int32_t
8161_ACEOF
8162;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008163esac
8164
Mark Dickinson983bc162012-12-02 12:11:38 +00008165
8166ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8167if test "x$ac_cv_type_int64_t" = xyes; then :
8168
8169$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8170
8171fi
8172
Matthias Kloseb9621712010-04-24 17:59:49 +00008173ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8174case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008175 no|yes) ;; #(
8176 *)
8177
8178cat >>confdefs.h <<_ACEOF
8179#define int64_t $ac_cv_c_int64_t
8180_ACEOF
8181;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008182esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008183
Mark Dickinson983bc162012-12-02 12:11:38 +00008184
Matthias Kloseb9621712010-04-24 17:59:49 +00008185ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008186if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008187
Matthias Kloseb9621712010-04-24 17:59:49 +00008188$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008189
8190fi
8191
Stefan Krah1919b7e2012-03-21 18:25:23 +01008192ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8193if test "x$ac_cv_type___uint128_t" = xyes; then :
8194
8195$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8196
8197fi
8198
Jack Jansendd19cf82001-12-06 22:36:17 +00008199
Michael W. Hudson54241132001-12-07 15:38:26 +00008200# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008201# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008202# The cast to long int works around a bug in the HP C Compiler
8203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8205# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8207$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008208if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008209 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008210else
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 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 +00008212
Martin v. Löwis11437992002-04-12 09:54:03 +00008213else
Matthias Kloseb9621712010-04-24 17:59:49 +00008214 if test "$ac_cv_type_int" = yes; then
8215 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8216$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008217as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008218See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219 else
8220 ac_cv_sizeof_int=0
8221 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008222fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008223
Martin v. Löwis11437992002-04-12 09:54:03 +00008224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8226$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227
8228
8229
Martin v. Löwis11437992002-04-12 09:54:03 +00008230cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008231#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008232_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008233
8234
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235# The cast to long int works around a bug in the HP C Compiler
8236# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8237# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8238# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8240$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008241if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008242 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008243else
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 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 +00008245
Martin v. Löwis11437992002-04-12 09:54:03 +00008246else
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 if test "$ac_cv_type_long" = yes; then
8248 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008250as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008251See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008252 else
8253 ac_cv_sizeof_long=0
8254 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008255fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008256
Martin v. Löwis11437992002-04-12 09:54:03 +00008257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8259$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260
8261
8262
Martin v. Löwis11437992002-04-12 09:54:03 +00008263cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008264#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008265_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008266
8267
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008268# The cast to long int works around a bug in the HP C Compiler
8269# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8270# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8271# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8273$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008274if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008275 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008276else
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 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 +00008278
Martin v. Löwis11437992002-04-12 09:54:03 +00008279else
Matthias Kloseb9621712010-04-24 17:59:49 +00008280 if test "$ac_cv_type_void_p" = yes; then
8281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8282$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008283as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008284See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285 else
8286 ac_cv_sizeof_void_p=0
8287 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008288fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008289
Martin v. Löwis11437992002-04-12 09:54:03 +00008290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8292$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293
8294
8295
Martin v. Löwis11437992002-04-12 09:54:03 +00008296cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008297#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008298_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008299
8300
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301# The cast to long int works around a bug in the HP C Compiler
8302# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8303# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8304# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8306$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008307if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008309else
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 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 +00008311
Martin v. Löwis11437992002-04-12 09:54:03 +00008312else
Matthias Kloseb9621712010-04-24 17:59:49 +00008313 if test "$ac_cv_type_short" = yes; then
8314 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008316as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008317See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008318 else
8319 ac_cv_sizeof_short=0
8320 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008321fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008322
Martin v. Löwis11437992002-04-12 09:54:03 +00008323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8325$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008326
8327
8328
Martin v. Löwis11437992002-04-12 09:54:03 +00008329cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008330#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008331_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008332
8333
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334# The cast to long int works around a bug in the HP C Compiler
8335# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8336# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8337# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8339$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008340if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008342else
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 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 +00008344
Martin v. Löwis11437992002-04-12 09:54:03 +00008345else
Matthias Kloseb9621712010-04-24 17:59:49 +00008346 if test "$ac_cv_type_float" = yes; then
8347 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8348$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008349as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008350See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351 else
8352 ac_cv_sizeof_float=0
8353 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008354fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008355
Martin v. Löwis11437992002-04-12 09:54:03 +00008356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8358$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008359
8360
8361
Martin v. Löwis11437992002-04-12 09:54:03 +00008362cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008363#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008364_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008365
8366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367# The cast to long int works around a bug in the HP C Compiler
8368# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8369# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8370# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8372$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008373if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008374 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008375else
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 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 +00008377
Martin v. Löwis11437992002-04-12 09:54:03 +00008378else
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 if test "$ac_cv_type_double" = yes; then
8380 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8381$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008382as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008383See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008384 else
8385 ac_cv_sizeof_double=0
8386 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008387fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8391$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008392
8393
8394
Martin v. Löwis11437992002-04-12 09:54:03 +00008395cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008396#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008397_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008398
8399
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400# The cast to long int works around a bug in the HP C Compiler
8401# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8402# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8403# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8405$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008406if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008407 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008408else
Matthias Kloseb9621712010-04-24 17:59:49 +00008409 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 +00008410
Martin v. Löwis11437992002-04-12 09:54:03 +00008411else
Matthias Kloseb9621712010-04-24 17:59:49 +00008412 if test "$ac_cv_type_fpos_t" = yes; then
8413 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8414$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008415as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008416See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008417 else
8418 ac_cv_sizeof_fpos_t=0
8419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8424$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425
8426
8427
Martin v. Löwis11437992002-04-12 09:54:03 +00008428cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008429#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008430_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008431
Michael W. Hudson54241132001-12-07 15:38:26 +00008432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433# The cast to long int works around a bug in the HP C Compiler
8434# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8435# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8436# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8438$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008439if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008440 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008441else
Matthias Kloseb9621712010-04-24 17:59:49 +00008442 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 +00008443
Martin v. Löwis18e16552006-02-15 17:27:45 +00008444else
Matthias Kloseb9621712010-04-24 17:59:49 +00008445 if test "$ac_cv_type_size_t" = yes; then
8446 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008448as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008449See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450 else
8451 ac_cv_sizeof_size_t=0
8452 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008453fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008454
Martin v. Löwis18e16552006-02-15 17:27:45 +00008455fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8457$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458
8459
8460
Martin v. Löwis18e16552006-02-15 17:27:45 +00008461cat >>confdefs.h <<_ACEOF
8462#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8463_ACEOF
8464
8465
Christian Heimes400adb02008-02-01 08:12:03 +00008466# The cast to long int works around a bug in the HP C Compiler
8467# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8468# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8469# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8471$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008472if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008473 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008474else
Matthias Kloseb9621712010-04-24 17:59:49 +00008475 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 +00008476
Christian Heimes400adb02008-02-01 08:12:03 +00008477else
Matthias Kloseb9621712010-04-24 17:59:49 +00008478 if test "$ac_cv_type_pid_t" = yes; then
8479 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8480$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008481as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008482See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008483 else
8484 ac_cv_sizeof_pid_t=0
8485 fi
8486fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008487
Christian Heimes400adb02008-02-01 08:12:03 +00008488fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8490$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008491
8492
8493
8494cat >>confdefs.h <<_ACEOF
8495#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8496_ACEOF
8497
8498
Michael W. Hudson54241132001-12-07 15:38:26 +00008499
Matthias Kloseb9621712010-04-24 17:59:49 +00008500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8501$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008502have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008504/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008505
Martin v. Löwis11437992002-04-12 09:54:03 +00008506int
8507main ()
8508{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008509long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ;
8511 return 0;
8512}
8513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008515
8516
Matthias Kloseb9621712010-04-24 17:59:49 +00008517$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008518
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008519 have_long_long=yes
8520
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8524$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008525if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008526# The cast to long int works around a bug in the HP C Compiler
8527# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8528# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8529# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8531$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008532if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008533 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008534else
Matthias Kloseb9621712010-04-24 17:59:49 +00008535 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008536
Martin v. Löwis11437992002-04-12 09:54:03 +00008537else
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 if test "$ac_cv_type_long_long" = yes; then
8539 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8540$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008541as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008542See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543 else
8544 ac_cv_sizeof_long_long=0
8545 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008547
Martin v. Löwis11437992002-04-12 09:54:03 +00008548fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8550$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551
8552
8553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008555#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008556_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008557
Michael W. Hudson54241132001-12-07 15:38:26 +00008558
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008559fi
8560
Matthias Kloseb9621712010-04-24 17:59:49 +00008561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8562$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008563have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008564cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008565/* end confdefs.h. */
8566
8567int
8568main ()
8569{
8570long double x; x = (long double)0;
8571 ;
8572 return 0;
8573}
8574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008575if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008576
8577
Matthias Kloseb9621712010-04-24 17:59:49 +00008578$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008579
8580 have_long_double=yes
8581
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008582fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8585$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008586if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008587# The cast to long int works around a bug in the HP C Compiler
8588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8590# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8592$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008593if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008594 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008595else
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 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 +00008597
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008598else
Matthias Kloseb9621712010-04-24 17:59:49 +00008599 if test "$ac_cv_type_long_double" = yes; then
8600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008602as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008603See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008604 else
8605 ac_cv_sizeof_long_double=0
8606 fi
8607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008608
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8611$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008612
8613
8614
8615cat >>confdefs.h <<_ACEOF
8616#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8617_ACEOF
8618
8619
8620fi
8621
8622
Matthias Kloseb9621712010-04-24 17:59:49 +00008623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8624$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008625have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008626cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008627/* end confdefs.h. */
8628
8629int
8630main ()
8631{
8632_Bool x; x = (_Bool)0;
8633 ;
8634 return 0;
8635}
8636_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008637if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008638
8639
Matthias Kloseb9621712010-04-24 17:59:49 +00008640$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008641
8642 have_c99_bool=yes
8643
Thomas Woutersb2137042007-02-01 18:02:27 +00008644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8647$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008648if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649# The cast to long int works around a bug in the HP C Compiler
8650# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8651# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8652# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8654$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008655if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008656 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008657else
Matthias Kloseb9621712010-04-24 17:59:49 +00008658 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 +00008659
Thomas Woutersb2137042007-02-01 18:02:27 +00008660else
Matthias Kloseb9621712010-04-24 17:59:49 +00008661 if test "$ac_cv_type__Bool" = yes; then
8662 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008664as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008665See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008666 else
8667 ac_cv_sizeof__Bool=0
8668 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670
Thomas Woutersb2137042007-02-01 18:02:27 +00008671fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8673$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674
8675
8676
Thomas Woutersb2137042007-02-01 18:02:27 +00008677cat >>confdefs.h <<_ACEOF
8678#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8679_ACEOF
8680
8681
8682fi
8683
Matthias Kloseb9621712010-04-24 17:59:49 +00008684ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008685 #include <stdint.h>
8686 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008687 #ifdef HAVE_INTTYPES_H
8688 #include <inttypes.h>
8689 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008690"
Victor Stinnere0be4232011-10-25 13:06:09 +02008691if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008692
8693cat >>confdefs.h <<_ACEOF
8694#define HAVE_UINTPTR_T 1
8695_ACEOF
8696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008697# The cast to long int works around a bug in the HP C Compiler
8698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8700# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8702$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008703if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008704 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008705else
Matthias Kloseb9621712010-04-24 17:59:49 +00008706 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008707
Martin v. Löwis11437992002-04-12 09:54:03 +00008708else
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 if test "$ac_cv_type_uintptr_t" = yes; then
8710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008712as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008713See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008714 else
8715 ac_cv_sizeof_uintptr_t=0
8716 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008718
Martin v. Löwis11437992002-04-12 09:54:03 +00008719fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8721$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722
8723
8724
Martin v. Löwis11437992002-04-12 09:54:03 +00008725cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008726#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008727_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008728
Michael W. Hudson54241132001-12-07 15:38:26 +00008729
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008730fi
8731
Thomas Wouters89f507f2006-12-13 04:49:30 +00008732
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008733# The cast to long int works around a bug in the HP C Compiler
8734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8736# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8738$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008739if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008740 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008741else
Matthias Kloseb9621712010-04-24 17:59:49 +00008742 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008743#ifdef HAVE_SYS_TYPES_H
8744#include <sys/types.h>
8745#endif
8746
Matthias Kloseb9621712010-04-24 17:59:49 +00008747"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008748
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008749else
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 if test "$ac_cv_type_off_t" = yes; then
8751 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8752$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008753as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008754See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008755 else
8756 ac_cv_sizeof_off_t=0
8757 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008759
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8762$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008763
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008764
8765
Martin v. Löwis11437992002-04-12 09:54:03 +00008766cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008767#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008768_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008769
Michael W. Hudson54241132001-12-07 15:38:26 +00008770
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008771
Matthias Kloseb9621712010-04-24 17:59:49 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8773$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008774if test "$have_long_long" = yes
8775then
8776if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008777 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008778
Matthias Kloseb9621712010-04-24 17:59:49 +00008779$as_echo "#define HAVE_LARGEFILE_SUPPORT 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; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008783else
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8785$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008786fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008787else
Matthias Kloseb9621712010-04-24 17:59:49 +00008788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8789$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008790fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008791
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008792# The cast to long int works around a bug in the HP C Compiler
8793# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8794# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8795# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8797$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008798if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008800else
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008802#ifdef HAVE_SYS_TYPES_H
8803#include <sys/types.h>
8804#endif
8805#ifdef HAVE_TIME_H
8806#include <time.h>
8807#endif
8808
Matthias Kloseb9621712010-04-24 17:59:49 +00008809"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008810
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008811else
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 if test "$ac_cv_type_time_t" = yes; then
8813 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8814$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008815as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008816See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008817 else
8818 ac_cv_sizeof_time_t=0
8819 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008820fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008821
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8824$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008825
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008826
8827
Martin v. Löwis11437992002-04-12 09:54:03 +00008828cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008829#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008830_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008831
Michael W. Hudson54241132001-12-07 15:38:26 +00008832
8833
Trent Mick635f6fb2000-08-23 21:33:05 +00008834# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008835ac_save_cc="$CC"
8836if test "$ac_cv_kpthread" = "yes"
8837then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008838elif test "$ac_cv_kthread" = "yes"
8839then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008840elif test "$ac_cv_pthread" = "yes"
8841then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008842fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008843
Matthias Kloseb9621712010-04-24 17:59:49 +00008844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8845$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008846have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008848/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008849
8850 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008851int
8852main ()
8853{
Guido van Rossum12580492000-09-24 16:47:19 +00008854pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008855 ;
8856 return 0;
8857}
Matthias Kloseb159a552010-04-25 21:00:44 +00008858
Martin v. Löwis11437992002-04-12 09:54:03 +00008859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008860if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008861 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8865$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008866if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008867 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008868# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8869# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8870# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8872$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008873if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008874 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008875else
Matthias Kloseb9621712010-04-24 17:59:49 +00008876 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008877#ifdef HAVE_PTHREAD_H
8878#include <pthread.h>
8879#endif
8880
Matthias Kloseb9621712010-04-24 17:59:49 +00008881"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008882
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008883else
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 if test "$ac_cv_type_pthread_t" = yes; then
8885 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008887as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008888See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008889 else
8890 ac_cv_sizeof_pthread_t=0
8891 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008892fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008893
Trent Mick635f6fb2000-08-23 21:33:05 +00008894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8896$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008897
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008898
8899
Martin v. Löwis11437992002-04-12 09:54:03 +00008900cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008901#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008902_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008903
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008904
Trent Mick635f6fb2000-08-23 21:33:05 +00008905fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008906CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008907
Michael W. Hudson54241132001-12-07 15:38:26 +00008908
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008909case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008910 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008911 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8912 ;;
8913 Darwin/*)
8914 OTHER_LIBTOOL_OPT=""
8915 ;;
8916esac
8917
8918
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008919
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008920case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008921 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008922 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8923 if test "${enable_universalsdk}"; then
8924 :
8925 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008926 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008927 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008928 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008929 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008930 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008931 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008932 if test ${gcc_version} '<' 4.0
8933 then
8934 LIBTOOL_CRUFT="-lcc_dynamic"
8935 else
8936 LIBTOOL_CRUFT=""
8937 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008939 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008940else
Matthias Kloseb9621712010-04-24 17:59:49 +00008941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008942/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008943
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008944 #include <unistd.h>
8945 int main(int argc, char*argv[])
8946 {
8947 if (sizeof(long) == 4) {
8948 return 0;
8949 } else {
8950 return 1;
8951 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008952 }
8953
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008955if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008956 ac_osx_32bit=yes
8957else
Matthias Kloseb9621712010-04-24 17:59:49 +00008958 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008960rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8961 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008962fi
8963
8964
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008965 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008966 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008967 i386)
8968 MACOSX_DEFAULT_ARCH="i386"
8969 ;;
8970 ppc)
8971 MACOSX_DEFAULT_ARCH="ppc"
8972 ;;
8973 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008974 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008975 ;;
8976 esac
8977 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008978 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008979 i386)
8980 MACOSX_DEFAULT_ARCH="x86_64"
8981 ;;
8982 ppc)
8983 MACOSX_DEFAULT_ARCH="ppc64"
8984 ;;
8985 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008986 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008987 ;;
8988 esac
8989
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008990 fi
8991
8992 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008993 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008994 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008995esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8997$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008998if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008999then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009000 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009002 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009003
Matthias Kloseb9621712010-04-24 17:59:49 +00009004$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009005
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9007$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009008 if test $enable_shared = "yes"
9009 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009010 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 +00009011 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009012else
Matthias Kloseb9621712010-04-24 17:59:49 +00009013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009015fi
9016
Matthias Kloseb9621712010-04-24 17:59:49 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9018$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009019case $ac_sys_system/$ac_sys_release in
9020 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009023
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9025$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009026 ;;
9027 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9029$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009030 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009031esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009032
Guido van Rossum0a516c91994-09-12 10:58:40 +00009033# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009034
Michael W. Hudson54241132001-12-07 15:38:26 +00009035
9036
9037
9038
Benjamin Peterson99f03762010-04-11 22:15:28 +00009039
Thomas Wouters477c8d52006-05-27 19:21:47 +00009040
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009041# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9042# -- usually .so, .sl on HP-UX, .dll on Cygwin
9043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9044$as_echo_n "checking the extension of shared libraries... " >&6; }
9045if test -z "$SHLIB_SUFFIX"; then
9046 case $ac_sys_system in
9047 hp*|HP*)
9048 case `uname -m` in
9049 ia64) SHLIB_SUFFIX=.so;;
9050 *) SHLIB_SUFFIX=.sl;;
9051 esac
9052 ;;
9053 CYGWIN*) SHLIB_SUFFIX=.dll;;
9054 *) SHLIB_SUFFIX=.so;;
9055 esac
9056fi
9057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9058$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009059
Guido van Rossum0a516c91994-09-12 10:58:40 +00009060# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009061# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009062# (Shared libraries in this instance are shared modules to be loaded into
9063# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9065$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009066if test -z "$LDSHARED"
9067then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009068 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009069 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009070 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009071 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009072 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009073 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009074 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009075 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009076 if test "$GCC" = "yes" ; then
9077 LDSHARED='$(CC) -shared'
9078 LDCXXSHARED='$(CXX) -shared'
9079 else
9080 LDSHARED='$(CC) -G'
9081 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009082 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009083 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009084 if test "$GCC" = "yes" ; then
9085 LDSHARED='$(CC) -shared'
9086 LDCXXSHARED='$(CXX) -shared'
9087 else
9088 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009089 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009090 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009091 LDSHARED='$(CC) -bundle'
9092 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009093 if test "$enable_framework" ; then
9094 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009095 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9096 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009097 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009098 else
9099 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009100 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009101 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009102 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009103 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009104 LDSHARED='$(CC) -bundle'
9105 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009106 if test "$enable_framework" ; then
9107 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009108 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9109 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009110 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009111 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009112 # No framework, use the Python app as bundle-loader
9113 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009114 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009115 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009116 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009117 Darwin/*)
9118 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9119 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009120
Ned Deily36820b62014-06-25 13:44:22 -07009121 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9122 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9123 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9124 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9125 if test ${dep_target_major} -eq 10 && \
9126 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009127 then
Ned Deily36820b62014-06-25 13:44:22 -07009128 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009129 LDSHARED='$(CC) -bundle'
9130 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009131 if test "$enable_framework" ; then
9132 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009133 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9134 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009135 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009136 else
9137 # No framework, use the Python app as bundle-loader
9138 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9139 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009140 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009141 fi
Ned Deily36820b62014-06-25 13:44:22 -07009142 else
9143 # building for OS X 10.3 and later
9144 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9145 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9146 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009147 fi
9148 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009149 Linux*|GNU*|QNX*)
9150 LDSHARED='$(CC) -shared'
9151 LDCXXSHARED='$(CXX) -shared';;
9152 BSD/OS*/4*)
9153 LDSHARED="gcc -shared"
9154 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009155 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009156 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009157 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009158 LDSHARED='$(CC) -shared'
9159 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009160 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009161 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009162 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009163 OpenBSD*)
9164 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9165 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009166 LDSHARED='$(CC) -shared $(CCSHARED)'
9167 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009168 else
9169 case `uname -r` in
9170 [01].* | 2.[0-7] | 2.[0-7].*)
9171 LDSHARED="ld -Bshareable ${LDFLAGS}"
9172 ;;
9173 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009174 LDSHARED='$(CC) -shared $(CCSHARED)'
9175 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009176 ;;
9177 esac
9178 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009179 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009180 LDSHARED='$(CC) -shared'
9181 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009182 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009183 if test "$GCC" = "yes" ; then
9184 LDSHARED='$(CC) -shared'
9185 LDCXXSHARED='$(CXX) -shared'
9186 else
9187 LDSHARED='$(CC) -G'
9188 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009189 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009190 SCO_SV*)
9191 LDSHARED='$(CC) -Wl,-G,-Bexport'
9192 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9193 CYGWIN*)
9194 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9195 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009196 *) LDSHARED="ld";;
9197 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009198fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9200$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009201LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009202BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009203# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009204# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9206$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009207if test -z "$CCSHARED"
9208then
Guido van Rossum07397971997-04-29 21:49:50 +00009209 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009210 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009211 then CCSHARED="-fPIC";
9212 elif test `uname -p` = sparc;
9213 then CCSHARED="-xcode=pic32";
9214 else CCSHARED="-Kpic";
9215 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009216 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009217 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009218 else CCSHARED="+z";
9219 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009220 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009221 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009222 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009223 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009224 if test "$GCC" = "yes"
9225 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009226 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009227 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009228 SCO_SV*)
9229 if test "$GCC" = "yes"
9230 then CCSHARED="-fPIC"
9231 else CCSHARED="-Kpic -belf"
9232 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009233 IRIX*/6*) case $CC in
9234 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009235 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009236 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009237 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009238fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9240$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009241# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009242# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9244$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009245if test -z "$LINKFORSHARED"
9246then
Guido van Rossum07397971997-04-29 21:49:50 +00009247 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009248 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009249 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009250 LINKFORSHARED="-Wl,-E -Wl,+s";;
9251# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009252 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009253 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009254 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009255 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009256 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009257
9258 # Issue #18075: the default maximum stack size (8MBytes) is too
9259 # small for the default recursion limit. Increase the stack size
9260 # to ensure that tests don't crash
9261 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9262
Jack Jansene578a632001-08-15 01:27:14 +00009263 if test "$enable_framework"
9264 then
Jack Jansenda49e192005-01-07 13:08:22 +00009265 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009266 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009267 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009268 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009269 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009270 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009271 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009272 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9273 then
9274 LINKFORSHARED="-Wl,--export-dynamic"
9275 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009276 SunOS/5*) case $CC in
9277 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009278 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009279 then
9280 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009281 fi;;
9282 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009283 CYGWIN*)
9284 if test $enable_shared = "no"
9285 then
9286 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9287 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009288 QNX*)
9289 # -Wl,-E causes the symbols to be added to the dynamic
9290 # symbol table so that they can be found when a module
9291 # is loaded. -N 2048K causes the stack size to be set
9292 # to 2048 kilobytes so that the stack doesn't overflow
9293 # when running test_compile.py.
9294 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009295 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9298$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009299
Michael W. Hudson54241132001-12-07 15:38:26 +00009300
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009301
Matthias Kloseb9621712010-04-24 17:59:49 +00009302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9303$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009304if test ! "$LIBRARY" = "$LDLIBRARY"
9305then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009306 case $ac_sys_system in
9307 CYGWIN*)
9308 # Cygwin needs CCSHARED when building extension DLLs
9309 # but not when building the interpreter DLL.
9310 CFLAGSFORSHARED='';;
9311 *)
9312 CFLAGSFORSHARED='$(CCSHARED)'
9313 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009314fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9316$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009317
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009318# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9319# library (with --enable-shared).
9320# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009321# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9322# if it is not required, since it creates a dependency of the shared library
9323# to LIBS. This, in turn, means that applications linking the shared libpython
9324# don't need to link LIBS explicitly. The default should be only changed
9325# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009326
Matthias Kloseb9621712010-04-24 17:59:49 +00009327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9328$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009329case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009330 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009331 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009332esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9334$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009335
9336
Guido van Rossum627b2d71993-12-24 10:39:16 +00009337# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9339$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009340if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009341 $as_echo_n "(cached) " >&6
9342else
9343 ac_check_lib_save_LIBS=$LIBS
9344LIBS="-lsendfile $LIBS"
9345cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9346/* end confdefs.h. */
9347
9348/* Override any GCC internal prototype to avoid an error.
9349 Use char because int might match the return type of a GCC
9350 builtin and then its argument prototype would still apply. */
9351#ifdef __cplusplus
9352extern "C"
9353#endif
9354char sendfile ();
9355int
9356main ()
9357{
9358return sendfile ();
9359 ;
9360 return 0;
9361}
9362_ACEOF
9363if ac_fn_c_try_link "$LINENO"; then :
9364 ac_cv_lib_sendfile_sendfile=yes
9365else
9366 ac_cv_lib_sendfile_sendfile=no
9367fi
9368rm -f core conftest.err conftest.$ac_objext \
9369 conftest$ac_exeext conftest.$ac_ext
9370LIBS=$ac_check_lib_save_LIBS
9371fi
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9373$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009374if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009375 cat >>confdefs.h <<_ACEOF
9376#define HAVE_LIBSENDFILE 1
9377_ACEOF
9378
9379 LIBS="-lsendfile $LIBS"
9380
9381fi
9382
Matthias Kloseb9621712010-04-24 17:59:49 +00009383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9384$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009385if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009386 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009387else
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009389LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009391/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393/* Override any GCC internal prototype to avoid an error.
9394 Use char because int might match the return type of a GCC
9395 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009396#ifdef __cplusplus
9397extern "C"
9398#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009399char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009400int
9401main ()
9402{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009403return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009404 ;
9405 return 0;
9406}
9407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009408if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009410else
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009413rm -f core conftest.err conftest.$ac_objext \
9414 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009415LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009416fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9418$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009419if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 cat >>confdefs.h <<_ACEOF
9421#define HAVE_LIBDL 1
9422_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009423
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009424 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009425
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009426fi
9427 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9429$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009430if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009431 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432else
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009434LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438/* Override any GCC internal prototype to avoid an error.
9439 Use char because int might match the return type of a GCC
9440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009441#ifdef __cplusplus
9442extern "C"
9443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009444char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009445int
9446main ()
9447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ;
9450 return 0;
9451}
9452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009455else
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009458rm -f core conftest.err conftest.$ac_objext \
9459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009460LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9463$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009464if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 cat >>confdefs.h <<_ACEOF
9466#define HAVE_LIBDLD 1
9467_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009468
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009469 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009470
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009471fi
9472 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009473
Georg Brandlb1441c72009-01-03 22:33:39 +00009474# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009475if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9477$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009478if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009480else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009481 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009483/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009485/* Override any GCC internal prototype to avoid an error.
9486 Use char because int might match the return type of a GCC
9487 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009488#ifdef __cplusplus
9489extern "C"
9490#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009491char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009492int
9493main ()
9494{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009495return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 ;
9497 return 0;
9498}
9499_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009500for ac_lib in '' pthread rt posix4; do
9501 if test -z "$ac_lib"; then
9502 ac_res="none required"
9503 else
9504 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009505 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009507 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009508 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009510rm -f core conftest.err conftest.$ac_objext \
9511 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009512 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009513 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009514fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009515done
Victor Stinnere0be4232011-10-25 13:06:09 +02009516if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009517
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009518else
9519 ac_cv_search_sem_init=no
9520fi
9521rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009522LIBS=$ac_func_search_save_LIBS
9523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9525$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009527if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009528 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009529
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009530fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009531 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009532 # posix4 on Solaris 2.6
9533 # pthread (first!) on Linux
9534fi
9535
Martin v. Löwis19d17342003-06-14 21:03:05 +00009536# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9538$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009539if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009541else
9542 ac_check_lib_save_LIBS=$LIBS
9543LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009544cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009545/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009547/* Override any GCC internal prototype to avoid an error.
9548 Use char because int might match the return type of a GCC
9549 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009550#ifdef __cplusplus
9551extern "C"
9552#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009553char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009554int
9555main ()
9556{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009557return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009558 ;
9559 return 0;
9560}
9561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009562if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009563 ac_cv_lib_intl_textdomain=yes
9564else
Matthias Kloseb9621712010-04-24 17:59:49 +00009565 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009567rm -f core conftest.err conftest.$ac_objext \
9568 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009569LIBS=$ac_check_lib_save_LIBS
9570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9572$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009573if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009574
Matthias Kloseb9621712010-04-24 17:59:49 +00009575$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009576
Brett Cannonc6d936e2009-06-07 20:09:53 +00009577 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009578fi
9579
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009580
9581# checks for system dependent C++ extensions support
9582case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009583 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9584$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009586/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009587
Georg Brandl59e87bd2011-02-15 19:48:59 +00009588 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009589int
9590main ()
9591{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009592loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 ;
9594 return 0;
9595}
Matthias Kloseb159a552010-04-25 21:00:44 +00009596
Martin v. Löwis11437992002-04-12 09:54:03 +00009597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009598if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009599
Matthias Kloseb159a552010-04-25 21:00:44 +00009600
Matthias Kloseb9621712010-04-24 17:59:49 +00009601$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009602
Matthias Kloseb159a552010-04-25 21:00:44 +00009603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009604$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009605
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009606else
Matthias Kloseb159a552010-04-25 21:00:44 +00009607
9608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009609$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009610
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009612rm -f core conftest.err conftest.$ac_objext \
9613 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009614 *) ;;
9615esac
9616
Christian Heimes985ecdc2013-11-20 11:46:18 +01009617# check for systems that require aligned memory access
9618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9619$as_echo_n "checking aligned memory access is required... " >&6; }
9620if test "$cross_compiling" = yes; then :
9621 aligned_required=yes
9622else
9623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9624/* end confdefs.h. */
9625
9626int main()
9627{
9628 char s[16];
9629 int i, *p1, *p2;
9630 for (i=0; i < 16; i++)
9631 s[i] = i;
9632 p1 = (int*)(s+1);
9633 p2 = (int*)(s+2);
9634 if (*p1 == *p2)
9635 return 1;
9636 return 0;
9637}
9638
9639_ACEOF
9640if ac_fn_c_try_run "$LINENO"; then :
9641 aligned_required=no
9642else
9643 aligned_required=yes
9644fi
9645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9646 conftest.$ac_objext conftest.beam conftest.$ac_ext
9647fi
9648
9649
9650if test "$aligned_required" = yes ; then
9651
9652$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9653
9654fi
9655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9656$as_echo "$aligned_required" >&6; }
9657
9658
9659# str, bytes and memoryview hash algorithm
9660
9661
9662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9663$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9664
9665# Check whether --with-hash_algorithm was given.
9666if test "${with_hash_algorithm+set}" = set; then :
9667 withval=$with_hash_algorithm;
9668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9669$as_echo "$withval" >&6; }
9670case "$withval" in
9671 siphash24)
9672 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9673
9674 ;;
9675 fnv)
9676 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9677
9678 ;;
9679 *)
9680 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9681 ;;
9682esac
9683
9684else
9685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9686$as_echo "default" >&6; }
9687fi
9688
9689
Charles-François Natalid30b0222014-05-08 23:08:51 +01009690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9691$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9692
9693# Check whether --with-address_sanitizer was given.
9694if test "${with_address_sanitizer+set}" = set; then :
9695 withval=$with_address_sanitizer;
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9697$as_echo "$withval" >&6; }
9698BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9699LDFLAGS="-fsanitize=address $LDFLAGS"
9700
9701else
9702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9703$as_echo "no" >&6; }
9704fi
9705
9706
Guido van Rossum70c7f481998-03-26 18:44:10 +00009707# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9709$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009710if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009712else
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009714LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718/* Override any GCC internal prototype to avoid an error.
9719 Use char because int might match the return type of a GCC
9720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009721#ifdef __cplusplus
9722extern "C"
9723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009724char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009725int
9726main ()
9727{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ;
9730 return 0;
9731}
9732_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009735else
Matthias Kloseb9621712010-04-24 17:59:49 +00009736 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009738rm -f core conftest.err conftest.$ac_objext \
9739 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009740LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9743$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009744if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009745 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009746fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009747 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9749$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009750if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009752else
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009754LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009757
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009758/* Override any GCC internal prototype to avoid an error.
9759 Use char because int might match the return type of a GCC
9760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009761#ifdef __cplusplus
9762extern "C"
9763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009764char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009765int
9766main ()
9767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009768return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 ;
9770 return 0;
9771}
9772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009773if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009774 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009775else
Matthias Kloseb9621712010-04-24 17:59:49 +00009776 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009778rm -f core conftest.err conftest.$ac_objext \
9779 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009780LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009781fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9783$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009784if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009785 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009786fi
9787 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009788
Matthias Kloseb9621712010-04-24 17:59:49 +00009789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9790$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009793if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9796$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009797LIBS="$withval $LIBS"
9798
9799else
Matthias Kloseb9621712010-04-24 17:59:49 +00009800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9801$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009802fi
9803
Guido van Rossum7f43da71994-08-01 12:15:30 +00009804
Victor Stinner8291b5e2015-03-20 16:03:14 +01009805
9806
9807
9808
9809
9810
9811
9812if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9813 if test -n "$ac_tool_prefix"; then
9814 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9815set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9817$as_echo_n "checking for $ac_word... " >&6; }
9818if ${ac_cv_path_PKG_CONFIG+:} false; then :
9819 $as_echo_n "(cached) " >&6
9820else
9821 case $PKG_CONFIG in
9822 [\\/]* | ?:[\\/]*)
9823 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9824 ;;
9825 *)
9826 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9827for as_dir in $PATH
9828do
9829 IFS=$as_save_IFS
9830 test -z "$as_dir" && as_dir=.
9831 for ac_exec_ext in '' $ac_executable_extensions; do
9832 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9833 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9834 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9835 break 2
9836 fi
9837done
9838 done
9839IFS=$as_save_IFS
9840
9841 ;;
9842esac
9843fi
9844PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9845if test -n "$PKG_CONFIG"; then
9846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9847$as_echo "$PKG_CONFIG" >&6; }
9848else
9849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9850$as_echo "no" >&6; }
9851fi
9852
9853
9854fi
9855if test -z "$ac_cv_path_PKG_CONFIG"; then
9856 ac_pt_PKG_CONFIG=$PKG_CONFIG
9857 # Extract the first word of "pkg-config", so it can be a program name with args.
9858set dummy pkg-config; ac_word=$2
9859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9860$as_echo_n "checking for $ac_word... " >&6; }
9861if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9862 $as_echo_n "(cached) " >&6
9863else
9864 case $ac_pt_PKG_CONFIG in
9865 [\\/]* | ?:[\\/]*)
9866 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9867 ;;
9868 *)
9869 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9870for as_dir in $PATH
9871do
9872 IFS=$as_save_IFS
9873 test -z "$as_dir" && as_dir=.
9874 for ac_exec_ext in '' $ac_executable_extensions; do
9875 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9876 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9877 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9878 break 2
9879 fi
9880done
9881 done
9882IFS=$as_save_IFS
9883
9884 ;;
9885esac
9886fi
9887ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9888if test -n "$ac_pt_PKG_CONFIG"; then
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9890$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9891else
9892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893$as_echo "no" >&6; }
9894fi
9895
9896 if test "x$ac_pt_PKG_CONFIG" = x; then
9897 PKG_CONFIG=""
9898 else
9899 case $cross_compiling:$ac_tool_warned in
9900yes:)
9901{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9902$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9903ac_tool_warned=yes ;;
9904esac
9905 PKG_CONFIG=$ac_pt_PKG_CONFIG
9906 fi
9907else
9908 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9909fi
9910
9911fi
9912if test -n "$PKG_CONFIG"; then
9913 _pkg_min_version=0.9.0
9914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9915$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9916 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9918$as_echo "yes" >&6; }
9919 else
9920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9921$as_echo "no" >&6; }
9922 PKG_CONFIG=""
9923 fi
9924fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009925
9926# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9928$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009929
9930# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009931if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009932 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009933else
9934 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009935fi
9936
9937
Matthias Kloseb9621712010-04-24 17:59:49 +00009938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9939$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009940
9941# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9943$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009944
9945# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009946if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009947 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009948else
9949 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009950fi
9951
9952
9953if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009954 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9955else
9956 LIBFFI_INCLUDEDIR=""
9957fi
9958
9959
Matthias Kloseb9621712010-04-24 17:59:49 +00009960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9961$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009962
Stefan Krah60187b52012-03-23 19:06:27 +01009963# Check for use of the system libmpdec library
9964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9965$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9966
9967# Check whether --with-system_libmpdec was given.
9968if test "${with_system_libmpdec+set}" = set; then :
9969 withval=$with_system_libmpdec;
9970else
9971 with_system_libmpdec="no"
9972fi
9973
9974
9975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9976$as_echo "$with_system_libmpdec" >&6; }
9977
Benjamin Peterson076ed002010-10-31 17:11:02 +00009978# Check for support for loadable sqlite extensions
9979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9980$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9981# Check whether --enable-loadable-sqlite-extensions was given.
9982if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9983 enableval=$enable_loadable_sqlite_extensions;
9984else
9985 enable_loadable_sqlite_extensions="no"
9986fi
9987
9988
9989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9990$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9991
Ned Deilyd819b932013-09-06 01:07:05 -07009992# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9993
9994
9995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9996$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9997
9998# Check whether --with-tcltk-includes was given.
9999if test "${with_tcltk_includes+set}" = set; then :
10000 withval=$with_tcltk_includes;
10001else
10002 with_tcltk_includes="default"
10003fi
10004
10005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10006$as_echo "$with_tcltk_includes" >&6; }
10007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10008$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10009
10010# Check whether --with-tcltk-libs was given.
10011if test "${with_tcltk_libs+set}" = set; then :
10012 withval=$with_tcltk_libs;
10013else
10014 with_tcltk_libs="default"
10015fi
10016
10017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10018$as_echo "$with_tcltk_libs" >&6; }
10019if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10020then
10021 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10022 then
10023 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10024 fi
10025 TCLTK_INCLUDES=""
10026 TCLTK_LIBS=""
10027else
10028 TCLTK_INCLUDES="$with_tcltk_includes"
10029 TCLTK_LIBS="$with_tcltk_libs"
10030fi
10031
Matthias Klose55708cc2009-04-30 08:06:49 +000010032# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10034$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010035
10036# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010037if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010038 withval=$with_dbmliborder;
10039if test x$with_dbmliborder = xyes
10040then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010041as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010042else
10043 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10044 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10045 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010046 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010047 fi
10048 done
10049fi
10050fi
10051
Matthias Kloseb9621712010-04-24 17:59:49 +000010052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10053$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010054
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010055# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010056
10057
Matthias Kloseb9621712010-04-24 17:59:49 +000010058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10059$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010061# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010062if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063 withval=$with_signal_module;
10064fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010065
10066
10067if test -z "$with_signal_module"
10068then with_signal_module="yes"
10069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10071$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010072
10073if test "${with_signal_module}" = "yes"; then
10074 USE_SIGNAL_MODULE=""
10075 SIGNAL_OBJS=""
10076else
10077 USE_SIGNAL_MODULE="#"
10078 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10079fi
10080
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010081# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010082
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010083USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085
Martin v. Löwis11437992002-04-12 09:54:03 +000010086
10087# Templates for things AC_DEFINEd more than once.
10088# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010089
10090
Martin v. Löwis11437992002-04-12 09:54:03 +000010091
Matthias Kloseb9621712010-04-24 17:59:49 +000010092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10093$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010095# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010096if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097 withval=$with_threads;
10098fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010099
10100
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010101# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010102
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010103# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010104if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010105 withval=$with_thread; with_threads=$with_thread
10106fi
10107
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010108
10109if test -z "$with_threads"
10110then with_threads="yes"
10111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10113$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010114
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010115
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010116if test "$with_threads" = "no"
10117then
10118 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010119elif test "$ac_cv_pthread_is_default" = yes
10120then
Matthias Kloseb9621712010-04-24 17:59:49 +000010121 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010122
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010123 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010124 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010125
10126 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010128elif test "$ac_cv_kpthread" = "yes"
10129then
10130 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010131 if test "$ac_cv_cxx_thread" = "yes"; then
10132 CXX="$CXX -Kpthread"
10133 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010135
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010136 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010137 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010138elif test "$ac_cv_kthread" = "yes"
10139then
10140 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010141 if test "$ac_cv_cxx_thread" = "yes"; then
10142 CXX="$CXX -Kthread"
10143 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010144 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010145
10146 posix_threads=yes
10147 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010148elif test "$ac_cv_pthread" = "yes"
10149then
10150 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010151 if test "$ac_cv_cxx_thread" = "yes"; then
10152 CXX="$CXX -pthread"
10153 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010154 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010155
10156 posix_threads=yes
10157 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010158else
10159 if test ! -z "$with_threads" -a -d "$with_threads"
10160 then LDFLAGS="$LDFLAGS -L$with_threads"
10161 fi
10162 if test ! -z "$withval" -a -d "$withval"
10163 then LDFLAGS="$LDFLAGS -L$withval"
10164 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010165
10166 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010167 # define _POSIX_THREADS in unistd.h. Some apparently don't
10168 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10170$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010172/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010173
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010174#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010175#ifdef _POSIX_THREADS
10176yes
10177#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010178
10179_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010181 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010182 unistd_defines_pthreads=yes
10183else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010184 unistd_defines_pthreads=no
10185fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010186rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010187
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10189$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010190
Matthias Kloseb9621712010-04-24 17:59:49 +000010191 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010192
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010193 # Just looking for pthread_create in libpthread is not enough:
10194 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10195 # So we really have to include pthread.h, and then link.
10196 _libs=$LIBS
10197 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10199$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010201/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010202
10203#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010204#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010205
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010206void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010207int
10208main ()
10209{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010210
10211pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010212 ;
10213 return 0;
10214}
10215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010216if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010217
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10219$as_echo "yes" >&6; }
10220 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010221
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010222 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010223 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010224else
Martin v. Löwis11437992002-04-12 09:54:03 +000010225
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010226 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010227 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010228if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010229 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010230
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010231 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010232 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010233else
Guido van Rossumad678af1998-10-02 14:42:15 +000010234
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10236$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010237if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010239else
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010241LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245/* Override any GCC internal prototype to avoid an error.
10246 Use char because int might match the return type of a GCC
10247 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248#ifdef __cplusplus
10249extern "C"
10250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010251char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010252int
10253main ()
10254{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ;
10257 return 0;
10258}
10259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010260if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010262else
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010265rm -f core conftest.err conftest.$ac_objext \
10266 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010267LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10270$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010271if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010273
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010274 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010275 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010276 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010277else
Greg Steinadf63d62000-07-05 10:38:09 +000010278
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10280$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010281if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010282 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010283else
Martin v. Löwis11437992002-04-12 09:54:03 +000010284 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010285LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289/* Override any GCC internal prototype to avoid an error.
10290 Use char because int might match the return type of a GCC
10291 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010292#ifdef __cplusplus
10293extern "C"
10294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010295char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010296int
10297main ()
10298{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 ;
10301 return 0;
10302}
10303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010304if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010306else
Matthias Kloseb9621712010-04-24 17:59:49 +000010307 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010308fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010309rm -f core conftest.err conftest.$ac_objext \
10310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010311LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10314$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010315if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010316 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010317
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010318 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010319 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010320 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010321else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010322
Matthias Kloseb9621712010-04-24 17:59:49 +000010323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10324$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010325if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010327else
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010329LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010332
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010333/* Override any GCC internal prototype to avoid an error.
10334 Use char because int might match the return type of a GCC
10335 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010336#ifdef __cplusplus
10337extern "C"
10338#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010339char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010340int
10341main ()
10342{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010344 ;
10345 return 0;
10346}
10347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010348if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010349 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010350else
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010352fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010353rm -f core conftest.err conftest.$ac_objext \
10354 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010355LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010356fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10358$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010359if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010361
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010362 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010363 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010364 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010365else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010366
Matthias Kloseb9621712010-04-24 17:59:49 +000010367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10368$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010369if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010370 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010371else
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010373LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010375/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010376
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010377/* Override any GCC internal prototype to avoid an error.
10378 Use char because int might match the return type of a GCC
10379 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010380#ifdef __cplusplus
10381extern "C"
10382#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010383char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010384int
10385main ()
10386{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010387return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 ;
10389 return 0;
10390}
10391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010392if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010393 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010394else
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010396fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010397rm -f core conftest.err conftest.$ac_objext \
10398 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010399LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010400fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10402$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010403if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010404 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010405
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010406 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010407 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010408 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010409else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010410
Martin v. Löwis130fb172001-07-19 11:00:41 +000010411 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010412fi
10413
Guido van Rossum627b2d71993-12-24 10:39:16 +000010414
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010415fi
10416
Guido van Rossum0be3e491997-05-22 20:33:33 +000010417fi
10418
Guido van Rossum49545951997-12-02 19:28:29 +000010419fi
10420
Guido van Rossumb93a8621998-05-07 13:27:32 +000010421fi
10422
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010424rm -f core conftest.err conftest.$ac_objext \
10425 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010426
Matthias Kloseb9621712010-04-24 17:59:49 +000010427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10428$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010429if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010430 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010431else
Martin v. Löwis11437992002-04-12 09:54:03 +000010432 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010433LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010435/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437/* Override any GCC internal prototype to avoid an error.
10438 Use char because int might match the return type of a GCC
10439 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010440#ifdef __cplusplus
10441extern "C"
10442#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010443char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010444int
10445main ()
10446{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010447return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010448 ;
10449 return 0;
10450}
10451_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010452if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010453 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010454else
Matthias Kloseb9621712010-04-24 17:59:49 +000010455 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010456fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010457rm -f core conftest.err conftest.$ac_objext \
10458 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010459LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010460fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10462$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010463if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010464 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010465
Martin v. Löwis130fb172001-07-19 11:00:41 +000010466 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010467 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010468 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010469fi
10470
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010471
Neal Norwitza978ab02002-11-02 16:58:05 +000010472 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10474$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010475if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010477else
Martin v. Löwis11437992002-04-12 09:54:03 +000010478 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010479LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010483/* Override any GCC internal prototype to avoid an error.
10484 Use char because int might match the return type of a GCC
10485 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010486#ifdef __cplusplus
10487extern "C"
10488#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010489char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010490int
10491main ()
10492{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010493return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010494 ;
10495 return 0;
10496}
10497_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010498if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010499 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010500else
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010503rm -f core conftest.err conftest.$ac_objext \
10504 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010505LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10508$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010509if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010511
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010512 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010513 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010514 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010515fi
10516
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010517 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010518fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010519
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010520if test "$posix_threads" = "yes"; then
10521 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010522
Matthias Kloseb9621712010-04-24 17:59:49 +000010523$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010524
10525 fi
10526
10527 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10528 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010529 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010530$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010531
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010532 ;;
10533 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010534$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010535
10536 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010537 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010538$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010539
10540 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010541 esac
10542
Matthias Kloseb9621712010-04-24 17:59:49 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10544$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010545 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010547else
Matthias Kloseb9621712010-04-24 17:59:49 +000010548 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010549 ac_cv_pthread_system_supported=no
10550else
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010552/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010553
10554 #include <stdio.h>
10555 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010556 void *foo(void *parm) {
10557 return NULL;
10558 }
10559 main() {
10560 pthread_attr_t attr;
10561 pthread_t id;
10562 if (pthread_attr_init(&attr)) exit(-1);
10563 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10564 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10565 exit(0);
10566 }
10567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010568if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010569 ac_cv_pthread_system_supported=yes
10570else
Matthias Kloseb9621712010-04-24 17:59:49 +000010571 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010572fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010573rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10574 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010575fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010576
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010577
Guido van Rossum627b2d71993-12-24 10:39:16 +000010578fi
10579
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10581$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010582 if test "$ac_cv_pthread_system_supported" = "yes"; then
10583
Matthias Kloseb9621712010-04-24 17:59:49 +000010584$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010585
10586 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010587 for ac_func in pthread_sigmask
10588do :
10589 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010590if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010591 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010592#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010593_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010594 case $ac_sys_system in
10595 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596
Matthias Kloseb9621712010-04-24 17:59:49 +000010597$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010598
10599 ;;
10600 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010601fi
10602done
10603
Christian Heimesf77b4b22013-08-21 13:26:05 +020010604 for ac_func in pthread_atfork
10605do :
10606 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10607if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10608 cat >>confdefs.h <<_ACEOF
10609#define HAVE_PTHREAD_ATFORK 1
10610_ACEOF
10611
10612fi
10613done
10614
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010615fi
10616
10617
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010618# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010619
Matthias Kloseb9621712010-04-24 17:59:49 +000010620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10621$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010622# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010623if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010625 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10627$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010628 ipv6=no
10629 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10631$as_echo "yes" >&6; }
10632 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010633
10634 ipv6=yes
10635 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010636 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010637else
Martin v. Löwis11437992002-04-12 09:54:03 +000010638
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010640/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010641 /* AF_INET6 available check */
10642#include <sys/types.h>
10643#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010644int
10645main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010646{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010647int domain = AF_INET6;
10648 ;
10649 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010650}
Martin v. Löwis11437992002-04-12 09:54:03 +000010651_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010652if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010653
Matthias Kloseb9621712010-04-24 17:59:49 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10655$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010656 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010657
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010658else
Matthias Kloseb159a552010-04-25 21:00:44 +000010659
Matthias Kloseb9621712010-04-24 17:59:49 +000010660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10661$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010662 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010663
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010664fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010667if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10669$as_echo_n "checking if RFC2553 API is available... " >&6; }
10670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010671/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010672
10673 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010674#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010675int
10676main ()
10677{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010678struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010679 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010680 ;
10681 return 0;
10682}
Matthias Kloseb159a552010-04-25 21:00:44 +000010683
Martin v. Löwis11437992002-04-12 09:54:03 +000010684_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010685if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010686
10687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010688$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010689 ipv6=yes
10690
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010691else
Matthias Kloseb159a552010-04-25 21:00:44 +000010692
10693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010694$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010695 ipv6=no
10696
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010699fi
10700
10701if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010703
10704fi
10705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706fi
10707
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708
10709ipv6type=unknown
10710ipv6lib=none
10711ipv6trylibc=no
10712
10713if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10715$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010716 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10717 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010718 case $i in
10719 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010721/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010722
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010723#include <netinet/in.h>
10724#ifdef IPV6_INRIA_VERSION
10725yes
10726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010727_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010728if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010730 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010731fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010732rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010733
10734 ;;
10735 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010737/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010738
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739#include <netinet/in.h>
10740#ifdef __KAME__
10741yes
10742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010743_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010745 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010746 ipv6type=$i;
10747 ipv6lib=inet6
10748 ipv6libdir=/usr/local/v6/lib
10749 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010750fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010751rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010752
10753 ;;
10754 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010756/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010757
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758#include <features.h>
10759#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10760yes
10761#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010762_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010765 ipv6type=$i;
10766 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010767fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010768rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769
10770 ;;
10771 linux-inet6)
10772 if test -d /usr/inet6; then
10773 ipv6type=$i
10774 ipv6lib=inet6
10775 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010776 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010777 fi
10778 ;;
10779 solaris)
10780 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010781 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010782 ipv6type=$i
10783 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010784 fi
10785 fi
10786 ;;
10787 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010789/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010790
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010791#include <sys/param.h>
10792#ifdef _TOSHIBA_INET6
10793yes
10794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010795_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010798 ipv6type=$i;
10799 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010800 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010801fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010802rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010803
10804 ;;
10805 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010807/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010808
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809#include </usr/local/v6/include/sys/v6config.h>
10810#ifdef __V6D__
10811yes
10812#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010813_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010816 ipv6type=$i;
10817 ipv6lib=v6;
10818 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010819 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010821rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010822
10823 ;;
10824 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010826/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010827
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828#include <sys/param.h>
10829#ifdef _ZETA_MINAMI_INET6
10830yes
10831#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010832_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010834 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010835 ipv6type=$i;
10836 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010837 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010838fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010839rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010840
10841 ;;
10842 esac
10843 if test "$ipv6type" != "unknown"; then
10844 break
10845 fi
10846 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10848$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849fi
10850
10851if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10852 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10853 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10854 echo "using lib$ipv6lib"
10855 else
10856 if test $ipv6trylibc = "yes"; then
10857 echo "using libc"
10858 else
10859 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10860 echo "You need to fetch lib$ipv6lib.a from appropriate"
10861 echo 'ipv6 kit and compile beforehand.'
10862 exit 1
10863 fi
10864 fi
10865fi
10866
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10868$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10870/* end confdefs.h. */
10871 /* CAN_RAW_FD_FRAMES available check */
10872#include <linux/can/raw.h>
10873int
10874main ()
10875{
10876int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10877 ;
10878 return 0;
10879}
10880_ACEOF
10881if ac_fn_c_try_compile "$LINENO"; then :
10882
10883
10884$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10885
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10887$as_echo "yes" >&6; }
10888
10889else
10890
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10892$as_echo "no" >&6; }
10893
10894fi
10895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10896
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10898$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010900/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010901
10902 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010903int
10904main ()
10905{
10906FSIORefNum fRef = 0
10907 ;
10908 return 0;
10909}
Matthias Kloseb159a552010-04-25 21:00:44 +000010910
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010911_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010912if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010913
Matthias Kloseb159a552010-04-25 21:00:44 +000010914
Matthias Kloseb9621712010-04-24 17:59:49 +000010915$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010916
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10918$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010919
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010920else
Matthias Kloseb159a552010-04-25 21:00:44 +000010921
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10923$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010924
10925fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10927
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010928# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10930$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010932# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010933if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010934 withval=$with_doc_strings;
10935fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010936
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010937
10938if test -z "$with_doc_strings"
10939then with_doc_strings="yes"
10940fi
10941if test "$with_doc_strings" != "no"
10942then
10943
Matthias Kloseb9621712010-04-24 17:59:49 +000010944$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010945
10946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10948$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010949
Antoine Pitrou042b1282010-08-13 21:15:58 +000010950# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10952$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010954# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010955if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010956 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010957if test "$withval" != no
10958then
10959
Matthias Kloseb9621712010-04-24 17:59:49 +000010960$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010961
Matthias Kloseb9621712010-04-24 17:59:49 +000010962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10963$as_echo "yes" >&6; }
10964else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10965$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010966fi
10967else
Matthias Kloseb9621712010-04-24 17:59:49 +000010968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970fi
10971
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010972
10973# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10975$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010976
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010978if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010979 withval=$with_pymalloc;
10980fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010981
Neil Schemenauera35c6882001-02-27 04:45:05 +000010982
Neil Schemenauer16c22972002-03-22 15:34:49 +000010983if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010984then
10985 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010986fi
10987if test "$with_pymalloc" != "no"
10988then
Martin v. Löwis11437992002-04-12 09:54:03 +000010989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010991
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010992 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10995$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010996
Benjamin Peterson05159c42009-12-03 03:01:27 +000010997# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10999$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011000
11001# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011002if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011003 withval=$with_valgrind;
11004else
11005 with_valgrind=no
11006fi
11007
Matthias Kloseb9621712010-04-24 17:59:49 +000011008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11009$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011010if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011011 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 +020011012if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011013
Matthias Kloseb9621712010-04-24 17:59:49 +000011014$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011015
11016else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011017 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011018
11019fi
11020
11021
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011022 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011023fi
11024
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011025# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011026
Guido van Rossum98935bf2001-09-05 19:13:16 +000011027DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011028
Guido van Rossume97ee181999-12-20 21:27:22 +000011029# the dlopen() function means we might want to use dynload_shlib.o. some
11030# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011031for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011032do :
11033 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011034if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011035 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011036#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011037_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011038
Guido van Rossume97ee181999-12-20 21:27:22 +000011039fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011040done
Guido van Rossume97ee181999-12-20 21:27:22 +000011041
Michael W. Hudson54241132001-12-07 15:38:26 +000011042
Guido van Rossume97ee181999-12-20 21:27:22 +000011043# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11044# loading of modules.
11045
Matthias Kloseb9621712010-04-24 17:59:49 +000011046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11047$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011048if test -z "$DYNLOADFILE"
11049then
11050 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011051 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11052 if test "$ac_cv_func_dlopen" = yes
11053 then DYNLOADFILE="dynload_shlib.o"
11054 else DYNLOADFILE="dynload_aix.o"
11055 fi
11056 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011057 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011058 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11059 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011060 *)
11061 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11062 # out any dynamic loading
11063 if test "$ac_cv_func_dlopen" = yes
11064 then DYNLOADFILE="dynload_shlib.o"
11065 else DYNLOADFILE="dynload_stub.o"
11066 fi
11067 ;;
11068 esac
11069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11071$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011072if test "$DYNLOADFILE" != "dynload_stub.o"
11073then
Martin v. Löwis11437992002-04-12 09:54:03 +000011074
Matthias Kloseb9621712010-04-24 17:59:49 +000011075$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011076
11077fi
11078
Neil Schemenauer4e425612001-06-19 15:44:15 +000011079# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11080
Michael W. Hudson54241132001-12-07 15:38:26 +000011081
Matthias Kloseb9621712010-04-24 17:59:49 +000011082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11083$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011084if test -z "$MACHDEP_OBJS"
11085then
Jack Jansene578a632001-08-15 01:27:14 +000011086 MACHDEP_OBJS=$extra_machdep_objs
11087else
11088 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011089fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011090if test -z "$MACHDEP_OBJS"; then
11091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11092$as_echo "none" >&6; }
11093else
11094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11095$as_echo "$MACHDEP_OBJS" >&6; }
11096fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011097
Guido van Rossum627b2d71993-12-24 10:39:16 +000011098# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011099for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011100 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011101 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011102 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011103 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011104 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011105 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011106 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11107 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011108 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011109 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011110 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011111 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011112 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011113 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011114 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11115 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011116 sigaction sigaltstack siginterrupt sigpending sigrelse \
11117 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011118 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011119 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011120 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011121do :
11122 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11123ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011124if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011126#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011127_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011128
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011129fi
11130done
11131
Michael W. Hudson54241132001-12-07 15:38:26 +000011132
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011133ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11134 #include <dirent.h>
11135"
11136if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11137
11138$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11139
11140fi
11141
11142
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011143# For some functions, having a definition is not sufficient, since
11144# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11146$as_echo_n "checking for chroot... " >&6; }
11147cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011148/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011149#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011150int
11151main ()
11152{
11153void *x=chroot
11154 ;
11155 return 0;
11156}
11157_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011158if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011159
Matthias Kloseb9621712010-04-24 17:59:49 +000011160$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011161
Matthias Kloseb159a552010-04-25 21:00:44 +000011162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011163$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011164else
Matthias Kloseb9621712010-04-24 17:59:49 +000011165 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11166$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011167
11168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011169rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11171$as_echo_n "checking for link... " >&6; }
11172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011173/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011174#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011175int
11176main ()
11177{
11178void *x=link
11179 ;
11180 return 0;
11181}
11182_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011183if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011184
Matthias Kloseb9621712010-04-24 17:59:49 +000011185$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011186
Matthias Kloseb159a552010-04-25 21:00:44 +000011187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011188$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011189else
Matthias Kloseb9621712010-04-24 17:59:49 +000011190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11191$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011192
11193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11196$as_echo_n "checking for symlink... " >&6; }
11197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011198/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011199#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011200int
11201main ()
11202{
11203void *x=symlink
11204 ;
11205 return 0;
11206}
11207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011208if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011209
Matthias Kloseb9621712010-04-24 17:59:49 +000011210$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011211
Matthias Kloseb159a552010-04-25 21:00:44 +000011212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011213$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011214else
Matthias Kloseb9621712010-04-24 17:59:49 +000011215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11216$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011217
11218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11221$as_echo_n "checking for fchdir... " >&6; }
11222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011223/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011224#include <unistd.h>
11225int
11226main ()
11227{
11228void *x=fchdir
11229 ;
11230 return 0;
11231}
11232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011234
Matthias Kloseb9621712010-04-24 17:59:49 +000011235$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011236
Matthias Kloseb159a552010-04-25 21:00:44 +000011237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011238$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011239else
Matthias Kloseb9621712010-04-24 17:59:49 +000011240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11241$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011242
11243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11246$as_echo_n "checking for fsync... " >&6; }
11247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011248/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011249#include <unistd.h>
11250int
11251main ()
11252{
11253void *x=fsync
11254 ;
11255 return 0;
11256}
11257_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011258if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011261
Matthias Kloseb159a552010-04-25 21:00:44 +000011262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011263$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011264else
Matthias Kloseb9621712010-04-24 17:59:49 +000011265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11266$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011267
11268fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11271$as_echo_n "checking for fdatasync... " >&6; }
11272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011273/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011274#include <unistd.h>
11275int
11276main ()
11277{
11278void *x=fdatasync
11279 ;
11280 return 0;
11281}
11282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011283if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011284
Matthias Kloseb9621712010-04-24 17:59:49 +000011285$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011286
Matthias Kloseb159a552010-04-25 21:00:44 +000011287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011288$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011289else
Matthias Kloseb9621712010-04-24 17:59:49 +000011290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11291$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011292
11293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11296$as_echo_n "checking for epoll... " >&6; }
11297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011298/* end confdefs.h. */
11299#include <sys/epoll.h>
11300int
11301main ()
11302{
11303void *x=epoll_create
11304 ;
11305 return 0;
11306}
11307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011308if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011311
Matthias Kloseb159a552010-04-25 21:00:44 +000011312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011313$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011314else
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011317
11318fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11321$as_echo_n "checking for epoll_create1... " >&6; }
11322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11323/* end confdefs.h. */
11324#include <sys/epoll.h>
11325int
11326main ()
11327{
11328void *x=epoll_create1
11329 ;
11330 return 0;
11331}
11332_ACEOF
11333if ac_fn_c_try_compile "$LINENO"; then :
11334
11335$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11336
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11338$as_echo "yes" >&6; }
11339else
11340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
11342
11343fi
11344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11346$as_echo_n "checking for kqueue... " >&6; }
11347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011348/* end confdefs.h. */
11349
11350#include <sys/types.h>
11351#include <sys/event.h>
11352
11353int
11354main ()
11355{
11356int x=kqueue()
11357 ;
11358 return 0;
11359}
11360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011361if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011362
Matthias Kloseb9621712010-04-24 17:59:49 +000011363$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011364
Matthias Kloseb159a552010-04-25 21:00:44 +000011365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011366$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011367else
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11369$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011370
11371fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11374$as_echo_n "checking for prlimit... " >&6; }
11375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11376/* end confdefs.h. */
11377
11378#include <sys/time.h>
11379#include <sys/resource.h>
11380
11381int
11382main ()
11383{
11384void *x=prlimit
11385 ;
11386 return 0;
11387}
11388_ACEOF
11389if ac_fn_c_try_compile "$LINENO"; then :
11390
11391$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11392
11393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11394$as_echo "yes" >&6; }
11395else
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11397$as_echo "no" >&6; }
11398
11399fi
11400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11401
Martin v. Löwisd5843682002-11-21 20:41:28 +000011402# On some systems (eg. FreeBSD 5), we would find a definition of the
11403# functions ctermid_r, setgroups in the library, but no prototype
11404# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11405# address to avoid compiler warnings and potential miscompilations
11406# because of the missing prototypes.
11407
Matthias Kloseb9621712010-04-24 17:59:49 +000011408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11409$as_echo_n "checking for ctermid_r... " >&6; }
11410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011411/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011412
Martin v. Löwisd5843682002-11-21 20:41:28 +000011413#include <stdio.h>
11414
Martin v. Löwisd5843682002-11-21 20:41:28 +000011415int
11416main ()
11417{
11418void* p = ctermid_r
11419 ;
11420 return 0;
11421}
11422_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011423if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011424
Matthias Kloseb9621712010-04-24 17:59:49 +000011425$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011426
Matthias Kloseb159a552010-04-25 21:00:44 +000011427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011428$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011429else
Matthias Kloseb9621712010-04-24 17:59:49 +000011430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11431$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011432
11433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11435
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11437$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011438if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011439 $as_echo_n "(cached) " >&6
11440else
11441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011442/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011443#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011444int
11445main ()
11446{
11447void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011448
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011449 ;
11450 return 0;
11451}
11452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011453if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011454 ac_cv_flock_decl=yes
11455else
11456 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011457
11458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011460
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011461fi
11462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11463$as_echo "$ac_cv_flock_decl" >&6; }
11464if test "x${ac_cv_flock_decl}" = xyes; then
11465 for ac_func in flock
11466do :
11467 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011468if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011469 cat >>confdefs.h <<_ACEOF
11470#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011471_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011472
Antoine Pitroua3000072010-09-07 14:52:42 +000011473else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011475$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011476if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011477 $as_echo_n "(cached) " >&6
11478else
11479 ac_check_lib_save_LIBS=$LIBS
11480LIBS="-lbsd $LIBS"
11481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11482/* end confdefs.h. */
11483
11484/* Override any GCC internal prototype to avoid an error.
11485 Use char because int might match the return type of a GCC
11486 builtin and then its argument prototype would still apply. */
11487#ifdef __cplusplus
11488extern "C"
11489#endif
11490char flock ();
11491int
11492main ()
11493{
11494return flock ();
11495 ;
11496 return 0;
11497}
11498_ACEOF
11499if ac_fn_c_try_link "$LINENO"; then :
11500 ac_cv_lib_bsd_flock=yes
11501else
11502 ac_cv_lib_bsd_flock=no
11503fi
11504rm -f core conftest.err conftest.$ac_objext \
11505 conftest$ac_exeext conftest.$ac_ext
11506LIBS=$ac_check_lib_save_LIBS
11507fi
11508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11509$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011510if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011511 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011512
11513
11514$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11515
11516
11517fi
11518
11519
11520fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011521done
11522
Antoine Pitroua3000072010-09-07 14:52:42 +000011523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524
Matthias Kloseb9621712010-04-24 17:59:49 +000011525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11526$as_echo_n "checking for getpagesize... " >&6; }
11527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011528/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011529
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011530#include <unistd.h>
11531
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011532int
11533main ()
11534{
11535void* p = getpagesize
11536 ;
11537 return 0;
11538}
11539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011541
Matthias Kloseb9621712010-04-24 17:59:49 +000011542$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011543
Matthias Kloseb159a552010-04-25 21:00:44 +000011544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011545$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011546else
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11548$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011549
11550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011552
Victor Stinner984890f2011-11-24 13:53:38 +010011553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11554$as_echo_n "checking for broken unsetenv... " >&6; }
11555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11556/* end confdefs.h. */
11557
11558#include <stdlib.h>
11559
11560int
11561main ()
11562{
11563int res = unsetenv("DUMMY")
11564 ;
11565 return 0;
11566}
11567_ACEOF
11568if ac_fn_c_try_compile "$LINENO"; then :
11569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11570$as_echo "no" >&6; }
11571else
11572
11573$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11574
11575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11576$as_echo "yes" >&6; }
11577
11578fi
11579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11580
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011581for ac_prog in true
11582do
11583 # Extract the first word of "$ac_prog", so it can be a program name with args.
11584set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11586$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011587if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011588 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011589else
11590 if test -n "$TRUE"; then
11591 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11592else
11593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11594for as_dir in $PATH
11595do
11596 IFS=$as_save_IFS
11597 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011598 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011600 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 $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 +000011602 break 2
11603 fi
11604done
Matthias Kloseb9621712010-04-24 17:59:49 +000011605 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011606IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011607
11608fi
11609fi
11610TRUE=$ac_cv_prog_TRUE
11611if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11613$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011614else
Matthias Kloseb9621712010-04-24 17:59:49 +000011615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11616$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011617fi
11618
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011619
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011620 test -n "$TRUE" && break
11621done
11622test -n "$TRUE" || TRUE="/bin/true"
11623
11624
Matthias Kloseb9621712010-04-24 17:59:49 +000011625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11626$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011627if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011628 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011629else
11630 ac_check_lib_save_LIBS=$LIBS
11631LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011632cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011633/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011635/* Override any GCC internal prototype to avoid an error.
11636 Use char because int might match the return type of a GCC
11637 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011638#ifdef __cplusplus
11639extern "C"
11640#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011641char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011642int
11643main ()
11644{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011646 ;
11647 return 0;
11648}
11649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011650if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011651 ac_cv_lib_c_inet_aton=yes
11652else
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011655rm -f core conftest.err conftest.$ac_objext \
11656 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011657LIBS=$ac_check_lib_save_LIBS
11658fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11660$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011661if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011662 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011663else
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11665$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011666if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011667 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011668else
11669 ac_check_lib_save_LIBS=$LIBS
11670LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011671cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011672/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011674/* Override any GCC internal prototype to avoid an error.
11675 Use char because int might match the return type of a GCC
11676 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011677#ifdef __cplusplus
11678extern "C"
11679#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011680char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011681int
11682main ()
11683{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011684return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011685 ;
11686 return 0;
11687}
11688_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011689if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011690 ac_cv_lib_resolv_inet_aton=yes
11691else
Matthias Kloseb9621712010-04-24 17:59:49 +000011692 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011693fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011694rm -f core conftest.err conftest.$ac_objext \
11695 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011696LIBS=$ac_check_lib_save_LIBS
11697fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11699$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011700if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011701 cat >>confdefs.h <<_ACEOF
11702#define HAVE_LIBRESOLV 1
11703_ACEOF
11704
11705 LIBS="-lresolv $LIBS"
11706
11707fi
11708
11709
11710fi
11711
11712
Christian Heimesd0764e22007-12-04 15:00:33 +000011713# On Tru64, chflags seems to be present, but calling it will
11714# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11716$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011717if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011719else
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011721 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011722else
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011724/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011725
Christian Heimesd0764e22007-12-04 15:00:33 +000011726#include <sys/stat.h>
11727#include <unistd.h>
11728int main(int argc, char*argv[])
11729{
11730 if(chflags(argv[0], 0) != 0)
11731 return 1;
11732 return 0;
11733}
Ned Deily3eb67d52011-06-28 00:00:28 -070011734
Christian Heimesd0764e22007-12-04 15:00:33 +000011735_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011736if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011737 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011738else
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011740fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11742 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011743fi
11744
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011745
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11748$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011749if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011751if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011752 ac_cv_have_chflags="yes"
11753else
11754 ac_cv_have_chflags="no"
11755fi
11756
11757fi
11758if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011759
Matthias Kloseb9621712010-04-24 17:59:49 +000011760$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011761
11762fi
11763
Matthias Kloseb9621712010-04-24 17:59:49 +000011764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11765$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011766if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011767 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011768else
Matthias Kloseb9621712010-04-24 17:59:49 +000011769 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011770 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011771else
Matthias Kloseb9621712010-04-24 17:59:49 +000011772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011773/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011774
Christian Heimesd0764e22007-12-04 15:00:33 +000011775#include <sys/stat.h>
11776#include <unistd.h>
11777int main(int argc, char*argv[])
11778{
11779 if(lchflags(argv[0], 0) != 0)
11780 return 1;
11781 return 0;
11782}
Ned Deily3eb67d52011-06-28 00:00:28 -070011783
Christian Heimesd0764e22007-12-04 15:00:33 +000011784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011785if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011786 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011787else
Matthias Kloseb9621712010-04-24 17:59:49 +000011788 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011790rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11791 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011792fi
11793
11794
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011795fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11797$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011798if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011800if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011801 ac_cv_have_lchflags="yes"
11802else
11803 ac_cv_have_lchflags="no"
11804fi
11805
11806fi
11807if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011808
Matthias Kloseb9621712010-04-24 17:59:49 +000011809$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011810
11811fi
11812
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011813case $ac_sys_system/$ac_sys_release in
11814Darwin/*)
11815 _CUR_CFLAGS="${CFLAGS}"
11816 _CUR_LDFLAGS="${LDFLAGS}"
11817 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11818 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11819 ;;
11820esac
11821
Matthias Kloseb9621712010-04-24 17:59:49 +000011822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11823$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011824if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011825 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011826else
11827 ac_check_lib_save_LIBS=$LIBS
11828LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +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. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011835#ifdef __cplusplus
11836extern "C"
11837#endif
11838char inflateCopy ();
11839int
11840main ()
11841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011842return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011843 ;
11844 return 0;
11845}
11846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011847if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011848 ac_cv_lib_z_inflateCopy=yes
11849else
Matthias Kloseb9621712010-04-24 17:59:49 +000011850 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011852rm -f core conftest.err conftest.$ac_objext \
11853 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +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_z_inflateCopy" >&5
11857$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011858if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011859
Matthias Kloseb9621712010-04-24 17:59:49 +000011860$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011861
11862fi
11863
11864
11865case $ac_sys_system/$ac_sys_release in
11866Darwin/*)
11867 CFLAGS="${_CUR_CFLAGS}"
11868 LDFLAGS="${_CUR_LDFLAGS}"
11869 ;;
11870esac
11871
Matthias Kloseb9621712010-04-24 17:59:49 +000011872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11873$as_echo_n "checking for hstrerror... " >&6; }
11874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011875/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011876
Martin v. Löwise9416172003-05-03 10:12:45 +000011877#include <netdb.h>
11878
Martin v. Löwise9416172003-05-03 10:12:45 +000011879int
11880main ()
11881{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011882void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011883 ;
11884 return 0;
11885}
11886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011887if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011888
Matthias Kloseb9621712010-04-24 17:59:49 +000011889$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011890
Matthias Kloseb159a552010-04-25 21:00:44 +000011891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011892$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011893else
Matthias Kloseb9621712010-04-24 17:59:49 +000011894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011896
11897fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011898rm -f core conftest.err conftest.$ac_objext \
11899 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011900
Matthias Kloseb9621712010-04-24 17:59:49 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11902$as_echo_n "checking for inet_aton... " >&6; }
11903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011904/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011905
Martin v. Löwis86d66262006-02-17 08:40:11 +000011906#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011907#include <sys/socket.h>
11908#include <netinet/in.h>
11909#include <arpa/inet.h>
11910
Martin v. Löwise9416172003-05-03 10:12:45 +000011911int
11912main ()
11913{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011914void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011915 ;
11916 return 0;
11917}
11918_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011919if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011920
Matthias Kloseb9621712010-04-24 17:59:49 +000011921$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011922
Matthias Kloseb159a552010-04-25 21:00:44 +000011923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011924$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11927$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011928
11929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011930rm -f core conftest.err conftest.$ac_objext \
11931 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11934$as_echo_n "checking for inet_pton... " >&6; }
11935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011936/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011937
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011938#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011939#include <sys/socket.h>
11940#include <netinet/in.h>
11941#include <arpa/inet.h>
11942
Martin v. Löwise9416172003-05-03 10:12:45 +000011943int
11944main ()
11945{
11946void* p = inet_pton
11947 ;
11948 return 0;
11949}
11950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011951if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011952
Matthias Kloseb9621712010-04-24 17:59:49 +000011953$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011954
Matthias Kloseb159a552010-04-25 21:00:44 +000011955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011956$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011957else
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11959$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011960
11961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011963
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011964# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11966$as_echo_n "checking for setgroups... " >&6; }
11967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011968/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011969
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011970#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011971#ifdef HAVE_GRP_H
11972#include <grp.h>
11973#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011974
Martin v. Löwisd5843682002-11-21 20:41:28 +000011975int
11976main ()
11977{
11978void* p = setgroups
11979 ;
11980 return 0;
11981}
11982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011983if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011984
Matthias Kloseb9621712010-04-24 17:59:49 +000011985$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011986
Matthias Kloseb159a552010-04-25 21:00:44 +000011987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011988$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011989else
Matthias Kloseb9621712010-04-24 17:59:49 +000011990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11991$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011992
11993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011995
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011996# check for openpty and forkpty
11997
11998for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011999do :
12000 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012001if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012002 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012003#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012004_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012005
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012006else
Matthias Kloseb9621712010-04-24 17:59:49 +000012007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12008$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012009if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012010 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012011else
Martin v. Löwis11437992002-04-12 09:54:03 +000012012 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012013LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012017/* Override any GCC internal prototype to avoid an error.
12018 Use char because int might match the return type of a GCC
12019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012020#ifdef __cplusplus
12021extern "C"
12022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012023char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012024int
12025main ()
12026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012027return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012028 ;
12029 return 0;
12030}
12031_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012032if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012034else
Matthias Kloseb9621712010-04-24 17:59:49 +000012035 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012037rm -f core conftest.err conftest.$ac_objext \
12038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012039LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012040fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12042$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012043if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012044 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012045 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012046else
Matthias Kloseb9621712010-04-24 17:59:49 +000012047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12048$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012049if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012050 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012051else
12052 ac_check_lib_save_LIBS=$LIBS
12053LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012054cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012055/* end confdefs.h. */
12056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012057/* Override any GCC internal prototype to avoid an error.
12058 Use char because int might match the return type of a GCC
12059 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012060#ifdef __cplusplus
12061extern "C"
12062#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012063char openpty ();
12064int
12065main ()
12066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012068 ;
12069 return 0;
12070}
12071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012072if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012073 ac_cv_lib_bsd_openpty=yes
12074else
Matthias Kloseb9621712010-04-24 17:59:49 +000012075 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012077rm -f core conftest.err conftest.$ac_objext \
12078 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012079LIBS=$ac_check_lib_save_LIBS
12080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12082$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012083if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012084 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012085 LIBS="$LIBS -lbsd"
12086fi
12087
12088
12089fi
12090
Fred Drake8cef4cf2000-06-28 16:40:38 +000012091
12092fi
12093done
12094
12095for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012096do :
12097 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012098if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012100#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012101_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012102
Fred Drake8cef4cf2000-06-28 16:40:38 +000012103else
Matthias Kloseb9621712010-04-24 17:59:49 +000012104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12105$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012106if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012107 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012108else
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012110LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012111cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012114/* Override any GCC internal prototype to avoid an error.
12115 Use char because int might match the return type of a GCC
12116 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012117#ifdef __cplusplus
12118extern "C"
12119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012120char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012121int
12122main ()
12123{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012125 ;
12126 return 0;
12127}
12128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012129if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012131else
Matthias Kloseb9621712010-04-24 17:59:49 +000012132 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012134rm -f core conftest.err conftest.$ac_objext \
12135 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012136LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12139$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012140if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012141 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012142 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12145$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012146if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012147 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012148else
12149 ac_check_lib_save_LIBS=$LIBS
12150LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012152/* end confdefs.h. */
12153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012154/* Override any GCC internal prototype to avoid an error.
12155 Use char because int might match the return type of a GCC
12156 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012157#ifdef __cplusplus
12158extern "C"
12159#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012160char forkpty ();
12161int
12162main ()
12163{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012164return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012165 ;
12166 return 0;
12167}
12168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012169if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012170 ac_cv_lib_bsd_forkpty=yes
12171else
Matthias Kloseb9621712010-04-24 17:59:49 +000012172 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012174rm -f core conftest.err conftest.$ac_objext \
12175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012176LIBS=$ac_check_lib_save_LIBS
12177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12179$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012180if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012182 LIBS="$LIBS -lbsd"
12183fi
12184
12185
12186fi
12187
Fred Drake8cef4cf2000-06-28 16:40:38 +000012188
12189fi
12190done
12191
Jack Jansendd19cf82001-12-06 22:36:17 +000012192
Christian Heimesb186d002008-03-18 15:15:01 +000012193# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012194for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012195do :
12196 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012197if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012198 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012199#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012200_ACEOF
12201
12202fi
12203done
12204
12205
Michael W. Hudson54241132001-12-07 15:38:26 +000012206# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012207for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012208do :
12209 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12210ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012211if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012213#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012214_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012215
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012216fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217done
12218
Michael W. Hudson54241132001-12-07 15:38:26 +000012219
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012220ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012221if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012222 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012223
Martin v. Löwis1142de32002-03-29 16:28:31 +000012224else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012225 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012226 *" dup2.$ac_objext "* ) ;;
12227 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012228 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012229esac
12230
Martin v. Löwis1142de32002-03-29 16:28:31 +000012231fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012232
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012233ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012234if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012235 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12236
12237else
12238 case " $LIBOBJS " in
12239 *" strdup.$ac_objext "* ) ;;
12240 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12241 ;;
12242esac
12243
12244fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012245
12246
12247for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012248do :
12249 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012250if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012252#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012255/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012257int
12258main ()
12259{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012260getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 ;
12262 return 0;
12263}
12264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012266
Matthias Kloseb9621712010-04-24 17:59:49 +000012267$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012268
Guido van Rossum627b2d71993-12-24 10:39:16 +000012269fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012271
Guido van Rossum627b2d71993-12-24 10:39:16 +000012272fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012273done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012274
Jack Jansen150753c2003-03-29 22:07:47 +000012275for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012276do :
12277 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012279 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012280#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012281_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012283/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012284#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012285int
12286main ()
12287{
12288setpgrp(0,0);
12289 ;
12290 return 0;
12291}
12292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012294
Matthias Kloseb9621712010-04-24 17:59:49 +000012295$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012296
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012297fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012299
12300fi
12301done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012302
Thomas Wouters3a584202000-08-05 23:28:51 +000012303for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012304do :
12305 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012306if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012308#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012311/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012312#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012313int
12314main ()
12315{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012316gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012317 ;
12318 return 0;
12319}
12320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012321if ac_fn_c_try_compile "$LINENO"; then :
12322
Guido van Rossum627b2d71993-12-24 10:39:16 +000012323else
Skip Montanaro6dead952003-09-25 14:50:04 +000012324
Matthias Kloseb9621712010-04-24 17:59:49 +000012325$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012326
Martin v. Löwis11437992002-04-12 09:54:03 +000012327
Guido van Rossum627b2d71993-12-24 10:39:16 +000012328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012330
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012331fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012332done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012333
Michael W. Hudson54241132001-12-07 15:38:26 +000012334
Victor Stinnere0be4232011-10-25 13:06:09 +020012335for ac_func in clock_gettime
12336do :
12337 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12338if test "x$ac_cv_func_clock_gettime" = xyes; then :
12339 cat >>confdefs.h <<_ACEOF
12340#define HAVE_CLOCK_GETTIME 1
12341_ACEOF
12342
12343else
12344
12345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12346$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12347if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12348 $as_echo_n "(cached) " >&6
12349else
12350 ac_check_lib_save_LIBS=$LIBS
12351LIBS="-lrt $LIBS"
12352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12353/* end confdefs.h. */
12354
12355/* Override any GCC internal prototype to avoid an error.
12356 Use char because int might match the return type of a GCC
12357 builtin and then its argument prototype would still apply. */
12358#ifdef __cplusplus
12359extern "C"
12360#endif
12361char clock_gettime ();
12362int
12363main ()
12364{
12365return clock_gettime ();
12366 ;
12367 return 0;
12368}
12369_ACEOF
12370if ac_fn_c_try_link "$LINENO"; then :
12371 ac_cv_lib_rt_clock_gettime=yes
12372else
12373 ac_cv_lib_rt_clock_gettime=no
12374fi
12375rm -f core conftest.err conftest.$ac_objext \
12376 conftest$ac_exeext conftest.$ac_ext
12377LIBS=$ac_check_lib_save_LIBS
12378fi
12379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12380$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12381if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12382
Victor Stinner7efb8332014-08-29 15:41:08 +020012383 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012384 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12385
12386
12387$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12388
12389
12390fi
12391
12392
12393fi
12394done
12395
12396
12397for ac_func in clock_getres
12398do :
12399 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12400if test "x$ac_cv_func_clock_getres" = xyes; then :
12401 cat >>confdefs.h <<_ACEOF
12402#define HAVE_CLOCK_GETRES 1
12403_ACEOF
12404
12405else
12406
12407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12408$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12409if ${ac_cv_lib_rt_clock_getres+:} false; then :
12410 $as_echo_n "(cached) " >&6
12411else
12412 ac_check_lib_save_LIBS=$LIBS
12413LIBS="-lrt $LIBS"
12414cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12415/* end confdefs.h. */
12416
12417/* Override any GCC internal prototype to avoid an error.
12418 Use char because int might match the return type of a GCC
12419 builtin and then its argument prototype would still apply. */
12420#ifdef __cplusplus
12421extern "C"
12422#endif
12423char clock_getres ();
12424int
12425main ()
12426{
12427return clock_getres ();
12428 ;
12429 return 0;
12430}
12431_ACEOF
12432if ac_fn_c_try_link "$LINENO"; then :
12433 ac_cv_lib_rt_clock_getres=yes
12434else
12435 ac_cv_lib_rt_clock_getres=no
12436fi
12437rm -f core conftest.err conftest.$ac_objext \
12438 conftest$ac_exeext conftest.$ac_ext
12439LIBS=$ac_check_lib_save_LIBS
12440fi
12441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12442$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12443if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12444
12445 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12446
12447
12448fi
12449
12450
12451fi
12452done
12453
12454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12456$as_echo_n "checking for major... " >&6; }
12457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012458/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012459
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012460#if defined(MAJOR_IN_MKDEV)
12461#include <sys/mkdev.h>
12462#elif defined(MAJOR_IN_SYSMACROS)
12463#include <sys/sysmacros.h>
12464#else
12465#include <sys/types.h>
12466#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012467
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012468int
12469main ()
12470{
12471
12472 makedev(major(0),minor(0));
12473
12474 ;
12475 return 0;
12476}
12477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012478if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012479
12480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012482
Matthias Kloseb9621712010-04-24 17:59:49 +000012483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12484$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012485
12486else
Skip Montanaro6dead952003-09-25 14:50:04 +000012487
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12489$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012490
12491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012492rm -f core conftest.err conftest.$ac_objext \
12493 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012494
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012495# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012496# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12498$as_echo_n "checking for getaddrinfo... " >&6; }
12499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012500/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012501
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012502#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012503#include <sys/socket.h>
12504#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012505#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012506
Martin v. Löwis11437992002-04-12 09:54:03 +000012507int
12508main ()
12509{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012510getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 ;
12512 return 0;
12513}
12514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012515if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012516 have_getaddrinfo=yes
12517else
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012519fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012520rm -f core conftest.err conftest.$ac_objext \
12521 conftest$ac_exeext conftest.$ac_ext
12522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12523$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012524if test $have_getaddrinfo = yes
12525then
Matthias Kloseb9621712010-04-24 17:59:49 +000012526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12527$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012528 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012530else
Matthias Kloseb9621712010-04-24 17:59:49 +000012531 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012532
12533if test "${enable_ipv6+set}" = set; then
12534 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12535else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012536 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012537fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012538else
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012540/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012541
Stefan Krah19c21392012-11-22 23:47:32 +010012542#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012543#include <sys/types.h>
12544#include <netdb.h>
12545#include <string.h>
12546#include <sys/socket.h>
12547#include <netinet/in.h>
12548
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012549int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012550{
12551 int passive, gaierr, inet4 = 0, inet6 = 0;
12552 struct addrinfo hints, *ai, *aitop;
12553 char straddr[INET6_ADDRSTRLEN], strport[16];
12554
12555 for (passive = 0; passive <= 1; passive++) {
12556 memset(&hints, 0, sizeof(hints));
12557 hints.ai_family = AF_UNSPEC;
12558 hints.ai_flags = passive ? AI_PASSIVE : 0;
12559 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012560 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012561 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12562 (void)gai_strerror(gaierr);
12563 goto bad;
12564 }
12565 for (ai = aitop; ai; ai = ai->ai_next) {
12566 if (ai->ai_addr == NULL ||
12567 ai->ai_addrlen == 0 ||
12568 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12569 straddr, sizeof(straddr), strport, sizeof(strport),
12570 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12571 goto bad;
12572 }
12573 switch (ai->ai_family) {
12574 case AF_INET:
12575 if (strcmp(strport, "54321") != 0) {
12576 goto bad;
12577 }
12578 if (passive) {
12579 if (strcmp(straddr, "0.0.0.0") != 0) {
12580 goto bad;
12581 }
12582 } else {
12583 if (strcmp(straddr, "127.0.0.1") != 0) {
12584 goto bad;
12585 }
12586 }
12587 inet4++;
12588 break;
12589 case AF_INET6:
12590 if (strcmp(strport, "54321") != 0) {
12591 goto bad;
12592 }
12593 if (passive) {
12594 if (strcmp(straddr, "::") != 0) {
12595 goto bad;
12596 }
12597 } else {
12598 if (strcmp(straddr, "::1") != 0) {
12599 goto bad;
12600 }
12601 }
12602 inet6++;
12603 break;
12604 case AF_UNSPEC:
12605 goto bad;
12606 break;
12607 default:
12608 /* another family support? */
12609 break;
12610 }
12611 }
12612 }
12613
12614 if (!(inet4 == 0 || inet4 == 2))
12615 goto bad;
12616 if (!(inet6 == 0 || inet6 == 2))
12617 goto bad;
12618
12619 if (aitop)
12620 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012621 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012622
12623 bad:
12624 if (aitop)
12625 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012626 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012627}
12628
Martin v. Löwis11437992002-04-12 09:54:03 +000012629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012630if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012631 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012632else
Matthias Kloseb9621712010-04-24 17:59:49 +000012633 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12636 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012638
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012639fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012640
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012642
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12644$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12645
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012646if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012647then
12648 if test $ipv6 = yes
12649 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012650 echo 'Fatal: You must get working getaddrinfo() function.'
12651 echo ' or you can specify "--disable-ipv6"'.
12652 exit 1
12653 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012654else
Martin v. Löwis11437992002-04-12 09:54:03 +000012655
Matthias Kloseb9621712010-04-24 17:59:49 +000012656$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012657
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012658fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012659
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012660for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012661do :
12662 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012663if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012664 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012665#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012666_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012667
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012668fi
12669done
12670
Michael W. Hudson54241132001-12-07 15:38:26 +000012671
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012672# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12674$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012675if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012676 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012677else
Matthias Kloseb9621712010-04-24 17:59:49 +000012678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012679/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012680#include <sys/types.h>
12681#include <sys/time.h>
12682#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012683
Martin v. Löwis11437992002-04-12 09:54:03 +000012684int
12685main ()
12686{
12687if ((struct tm *) 0)
12688return 0;
12689 ;
12690 return 0;
12691}
12692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012693if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012694 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012695else
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12701$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012702if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012703
Matthias Kloseb9621712010-04-24 17:59:49 +000012704$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012705
12706fi
12707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12709$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012710if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712else
Matthias Kloseb9621712010-04-24 17:59:49 +000012713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012714/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012715#include <sys/types.h>
12716#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012717
Martin v. Löwis11437992002-04-12 09:54:03 +000012718int
12719main ()
12720{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012721struct tm tm;
12722 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 ;
12725 return 0;
12726}
12727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012728if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729 ac_cv_struct_tm=time.h
12730else
Matthias Kloseb9621712010-04-24 17:59:49 +000012731 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012734fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12736$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012737if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012738
Matthias Kloseb9621712010-04-24 17:59:49 +000012739$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012740
12741fi
12742
Matthias Kloseb9621712010-04-24 17:59:49 +000012743ac_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 +000012744#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012745
Matthias Kloseb9621712010-04-24 17:59:49 +000012746"
Victor Stinnere0be4232011-10-25 13:06:09 +020012747if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012748
12749cat >>confdefs.h <<_ACEOF
12750#define HAVE_STRUCT_TM_TM_ZONE 1
12751_ACEOF
12752
12753
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012754fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012755
Martin v. Löwis11437992002-04-12 09:54:03 +000012756if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12757
Matthias Kloseb9621712010-04-24 17:59:49 +000012758$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012759
12760else
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12762"
Victor Stinnere0be4232011-10-25 13:06:09 +020012763if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012764 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765else
Matthias Kloseb9621712010-04-24 17:59:49 +000012766 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012767fi
12768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012769cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012770#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771_ACEOF
12772
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12774$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012775if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012776 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777else
Matthias Kloseb9621712010-04-24 17:59:49 +000012778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012779/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012780#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012781#if !HAVE_DECL_TZNAME
12782extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012783#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012784
Martin v. Löwis11437992002-04-12 09:54:03 +000012785int
12786main ()
12787{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012789 ;
12790 return 0;
12791}
12792_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012793if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012794 ac_cv_var_tzname=yes
12795else
Matthias Kloseb9621712010-04-24 17:59:49 +000012796 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012797fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012798rm -f core conftest.err conftest.$ac_objext \
12799 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12802$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012803 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012804
Matthias Kloseb9621712010-04-24 17:59:49 +000012805$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012806
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012807 fi
12808fi
12809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810ac_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 +020012811if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012812
12813cat >>confdefs.h <<_ACEOF
12814#define HAVE_STRUCT_STAT_ST_RDEV 1
12815_ACEOF
12816
12817
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012818fi
12819
Matthias Kloseb9621712010-04-24 17:59:49 +000012820ac_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 +020012821if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012822
Martin v. Löwis11437992002-04-12 09:54:03 +000012823cat >>confdefs.h <<_ACEOF
12824#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12825_ACEOF
12826
12827
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012828fi
12829
Matthias Kloseb9621712010-04-24 17:59:49 +000012830ac_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 +020012831if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012832
12833cat >>confdefs.h <<_ACEOF
12834#define HAVE_STRUCT_STAT_ST_FLAGS 1
12835_ACEOF
12836
12837
12838fi
12839
Matthias Kloseb9621712010-04-24 17:59:49 +000012840ac_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 +020012841if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012842
12843cat >>confdefs.h <<_ACEOF
12844#define HAVE_STRUCT_STAT_ST_GEN 1
12845_ACEOF
12846
12847
12848fi
12849
Matthias Kloseb9621712010-04-24 17:59:49 +000012850ac_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 +020012851if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012852
12853cat >>confdefs.h <<_ACEOF
12854#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12855_ACEOF
12856
12857
12858fi
12859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860ac_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 +020012861if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012862
Martin v. Löwis11437992002-04-12 09:54:03 +000012863cat >>confdefs.h <<_ACEOF
12864#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12865_ACEOF
12866
12867
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012868fi
12869
Stefan Krah267b6392016-04-26 01:09:18 +020012870ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12871 #include <sys/types.h>
12872 #include <pwd.h>
12873
12874"
12875if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12876
12877cat >>confdefs.h <<_ACEOF
12878#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12879_ACEOF
12880
12881
12882fi
12883ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12884 #include <sys/types.h>
12885 #include <pwd.h>
12886
12887"
12888if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12889
12890cat >>confdefs.h <<_ACEOF
12891#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12892_ACEOF
12893
12894
12895fi
12896
Michael W. Hudson54241132001-12-07 15:38:26 +000012897
Matthias Kloseb9621712010-04-24 17:59:49 +000012898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12899$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012900if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012901 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012902else
Matthias Kloseb159a552010-04-25 21:00:44 +000012903
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012905/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012906#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012907int
12908main ()
12909{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012910return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 ;
12912 return 0;
12913}
12914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012915if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012916 ac_cv_header_time_altzone=yes
12917else
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012922fi
12923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12925$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012926if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012929
12930fi
12931
Guido van Rossumda88dad1995-01-26 00:46:29 +000012932was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12934$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012936/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012937
12938#include <sys/types.h>
12939#include <sys/select.h>
12940#include <sys/time.h>
12941
Martin v. Löwis11437992002-04-12 09:54:03 +000012942int
12943main ()
12944{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012945;
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 ;
12947 return 0;
12948}
12949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012950if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012951
12952
Matthias Kloseb9621712010-04-24 17:59:49 +000012953$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012954
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012955 was_it_defined=yes
12956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12960$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961
Matthias Kloseb9621712010-04-24 17:59:49 +000012962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12963$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012964if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012965 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012966else
Matthias Kloseb9621712010-04-24 17:59:49 +000012967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012968/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012969#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012970int
12971main ()
12972{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012973struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012974 ;
12975 return 0;
12976}
12977_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012978if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012979 ac_cv_struct_addrinfo=yes
12980else
Matthias Kloseb9621712010-04-24 17:59:49 +000012981 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012982fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12984fi
12985
Matthias Kloseb9621712010-04-24 17:59:49 +000012986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12987$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012988if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012989
Matthias Kloseb9621712010-04-24 17:59:49 +000012990$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012991
12992fi
12993
Matthias Kloseb9621712010-04-24 17:59:49 +000012994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12995$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012996if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012997 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012998else
Matthias Kloseb9621712010-04-24 17:59:49 +000012999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013000/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013001
13002# include <sys/types.h>
13003# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013004int
13005main ()
13006{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013007struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013008 ;
13009 return 0;
13010}
13011_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013012if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013013 ac_cv_struct_sockaddr_storage=yes
13014else
Matthias Kloseb9621712010-04-24 17:59:49 +000013015 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13018fi
13019
Matthias Kloseb9621712010-04-24 17:59:49 +000013020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13021$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013022if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013025
13026fi
13027
Guido van Rossum627b2d71993-12-24 10:39:16 +000013028# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13031$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013032if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013034else
Matthias Kloseb9621712010-04-24 17:59:49 +000013035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013036/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013037$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013038int
13039main ()
13040{
13041static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013042test_array [0] = 0;
13043return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013044
13045 ;
13046 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013047}
Martin v. Löwis11437992002-04-12 09:54:03 +000013048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013049if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013050 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013051else
Matthias Kloseb9621712010-04-24 17:59:49 +000013052 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13057$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013058if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013059 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013060
13061fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013062
Matthias Kloseb9621712010-04-24 17:59:49 +000013063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13064$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013065if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013069/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013070
Martin v. Löwis11437992002-04-12 09:54:03 +000013071int
13072main ()
13073{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013074
Martin v. Löwis11437992002-04-12 09:54:03 +000013075#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013076 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013077 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013078 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013080 char const *const *pcpcc;
13081 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 /* NEC SVR4.0.2 mips cc rejects this. */
13083 struct point {int x, y;};
13084 static struct point const zero = {0,0};
13085 /* AIX XL C 1.02.0.0 rejects this.
13086 It does not let you subtract one const X* pointer from another in
13087 an arm of an if-expression whose if-part is not a constant
13088 expression */
13089 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013090 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013092 ++pcpcc;
13093 ppc = (char**) pcpcc;
13094 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013095 { /* SCO 3.2v4 cc rejects this sort of thing. */
13096 char tx;
13097 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013098 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013099
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013101 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 }
13103 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13104 int x[] = {25, 17};
13105 const int *foo = &x[0];
13106 ++foo;
13107 }
13108 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13109 typedef const int *iptr;
13110 iptr p = 0;
13111 ++p;
13112 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013113 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013115 struct s { int j; const int *ap[3]; } bx;
13116 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013117 }
13118 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13119 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013120 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013122 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013123#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013124
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 ;
13126 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013127}
Martin v. Löwis11437992002-04-12 09:54:03 +000013128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013129if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013130 ac_cv_c_const=yes
13131else
Matthias Kloseb9621712010-04-24 17:59:49 +000013132 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13137$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013138if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013139
Matthias Kloseb9621712010-04-24 17:59:49 +000013140$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013141
13142fi
13143
Michael W. Hudson54241132001-12-07 15:38:26 +000013144
Guido van Rossumda88dad1995-01-26 00:46:29 +000013145works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13147$as_echo_n "checking for working volatile... " >&6; }
13148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013149/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013150
Martin v. Löwis11437992002-04-12 09:54:03 +000013151int
13152main ()
13153{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013154volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 ;
13156 return 0;
13157}
13158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013159if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013160 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013161else
Skip Montanaro6dead952003-09-25 14:50:04 +000013162
Matthias Kloseb9621712010-04-24 17:59:49 +000013163$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013164
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013165
Guido van Rossum627b2d71993-12-24 10:39:16 +000013166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13169$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013170
Guido van Rossumda88dad1995-01-26 00:46:29 +000013171works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13173$as_echo_n "checking for working signed char... " >&6; }
13174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013175/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013176
Martin v. Löwis11437992002-04-12 09:54:03 +000013177int
13178main ()
13179{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013180signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013181 ;
13182 return 0;
13183}
13184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013185if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013186 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013187else
Skip Montanaro6dead952003-09-25 14:50:04 +000013188
Matthias Kloseb9621712010-04-24 17:59:49 +000013189$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013190
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013191
Guido van Rossum7f43da71994-08-01 12:15:30 +000013192fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13195$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013196
Guido van Rossumda88dad1995-01-26 00:46:29 +000013197have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13199$as_echo_n "checking for prototypes... " >&6; }
13200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013201/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013202int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013203int
13204main ()
13205{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013206return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013207 ;
13208 return 0;
13209}
13210_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013211if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013212
Matthias Kloseb9621712010-04-24 17:59:49 +000013213$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013214
Matthias Kloseb159a552010-04-25 21:00:44 +000013215 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13219$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013220
Guido van Rossumda88dad1995-01-26 00:46:29 +000013221works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13223$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013225/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013226
13227#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013228int foo(int x, ...) {
13229 va_list va;
13230 va_start(va, x);
13231 va_arg(va, int);
13232 va_arg(va, char *);
13233 va_arg(va, double);
13234 return 0;
13235}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013236
Martin v. Löwis11437992002-04-12 09:54:03 +000013237int
13238main ()
13239{
Guido van Rossum90eea071996-08-30 20:58:57 +000013240return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 ;
13242 return 0;
13243}
13244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013245if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013246
13247
Matthias Kloseb9621712010-04-24 17:59:49 +000013248$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013249
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013250 works=yes
13251
Guido van Rossum627b2d71993-12-24 10:39:16 +000013252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13255$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013256
Martin v. Löwisd6320502004-08-12 13:45:08 +000013257# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13259$as_echo_n "checking for socketpair... " >&6; }
13260cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013261/* end confdefs.h. */
13262
13263#include <sys/types.h>
13264#include <sys/socket.h>
13265
13266int
13267main ()
13268{
13269void *x=socketpair
13270 ;
13271 return 0;
13272}
13273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013274if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013275
Matthias Kloseb9621712010-04-24 17:59:49 +000013276$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013277
Matthias Kloseb159a552010-04-25 21:00:44 +000013278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013279$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013280else
Matthias Kloseb9621712010-04-24 17:59:49 +000013281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13282$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013283
13284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013286
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013287# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13289$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013291/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013292#include <sys/types.h>
13293#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013294int
13295main ()
13296{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013297struct sockaddr x;
13298x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013299 ;
13300 return 0;
13301}
13302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013303if ac_fn_c_try_compile "$LINENO"; then :
13304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13305$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013306
Matthias Kloseb9621712010-04-24 17:59:49 +000013307$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308
13309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13311$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013312
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013315
Guido van Rossumda88dad1995-01-26 00:46:29 +000013316va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13318$as_echo_n "checking whether va_list is an array... " >&6; }
13319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013320/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013321
13322#ifdef HAVE_STDARG_PROTOTYPES
13323#include <stdarg.h>
13324#else
13325#include <varargs.h>
13326#endif
13327
Martin v. Löwis11437992002-04-12 09:54:03 +000013328int
13329main ()
13330{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013331va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013332 ;
13333 return 0;
13334}
13335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013336if ac_fn_c_try_compile "$LINENO"; then :
13337
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013338else
Skip Montanaro6dead952003-09-25 14:50:04 +000013339
Martin v. Löwis11437992002-04-12 09:54:03 +000013340
Matthias Kloseb9621712010-04-24 17:59:49 +000013341$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013342
Guido van Rossumda88dad1995-01-26 00:46:29 +000013343 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013344
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13348$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013350# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013351
13352
Matthias Kloseb9621712010-04-24 17:59:49 +000013353ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013354if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013355
Matthias Kloseb9621712010-04-24 17:59:49 +000013356 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013357
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13359$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013360 OLD_CFLAGS=$CFLAGS
13361 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013363/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013364
13365# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367int
13368main ()
13369{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013370
13371 char *name;
13372 struct hostent *he, *res;
13373 char buffer[2048];
13374 int buflen = 2048;
13375 int h_errnop;
13376
13377 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
13379 ;
13380 return 0;
13381}
13382_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013383if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013386
Martin v. Löwis11437992002-04-12 09:54:03 +000013387
Matthias Kloseb9621712010-04-24 17:59:49 +000013388$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13391$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013392
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013393else
Skip Montanaro6dead952003-09-25 14:50:04 +000013394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13396$as_echo "no" >&6; }
13397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13398$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013400/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013401
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013402# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404int
13405main ()
13406{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013407
13408 char *name;
13409 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013410 char buffer[2048];
13411 int buflen = 2048;
13412 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013413
Matthias Kloseb159a552010-04-25 21:00:44 +000013414 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
13416 ;
13417 return 0;
13418}
13419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013421
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013423
Martin v. Löwis11437992002-04-12 09:54:03 +000013424
Matthias Kloseb159a552010-04-25 21:00:44 +000013425$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13428$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013430else
Skip Montanaro6dead952003-09-25 14:50:04 +000013431
Matthias Kloseb9621712010-04-24 17:59:49 +000013432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13433$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13435$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13437/* end confdefs.h. */
13438
13439# include <netdb.h>
13440
13441int
13442main ()
13443{
13444
13445 char *name;
13446 struct hostent *he;
13447 struct hostent_data data;
13448
13449 (void) gethostbyname_r(name, he, &data);
13450
13451 ;
13452 return 0;
13453}
13454_ACEOF
13455if ac_fn_c_try_compile "$LINENO"; then :
13456
13457 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13458
13459
13460$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13461
13462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13463$as_echo "yes" >&6; }
13464
13465else
13466
13467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13468$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013472
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013475
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013476fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013478 CFLAGS=$OLD_CFLAGS
13479
13480else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482 for ac_func in gethostbyname
13483do :
13484 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013485if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013486 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013487#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013488_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013489
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013490fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013491done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013492
Michael W. Hudson54241132001-12-07 15:38:26 +000013493
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013494fi
13495
Michael W. Hudson54241132001-12-07 15:38:26 +000013496
13497
13498
13499
13500
13501
Guido van Rossum627b2d71993-12-24 10:39:16 +000013502# checks for system services
13503# (none yet)
13504
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013505# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013506ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013507if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013508
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013509else
Matthias Kloseb9621712010-04-24 17:59:49 +000013510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13511$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013512if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013513 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013514else
Martin v. Löwis11437992002-04-12 09:54:03 +000013515 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013516LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013517cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013520/* Override any GCC internal prototype to avoid an error.
13521 Use char because int might match the return type of a GCC
13522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013523#ifdef __cplusplus
13524extern "C"
13525#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013526char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013527int
13528main ()
13529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013530return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013531 ;
13532 return 0;
13533}
13534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013535if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013537else
Matthias Kloseb9621712010-04-24 17:59:49 +000013538 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013539fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013540rm -f core conftest.err conftest.$ac_objext \
13541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013542LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013543fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13545$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013546if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 cat >>confdefs.h <<_ACEOF
13548#define HAVE_LIBIEEE 1
13549_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013550
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013551 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013552
Guido van Rossum627b2d71993-12-24 10:39:16 +000013553fi
13554
Michael W. Hudson54241132001-12-07 15:38:26 +000013555
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013556fi
13557
Michael W. Hudson54241132001-12-07 15:38:26 +000013558
Guido van Rossum7f253911997-05-09 02:42:48 +000013559# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13561$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013563# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013564if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013565 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013566if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013567then
13568
Matthias Kloseb9621712010-04-24 17:59:49 +000013569$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
Matthias Kloseb9621712010-04-24 17:59:49 +000013571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13572$as_echo "yes" >&6; }
13573else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13574$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013575fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013576else
Matthias Kloseb9621712010-04-24 17:59:49 +000013577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13578$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013579fi
13580
Guido van Rossum7f253911997-05-09 02:42:48 +000013581
Guido van Rossum7f43da71994-08-01 12:15:30 +000013582# check for --with-libm=...
13583
Guido van Rossum563e7081996-09-10 18:20:48 +000013584case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013585Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013586*) LIBM=-lm
13587esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13589$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013591# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013592if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013593 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013594if test "$withval" = no
13595then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13597$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013598elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013599then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13601$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013602else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013603fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013604else
Matthias Kloseb9621712010-04-24 17:59:49 +000013605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13606$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607fi
13608
Guido van Rossum7f43da71994-08-01 12:15:30 +000013609
13610# check for --with-libc=...
13611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13613$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013615# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013616if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013618if test "$withval" = no
13619then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13621$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013622elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013623then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13625$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013626else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013627fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13630$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013631fi
13632
Guido van Rossum7f43da71994-08-01 12:15:30 +000013633
Stefan Krah1919b7e2012-03-21 18:25:23 +010013634# **************************************
13635# * Check for gcc x64 inline assembler *
13636# **************************************
13637
13638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13639$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13641/* end confdefs.h. */
13642
13643int
13644main ()
13645{
13646
13647 __asm__ __volatile__ ("movq %rcx, %rax");
13648
13649 ;
13650 return 0;
13651}
13652_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013653if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013654 have_gcc_asm_for_x64=yes
13655else
13656 have_gcc_asm_for_x64=no
13657fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013658rm -f core conftest.err conftest.$ac_objext \
13659 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13661$as_echo "$have_gcc_asm_for_x64" >&6; }
13662if test "$have_gcc_asm_for_x64" = yes
13663then
13664
13665$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13666
13667fi
13668
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013669# **************************************************
13670# * Check for various properties of floating point *
13671# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13674$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013675if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013677else
13678
Matthias Kloseb9621712010-04-24 17:59:49 +000013679if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013680 ac_cv_little_endian_double=no
13681else
Matthias Kloseb9621712010-04-24 17:59:49 +000013682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013683/* end confdefs.h. */
13684
13685#include <string.h>
13686int main() {
13687 double x = 9006104071832581.0;
13688 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13689 return 0;
13690 else
13691 return 1;
13692}
13693
13694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013695if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013696 ac_cv_little_endian_double=yes
13697else
Matthias Kloseb9621712010-04-24 17:59:49 +000013698 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013699fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13701 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013702fi
13703
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013704fi
13705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13707$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013708if test "$ac_cv_little_endian_double" = yes
13709then
13710
Matthias Kloseb9621712010-04-24 17:59:49 +000013711$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013712
13713fi
13714
Matthias Kloseb9621712010-04-24 17:59:49 +000013715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13716$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013717if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013718 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013719else
13720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013722 ac_cv_big_endian_double=no
13723else
Matthias Kloseb9621712010-04-24 17:59:49 +000013724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013725/* end confdefs.h. */
13726
13727#include <string.h>
13728int main() {
13729 double x = 9006104071832581.0;
13730 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13731 return 0;
13732 else
13733 return 1;
13734}
13735
13736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013737if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013738 ac_cv_big_endian_double=yes
13739else
Matthias Kloseb9621712010-04-24 17:59:49 +000013740 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013741fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013742rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13743 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013744fi
13745
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013746fi
13747
Matthias Kloseb9621712010-04-24 17:59:49 +000013748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13749$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013750if test "$ac_cv_big_endian_double" = yes
13751then
13752
Matthias Kloseb9621712010-04-24 17:59:49 +000013753$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013754
13755fi
13756
13757# Some ARM platforms use a mixed-endian representation for doubles.
13758# While Python doesn't currently have full support for these platforms
13759# (see e.g., issue 1762561), we can at least make sure that float <-> string
13760# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13762$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013763if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013764 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013765else
13766
Matthias Kloseb9621712010-04-24 17:59:49 +000013767if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013768 ac_cv_mixed_endian_double=no
13769else
Matthias Kloseb9621712010-04-24 17:59:49 +000013770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013771/* end confdefs.h. */
13772
13773#include <string.h>
13774int main() {
13775 double x = 9006104071832581.0;
13776 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13777 return 0;
13778 else
13779 return 1;
13780}
13781
13782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013783if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013784 ac_cv_mixed_endian_double=yes
13785else
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013787fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13789 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013790fi
13791
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013792fi
13793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13795$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013796if test "$ac_cv_mixed_endian_double" = yes
13797then
13798
Matthias Kloseb9621712010-04-24 17:59:49 +000013799$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013800
13801fi
13802
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013803# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013804# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013805# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013806# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013807# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013808# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013809
13810# This inline assembler syntax may also work for suncc and icc,
13811# so we try it on all platforms.
13812
Matthias Kloseb9621712010-04-24 17:59:49 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13814$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13815cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013816/* end confdefs.h. */
13817
13818int
13819main ()
13820{
13821
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013822 unsigned short cw;
13823 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13824 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013825
13826 ;
13827 return 0;
13828}
13829_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013830if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013831 have_gcc_asm_for_x87=yes
13832else
Matthias Kloseb9621712010-04-24 17:59:49 +000013833 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013834fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013835rm -f core conftest.err conftest.$ac_objext \
13836 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13838$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013839if test "$have_gcc_asm_for_x87" = yes
13840then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013841
Matthias Kloseb9621712010-04-24 17:59:49 +000013842$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013843
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013844fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013845
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13847$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13849/* end confdefs.h. */
13850
13851int
13852main ()
13853{
13854
13855 unsigned int fpcr;
13856 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13857 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13858
13859 ;
13860 return 0;
13861}
13862_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013863if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013864 have_gcc_asm_for_mc68881=yes
13865else
13866 have_gcc_asm_for_mc68881=no
13867fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013868rm -f core conftest.err conftest.$ac_objext \
13869 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13871$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13872if test "$have_gcc_asm_for_mc68881" = yes
13873then
13874
13875$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13876
13877fi
13878
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013879# Detect whether system arithmetic is subject to x87-style double
13880# rounding issues. The result of this test has little meaning on non
13881# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13882# mode is round-to-nearest and double rounding issues are present, and
13883# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13885$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013886# $BASECFLAGS may affect the result
13887ac_save_cc="$CC"
13888CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013889if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013890 ac_cv_x87_double_rounding=no
13891else
Matthias Kloseb9621712010-04-24 17:59:49 +000013892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013893/* end confdefs.h. */
13894
13895#include <stdlib.h>
13896#include <math.h>
13897int main() {
13898 volatile double x, y, z;
13899 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13900 x = 0.99999999999999989; /* 1-2**-53 */
13901 y = 1./x;
13902 if (y != 1.)
13903 exit(0);
13904 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13905 x = 1e16;
13906 y = 2.99999;
13907 z = x + y;
13908 if (z != 1e16+4.)
13909 exit(0);
13910 /* both tests show evidence of double rounding */
13911 exit(1);
13912}
13913
13914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013915if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013916 ac_cv_x87_double_rounding=no
13917else
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013922fi
13923
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013924CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13926$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013927if test "$ac_cv_x87_double_rounding" = yes
13928then
13929
Matthias Kloseb9621712010-04-24 17:59:49 +000013930$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013931
13932fi
13933
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013934# ************************************
13935# * Check for mathematical functions *
13936# ************************************
13937
13938LIBS_SAVE=$LIBS
13939LIBS="$LIBS $LIBM"
13940
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013941for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13942do :
13943 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13944ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013945if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013946 cat >>confdefs.h <<_ACEOF
13947#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13948_ACEOF
13949
13950fi
13951done
13952
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013953for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013954do :
13955 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13956ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013957if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013958 cat >>confdefs.h <<_ACEOF
13959#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13960_ACEOF
13961
13962fi
13963done
13964
13965ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13966"
Victor Stinnere0be4232011-10-25 13:06:09 +020013967if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013968 ac_have_decl=1
13969else
13970 ac_have_decl=0
13971fi
13972
13973cat >>confdefs.h <<_ACEOF
13974#define HAVE_DECL_ISINF $ac_have_decl
13975_ACEOF
13976ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13977"
Victor Stinnere0be4232011-10-25 13:06:09 +020013978if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013979 ac_have_decl=1
13980else
13981 ac_have_decl=0
13982fi
13983
13984cat >>confdefs.h <<_ACEOF
13985#define HAVE_DECL_ISNAN $ac_have_decl
13986_ACEOF
13987ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13988"
Victor Stinnere0be4232011-10-25 13:06:09 +020013989if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013990 ac_have_decl=1
13991else
13992 ac_have_decl=0
13993fi
13994
13995cat >>confdefs.h <<_ACEOF
13996#define HAVE_DECL_ISFINITE $ac_have_decl
13997_ACEOF
13998
13999
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014000# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14001# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14003$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014004if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014005 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014006else
14007
Matthias Kloseb9621712010-04-24 17:59:49 +000014008if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014009 ac_cv_tanh_preserves_zero_sign=no
14010else
Matthias Kloseb9621712010-04-24 17:59:49 +000014011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014012/* end confdefs.h. */
14013
14014#include <math.h>
14015#include <stdlib.h>
14016int main() {
14017 /* return 0 if either negative zeros don't exist
14018 on this platform or if negative zeros exist
14019 and tanh(-0.) == -0. */
14020 if (atan2(0., -1.) == atan2(-0., -1.) ||
14021 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14022 else exit(1);
14023}
14024
14025_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014026if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014027 ac_cv_tanh_preserves_zero_sign=yes
14028else
Matthias Kloseb9621712010-04-24 17:59:49 +000014029 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14032 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014033fi
14034
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014035fi
14036
Matthias Kloseb9621712010-04-24 17:59:49 +000014037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14038$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014039if test "$ac_cv_tanh_preserves_zero_sign" = yes
14040then
14041
Matthias Kloseb9621712010-04-24 17:59:49 +000014042$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014043
14044fi
14045
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014046if test "$ac_cv_func_log1p" = yes
14047then
14048 # On some versions of AIX, log1p(-0.) returns 0. instead of
14049 # -0. See issue #9920.
14050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14051$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014052 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014053 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014054else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014055
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014056 if test "$cross_compiling" = yes; then :
14057 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014058else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14060/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014061
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014062 #include <math.h>
14063 #include <stdlib.h>
14064 int main() {
14065 /* Fail if the signs of log1p(-0.) and -0. can be
14066 distinguished. */
14067 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14068 return 0;
14069 else
14070 return 1;
14071 }
14072
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014073_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014074if ac_fn_c_try_run "$LINENO"; then :
14075 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014076else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014077 ac_cv_log1p_drops_zero_sign=yes
14078fi
14079rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14080 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014081fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014082
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014083fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014084
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14086$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14087fi
14088if test "$ac_cv_log1p_drops_zero_sign" = yes
14089then
14090
14091$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14092
14093fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014094
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014095LIBS=$LIBS_SAVE
14096
Mark Dickinsona614f042009-11-28 12:48:43 +000014097# For multiprocessing module, check that sem_open
14098# actually works. For FreeBSD versions <= 7.2,
14099# the kernel module that provides POSIX semaphores
14100# isn't loaded by default, so an attempt to call
14101# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14103$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014104if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014105 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014106else
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014108 ac_cv_posix_semaphores_enabled=yes
14109else
Matthias Kloseb9621712010-04-24 17:59:49 +000014110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014111/* end confdefs.h. */
14112
14113#include <unistd.h>
14114#include <fcntl.h>
14115#include <stdio.h>
14116#include <semaphore.h>
14117#include <sys/stat.h>
14118
14119int main(void) {
14120 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14121 if (a == SEM_FAILED) {
14122 perror("sem_open");
14123 return 1;
14124 }
14125 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014126 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014127 return 0;
14128}
14129
14130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014131if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014132 ac_cv_posix_semaphores_enabled=yes
14133else
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14137 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014138fi
14139
14140
Mark Dickinsona614f042009-11-28 12:48:43 +000014141fi
14142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14144$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014145if test $ac_cv_posix_semaphores_enabled = no
14146then
14147
Matthias Kloseb9621712010-04-24 17:59:49 +000014148$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014149
14150fi
14151
Mark Dickinson10683072009-04-18 21:18:19 +000014152# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14154$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014155if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014157else
Matthias Kloseb9621712010-04-24 17:59:49 +000014158 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014159 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014160else
Matthias Kloseb9621712010-04-24 17:59:49 +000014161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014162/* end confdefs.h. */
14163
14164#include <unistd.h>
14165#include <fcntl.h>
14166#include <stdio.h>
14167#include <semaphore.h>
14168#include <sys/stat.h>
14169
14170int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014171 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014172 int count;
14173 int res;
14174 if(a==SEM_FAILED){
14175 perror("sem_open");
14176 return 1;
14177
14178 }
14179 res = sem_getvalue(a, &count);
14180 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014181 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014182 return res==-1 ? 1 : 0;
14183}
14184
Mark Dickinson10683072009-04-18 21:18:19 +000014185_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014186if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014187 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014188else
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014190fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014191rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14192 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014193fi
14194
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014195
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014196fi
14197
Matthias Kloseb9621712010-04-24 17:59:49 +000014198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14199$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014200if test $ac_cv_broken_sem_getvalue = yes
14201then
14202
Matthias Kloseb9621712010-04-24 17:59:49 +000014203$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014204
14205fi
14206
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014207ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14208"
14209if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14210 ac_have_decl=1
14211else
14212 ac_have_decl=0
14213fi
14214
14215cat >>confdefs.h <<_ACEOF
14216#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14217_ACEOF
14218ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14219"
14220if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14221 ac_have_decl=1
14222else
14223 ac_have_decl=0
14224fi
14225
14226cat >>confdefs.h <<_ACEOF
14227#define HAVE_DECL_RTLD_NOW $ac_have_decl
14228_ACEOF
14229ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14230"
14231if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14232 ac_have_decl=1
14233else
14234 ac_have_decl=0
14235fi
14236
14237cat >>confdefs.h <<_ACEOF
14238#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14239_ACEOF
14240ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14241"
14242if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14243 ac_have_decl=1
14244else
14245 ac_have_decl=0
14246fi
14247
14248cat >>confdefs.h <<_ACEOF
14249#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14250_ACEOF
14251ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14252"
14253if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14254 ac_have_decl=1
14255else
14256 ac_have_decl=0
14257fi
14258
14259cat >>confdefs.h <<_ACEOF
14260#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14261_ACEOF
14262ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14263"
14264if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14265 ac_have_decl=1
14266else
14267 ac_have_decl=0
14268fi
14269
14270cat >>confdefs.h <<_ACEOF
14271#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14272_ACEOF
14273ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14274"
14275if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14276 ac_have_decl=1
14277else
14278 ac_have_decl=0
14279fi
14280
14281cat >>confdefs.h <<_ACEOF
14282#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14283_ACEOF
14284
14285
Mark Dickinsonbd792642009-03-18 20:06:12 +000014286# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14288$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014289# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014290if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014291 enableval=$enable_big_digits; case $enable_big_digits in
14292yes)
14293 enable_big_digits=30 ;;
14294no)
14295 enable_big_digits=15 ;;
1429615|30)
14297 ;;
14298*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014299 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 +000014300esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14302$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014303
14304cat >>confdefs.h <<_ACEOF
14305#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14306_ACEOF
14307
14308
14309else
Matthias Kloseb9621712010-04-24 17:59:49 +000014310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14311$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014312fi
14313
14314
Guido van Rossumef2255b2000-03-10 22:30:29 +000014315# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014316ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014317if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014318
14319
Matthias Kloseb9621712010-04-24 17:59:49 +000014320$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014321
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014322 wchar_h="yes"
14323
Guido van Rossumef2255b2000-03-10 22:30:29 +000014324else
Martin v. Löwis11437992002-04-12 09:54:03 +000014325 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014326
14327fi
14328
Michael W. Hudson54241132001-12-07 15:38:26 +000014329
Martin v. Löwis11437992002-04-12 09:54:03 +000014330
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014331# determine wchar_t size
14332if test "$wchar_h" = yes
14333then
Matthias Kloseb9621712010-04-24 17:59:49 +000014334 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14336# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14337# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14339$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014340if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014342else
Matthias Kloseb9621712010-04-24 17:59:49 +000014343 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14344"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014345
Martin v. Löwis11437992002-04-12 09:54:03 +000014346else
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 if test "$ac_cv_type_wchar_t" = yes; then
14348 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14349$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014350as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014351See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014352 else
14353 ac_cv_sizeof_wchar_t=0
14354 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014356
Martin v. Löwis11437992002-04-12 09:54:03 +000014357fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14359$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014360
14361
14362
Martin v. Löwis11437992002-04-12 09:54:03 +000014363cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014364#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014365_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014366
Michael W. Hudson54241132001-12-07 15:38:26 +000014367
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014368fi
14369
Matthias Kloseb9621712010-04-24 17:59:49 +000014370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14371$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014372have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014374/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014375
14376#include <tcl.h>
14377#if TCL_UTF_MAX != 6
14378# error "NOT UCS4_TCL"
14379#endif
14380int
14381main ()
14382{
14383
14384 ;
14385 return 0;
14386}
14387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014389
14390
Matthias Kloseb9621712010-04-24 17:59:49 +000014391$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014392
14393 have_ucs4_tcl=yes
14394
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14398$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014399
Skip Montanaro6dead952003-09-25 14:50:04 +000014400# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014401if test "$wchar_h" = yes
14402then
14403 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14405$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014406 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014408else
14409
Matthias Kloseb9621712010-04-24 17:59:49 +000014410 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014411 ac_cv_wchar_t_signed=yes
14412else
Matthias Kloseb9621712010-04-24 17:59:49 +000014413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014414/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014415
14416 #include <wchar.h>
14417 int main()
14418 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014419 /* Success: exit code 0 */
14420 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014421 }
14422
14423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014424if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014425 ac_cv_wchar_t_signed=yes
14426else
Matthias Kloseb9621712010-04-24 17:59:49 +000014427 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14430 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014431fi
14432
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014433fi
14434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14436$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014437fi
14438
Georg Brandl52d168a2008-01-07 18:10:24 +000014439# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014440if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014441 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014442then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014443 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014444
Matthias Kloseb9621712010-04-24 17:59:49 +000014445$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014446
Georg Brandl52d168a2008-01-07 18:10:24 +000014447else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014448 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014449fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14451$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014452
14453# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14455$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014456if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014458else
Matthias Kloseb9621712010-04-24 17:59:49 +000014459 ac_cv_c_bigendian=unknown
14460 # See if we're dealing with a universal compiler.
14461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14462/* end confdefs.h. */
14463#ifndef __APPLE_CC__
14464 not a universal capable compiler
14465 #endif
14466 typedef int dummy;
14467
Skip Montanaro6dead952003-09-25 14:50:04 +000014468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014469if ac_fn_c_try_compile "$LINENO"; then :
14470
14471 # Check for potential -arch flags. It is not universal unless
14472 # there are at least two -arch flags with different values.
14473 ac_arch=
14474 ac_prev=
14475 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14476 if test -n "$ac_prev"; then
14477 case $ac_word in
14478 i?86 | x86_64 | ppc | ppc64)
14479 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14480 ac_arch=$ac_word
14481 else
14482 ac_cv_c_bigendian=universal
14483 break
14484 fi
14485 ;;
14486 esac
14487 ac_prev=
14488 elif test "x$ac_word" = "x-arch"; then
14489 ac_prev=arch
14490 fi
14491 done
14492fi
14493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14494 if test $ac_cv_c_bigendian = unknown; then
14495 # See if sys/param.h defines the BYTE_ORDER macro.
14496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014497/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014498#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014500
Martin v. Löwis11437992002-04-12 09:54:03 +000014501int
14502main ()
14503{
Matthias Kloseb9621712010-04-24 17:59:49 +000014504#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14505 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14506 && LITTLE_ENDIAN)
14507 bogus endian macros
14508 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014509
14510 ;
14511 return 0;
14512}
14513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014514if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014515 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014517/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014518#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014520
Martin v. Löwis11437992002-04-12 09:54:03 +000014521int
14522main ()
14523{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014524#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014525 not big endian
14526 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014527
14528 ;
14529 return 0;
14530}
14531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014532if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014533 ac_cv_c_bigendian=yes
14534else
Matthias Kloseb9621712010-04-24 17:59:49 +000014535 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014536fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014538fi
14539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14540 fi
14541 if test $ac_cv_c_bigendian = unknown; then
14542 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014544/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014545#include <limits.h>
14546
Martin v. Löwis11437992002-04-12 09:54:03 +000014547int
14548main ()
14549{
Matthias Kloseb9621712010-04-24 17:59:49 +000014550#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14551 bogus endian macros
14552 #endif
14553
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 ;
14555 return 0;
14556}
14557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014558if ac_fn_c_try_compile "$LINENO"; then :
14559 # It does; now see whether it defined to _BIG_ENDIAN or not.
14560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14561/* end confdefs.h. */
14562#include <limits.h>
14563
14564int
14565main ()
14566{
14567#ifndef _BIG_ENDIAN
14568 not big endian
14569 #endif
14570
14571 ;
14572 return 0;
14573}
14574_ACEOF
14575if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014576 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014577else
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14581fi
14582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14583 fi
14584 if test $ac_cv_c_bigendian = unknown; then
14585 # Compile a test program.
14586 if test "$cross_compiling" = yes; then :
14587 # Try to guess by grepping values from an object file.
14588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14589/* end confdefs.h. */
14590short int ascii_mm[] =
14591 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14592 short int ascii_ii[] =
14593 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14594 int use_ascii (int i) {
14595 return ascii_mm[i] + ascii_ii[i];
14596 }
14597 short int ebcdic_ii[] =
14598 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14599 short int ebcdic_mm[] =
14600 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14601 int use_ebcdic (int i) {
14602 return ebcdic_mm[i] + ebcdic_ii[i];
14603 }
14604 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014605
Matthias Kloseb9621712010-04-24 17:59:49 +000014606int
14607main ()
14608{
14609return use_ascii (foo) == use_ebcdic (foo);
14610 ;
14611 return 0;
14612}
14613_ACEOF
14614if ac_fn_c_try_compile "$LINENO"; then :
14615 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14616 ac_cv_c_bigendian=yes
14617 fi
14618 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14619 if test "$ac_cv_c_bigendian" = unknown; then
14620 ac_cv_c_bigendian=no
14621 else
14622 # finding both strings is unlikely to happen, but who knows?
14623 ac_cv_c_bigendian=unknown
14624 fi
14625 fi
14626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014628else
Matthias Kloseb9621712010-04-24 17:59:49 +000014629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014630/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014631$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014632int
14633main ()
14634{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014635
Matthias Kloseb9621712010-04-24 17:59:49 +000014636 /* Are we little or big endian? From Harbison&Steele. */
14637 union
14638 {
14639 long int l;
14640 char c[sizeof (long int)];
14641 } u;
14642 u.l = 1;
14643 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014644
14645 ;
14646 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014647}
Martin v. Löwis11437992002-04-12 09:54:03 +000014648_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014649if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014650 ac_cv_c_bigendian=no
14651else
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014654rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14655 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14661$as_echo "$ac_cv_c_bigendian" >&6; }
14662 case $ac_cv_c_bigendian in #(
14663 yes)
14664 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14665;; #(
14666 no)
14667 ;; #(
14668 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014669
Matthias Kloseb9621712010-04-24 17:59:49 +000014670$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014671
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 ;; #(
14673 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014674 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014675 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014676 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014677
Michael W. Hudson54241132001-12-07 15:38:26 +000014678
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014679# ABI version string for Python extension modules. This appears between the
14680# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14681# from the following attributes which affect the ABI of this Python build (in
14682# this order):
14683#
14684# * The Python implementation (always 'cpython-' for us)
14685# * The major and minor version numbers
14686# * --with-pydebug (adds a 'd')
14687# * --with-pymalloc (adds a 'm')
14688# * --with-wide-unicode (adds a 'u')
14689#
14690# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014691# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14692# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014693
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14695$as_echo_n "checking ABIFLAGS... " >&6; }
14696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14697$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14699$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014700SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14702$as_echo "$SOABI" >&6; }
14703
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014704
14705case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014706 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014707 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14708 *)
14709 EXT_SUFFIX=${SHLIB_SUFFIX};;
14710esac
14711
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14713$as_echo_n "checking LDVERSION... " >&6; }
14714LDVERSION='$(VERSION)$(ABIFLAGS)'
14715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14716$as_echo "$LDVERSION" >&6; }
14717
doko@python.org87421192013-01-26 11:39:31 +010014718
doko@ubuntu.com55532312016-06-14 08:55:19 +020014719if test x$PLATFORM_TRIPLET = x; then
14720 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14721else
14722 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14723fi
doko@python.org87421192013-01-26 11:39:31 +010014724
14725
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014726# Check whether right shifting a negative integer extends the sign bit
14727# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14729$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014730if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014732else
Martin v. Löwis11437992002-04-12 09:54:03 +000014733
Matthias Kloseb9621712010-04-24 17:59:49 +000014734if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014735 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014736else
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014738/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014739
14740int main()
14741{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014742 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014743}
14744
Martin v. Löwis11437992002-04-12 09:54:03 +000014745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014746if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014747 ac_cv_rshift_extends_sign=yes
14748else
Matthias Kloseb9621712010-04-24 17:59:49 +000014749 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014750fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014753fi
14754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014755fi
14756
Matthias Kloseb9621712010-04-24 17:59:49 +000014757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14758$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014759if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014760then
Martin v. Löwis11437992002-04-12 09:54:03 +000014761
Matthias Kloseb9621712010-04-24 17:59:49 +000014762$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014763
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014764fi
14765
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014766# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14768$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014769if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014770 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014771else
Martin v. Löwis11437992002-04-12 09:54:03 +000014772
Matthias Kloseb9621712010-04-24 17:59:49 +000014773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014774/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014775#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014776int
14777main ()
14778{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014779
14780 FILE *f = fopen("/dev/null", "r");
14781 flockfile(f);
14782 getc_unlocked(f);
14783 funlockfile(f);
14784
Martin v. Löwis11437992002-04-12 09:54:03 +000014785 ;
14786 return 0;
14787}
14788_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014789if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014790 ac_cv_have_getc_unlocked=yes
14791else
Matthias Kloseb9621712010-04-24 17:59:49 +000014792 ac_cv_have_getc_unlocked=no
14793fi
14794rm -f core conftest.err conftest.$ac_objext \
14795 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014797
Matthias Kloseb9621712010-04-24 17:59:49 +000014798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14799$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014800if test "$ac_cv_have_getc_unlocked" = yes
14801then
Martin v. Löwis11437992002-04-12 09:54:03 +000014802
Matthias Kloseb9621712010-04-24 17:59:49 +000014803$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014804
14805fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014806
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014807# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014808# save the value of LIBS so we don't actually link Python with readline
14809LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014810
Gregory P. Smith18820942008-09-07 06:24:49 +000014811# On some systems we need to link readline to a termcap compatible
14812# library. NOTE: Keep the precedence of listed libraries synchronised
14813# with setup.py.
14814py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14816$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014817for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014818 if test -z "$py_libtermcap"; then
14819 READLINE_LIBS="-lreadline"
14820 else
14821 READLINE_LIBS="-lreadline -l$py_libtermcap"
14822 fi
14823 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014825/* end confdefs.h. */
14826
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827/* Override any GCC internal prototype to avoid an error.
14828 Use char because int might match the return type of a GCC
14829 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014830#ifdef __cplusplus
14831extern "C"
14832#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014833char readline ();
14834int
14835main ()
14836{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014837return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014838 ;
14839 return 0;
14840}
14841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014842if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014843 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014845rm -f core conftest.err conftest.$ac_objext \
14846 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014847 if test $py_cv_lib_readline = yes; then
14848 break
14849 fi
14850done
14851# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14852#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014853if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14855$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014856else
Matthias Kloseb9621712010-04-24 17:59:49 +000014857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14858$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014859
Matthias Kloseb9621712010-04-24 17:59:49 +000014860$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014861
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014862fi
14863
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014864# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14866$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014867if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014869else
14870 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014871LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014873/* end confdefs.h. */
14874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875/* Override any GCC internal prototype to avoid an error.
14876 Use char because int might match the return type of a GCC
14877 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014878#ifdef __cplusplus
14879extern "C"
14880#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014881char rl_callback_handler_install ();
14882int
14883main ()
14884{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014885return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014886 ;
14887 return 0;
14888}
14889_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014890if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014891 ac_cv_lib_readline_rl_callback_handler_install=yes
14892else
Matthias Kloseb9621712010-04-24 17:59:49 +000014893 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014895rm -f core conftest.err conftest.$ac_objext \
14896 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014897LIBS=$ac_check_lib_save_LIBS
14898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14900$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014901if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014904
14905fi
14906
14907
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014908# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014909cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014910/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014911#include <readline/readline.h>
14912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014913if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014914 have_readline=yes
14915else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014916 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014917
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014918fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014919rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014920if test $have_readline = yes
14921then
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014923/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014924#include <readline/readline.h>
14925
14926_ACEOF
14927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014929
Matthias Kloseb9621712010-04-24 17:59:49 +000014930$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014931
14932fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014933rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014934
Matthias Kloseb9621712010-04-24 17:59:49 +000014935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014936/* end confdefs.h. */
14937#include <readline/readline.h>
14938
14939_ACEOF
14940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014941 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014942
Matthias Kloseb9621712010-04-24 17:59:49 +000014943$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014944
14945fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014946rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014947
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014948fi
14949
Martin v. Löwis0daad592001-09-30 21:09:59 +000014950# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14952$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014953if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014954 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014955else
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014957LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014959/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014960
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961/* Override any GCC internal prototype to avoid an error.
14962 Use char because int might match the return type of a GCC
14963 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014964#ifdef __cplusplus
14965extern "C"
14966#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014967char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014968int
14969main ()
14970{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 ;
14973 return 0;
14974}
14975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014976if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014977 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014978else
Matthias Kloseb9621712010-04-24 17:59:49 +000014979 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014981rm -f core conftest.err conftest.$ac_objext \
14982 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014983LIBS=$ac_check_lib_save_LIBS
14984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14986$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014987if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014988
Matthias Kloseb9621712010-04-24 17:59:49 +000014989$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014990
Martin v. Löwis0daad592001-09-30 21:09:59 +000014991fi
14992
Michael W. Hudson54241132001-12-07 15:38:26 +000014993
Thomas Wouters89d996e2007-09-08 17:39:28 +000014994# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14996$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014997if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014998 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014999else
15000 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015001LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015003/* end confdefs.h. */
15004
15005/* Override any GCC internal prototype to avoid an error.
15006 Use char because int might match the return type of a GCC
15007 builtin and then its argument prototype would still apply. */
15008#ifdef __cplusplus
15009extern "C"
15010#endif
15011char rl_completion_display_matches_hook ();
15012int
15013main ()
15014{
15015return rl_completion_display_matches_hook ();
15016 ;
15017 return 0;
15018}
15019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015020if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015021 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15022else
Matthias Kloseb9621712010-04-24 17:59:49 +000015023 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015025rm -f core conftest.err conftest.$ac_objext \
15026 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015027LIBS=$ac_check_lib_save_LIBS
15028fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15030$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015031if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015032
Matthias Kloseb9621712010-04-24 17:59:49 +000015033$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015034
15035fi
15036
15037
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015038# also in 4.0, but not in editline
15039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15040$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15041if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15042 $as_echo_n "(cached) " >&6
15043else
15044 ac_check_lib_save_LIBS=$LIBS
15045LIBS="-lreadline $READLINE_LIBS $LIBS"
15046cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15047/* end confdefs.h. */
15048
15049/* Override any GCC internal prototype to avoid an error.
15050 Use char because int might match the return type of a GCC
15051 builtin and then its argument prototype would still apply. */
15052#ifdef __cplusplus
15053extern "C"
15054#endif
15055char rl_resize_terminal ();
15056int
15057main ()
15058{
15059return rl_resize_terminal ();
15060 ;
15061 return 0;
15062}
15063_ACEOF
15064if ac_fn_c_try_link "$LINENO"; then :
15065 ac_cv_lib_readline_rl_resize_terminal=yes
15066else
15067 ac_cv_lib_readline_rl_resize_terminal=no
15068fi
15069rm -f core conftest.err conftest.$ac_objext \
15070 conftest$ac_exeext conftest.$ac_ext
15071LIBS=$ac_check_lib_save_LIBS
15072fi
15073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15074$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15075if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15076
15077$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15078
15079fi
15080
15081
Martin v. Löwis0daad592001-09-30 21:09:59 +000015082# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15084$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015085if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015087else
Martin v. Löwis11437992002-04-12 09:54:03 +000015088 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015089LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093/* Override any GCC internal prototype to avoid an error.
15094 Use char because int might match the return type of a GCC
15095 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015096#ifdef __cplusplus
15097extern "C"
15098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015099char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015100int
15101main ()
15102{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 ;
15105 return 0;
15106}
15107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015108if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015110else
Matthias Kloseb9621712010-04-24 17:59:49 +000015111 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015112fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015113rm -f core conftest.err conftest.$ac_objext \
15114 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015115LIBS=$ac_check_lib_save_LIBS
15116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15118$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015119if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015120
Matthias Kloseb9621712010-04-24 17:59:49 +000015121$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015122
Guido van Rossum353ae582001-07-10 16:45:32 +000015123fi
15124
Jack Jansendd19cf82001-12-06 22:36:17 +000015125
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015126# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015127cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015128/* end confdefs.h. */
15129#include <readline/readline.h>
15130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015131if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015132 have_readline=yes
15133else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015134 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015135
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015136fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015137rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015138if test $have_readline = yes
15139then
Matthias Kloseb9621712010-04-24 17:59:49 +000015140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015141/* end confdefs.h. */
15142#include <readline/readline.h>
15143
15144_ACEOF
15145if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015146 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015147
Matthias Kloseb9621712010-04-24 17:59:49 +000015148$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015149
15150fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015151rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015152
15153fi
15154
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15156$as_echo_n "checking for append_history in -lreadline... " >&6; }
15157if ${ac_cv_lib_readline_append_history+:} false; then :
15158 $as_echo_n "(cached) " >&6
15159else
15160 ac_check_lib_save_LIBS=$LIBS
15161LIBS="-lreadline $READLINE_LIBS $LIBS"
15162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15163/* end confdefs.h. */
15164
15165/* Override any GCC internal prototype to avoid an error.
15166 Use char because int might match the return type of a GCC
15167 builtin and then its argument prototype would still apply. */
15168#ifdef __cplusplus
15169extern "C"
15170#endif
15171char append_history ();
15172int
15173main ()
15174{
15175return append_history ();
15176 ;
15177 return 0;
15178}
15179_ACEOF
15180if ac_fn_c_try_link "$LINENO"; then :
15181 ac_cv_lib_readline_append_history=yes
15182else
15183 ac_cv_lib_readline_append_history=no
15184fi
15185rm -f core conftest.err conftest.$ac_objext \
15186 conftest$ac_exeext conftest.$ac_ext
15187LIBS=$ac_check_lib_save_LIBS
15188fi
15189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15190$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15191if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15192
15193$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15194
15195fi
15196
15197
Martin v. Löwis82bca632006-02-10 20:49:30 +000015198# End of readline checks: restore LIBS
15199LIBS=$LIBS_no_readline
15200
Matthias Kloseb9621712010-04-24 17:59:49 +000015201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15202$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015203if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015204 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015205else
Martin v. Löwis11437992002-04-12 09:54:03 +000015206
Matthias Kloseb9621712010-04-24 17:59:49 +000015207if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015208 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015209else
Matthias Kloseb9621712010-04-24 17:59:49 +000015210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015211/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015212
15213int main()
15214{
15215 int val1 = nice(1);
15216 if (val1 != -1 && val1 == nice(2))
15217 exit(0);
15218 exit(1);
15219}
15220
Martin v. Löwis11437992002-04-12 09:54:03 +000015221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015222if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015223 ac_cv_broken_nice=yes
15224else
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015226fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15228 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015229fi
15230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231fi
15232
Matthias Kloseb9621712010-04-24 17:59:49 +000015233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15234$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015235if test "$ac_cv_broken_nice" = yes
15236then
Martin v. Löwis11437992002-04-12 09:54:03 +000015237
Matthias Kloseb9621712010-04-24 17:59:49 +000015238$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015239
15240fi
15241
Matthias Kloseb9621712010-04-24 17:59:49 +000015242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15243$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015244if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015246else
Matthias Kloseb9621712010-04-24 17:59:49 +000015247 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015248 ac_cv_broken_poll=no
15249else
Matthias Kloseb9621712010-04-24 17:59:49 +000015250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015251/* end confdefs.h. */
15252
15253#include <poll.h>
15254
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015255int main()
15256{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015257 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015258 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015259
15260 close (42);
15261
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015262 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015263 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015264 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015265 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015266 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015267 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015268 return 1;
15269}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015270
15271_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015272if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015273 ac_cv_broken_poll=yes
15274else
Matthias Kloseb9621712010-04-24 17:59:49 +000015275 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015276fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15278 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015281fi
15282
Matthias Kloseb9621712010-04-24 17:59:49 +000015283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15284$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015285if test "$ac_cv_broken_poll" = yes
15286then
15287
Matthias Kloseb9621712010-04-24 17:59:49 +000015288$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015289
15290fi
15291
Brett Cannon43802422005-02-10 20:48:03 +000015292# 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 +000015293# (which is not required by ISO C or UNIX spec) and/or if we support
15294# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015295ac_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 +000015296#include <$ac_cv_struct_tm>
15297
Matthias Kloseb9621712010-04-24 17:59:49 +000015298"
Victor Stinnere0be4232011-10-25 13:06:09 +020015299if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015300
15301cat >>confdefs.h <<_ACEOF
15302#define HAVE_STRUCT_TM_TM_ZONE 1
15303_ACEOF
15304
15305
15306fi
15307
15308if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15309
Matthias Kloseb9621712010-04-24 17:59:49 +000015310$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015311
15312else
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15314"
Victor Stinnere0be4232011-10-25 13:06:09 +020015315if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015316 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015317else
Matthias Kloseb9621712010-04-24 17:59:49 +000015318 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319fi
15320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015321cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015322#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323_ACEOF
15324
Matthias Kloseb9621712010-04-24 17:59:49 +000015325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15326$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015327if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015328 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329else
Matthias Kloseb9621712010-04-24 17:59:49 +000015330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015331/* end confdefs.h. */
15332#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333#if !HAVE_DECL_TZNAME
15334extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015335#endif
15336
15337int
15338main ()
15339{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015340return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015341 ;
15342 return 0;
15343}
15344_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015345if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015346 ac_cv_var_tzname=yes
15347else
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015349fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015350rm -f core conftest.err conftest.$ac_objext \
15351 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015352fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15354$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015355 if test $ac_cv_var_tzname = yes; then
15356
Matthias Kloseb9621712010-04-24 17:59:49 +000015357$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015358
15359 fi
15360fi
15361
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015362
Martin v. Löwis1d459062005-03-14 21:23:33 +000015363# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15365$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015366if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015367 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015368else
15369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015371 ac_cv_working_tzset=no
15372else
Matthias Kloseb9621712010-04-24 17:59:49 +000015373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015374/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015375
15376#include <stdlib.h>
15377#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015378#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015379
15380#if HAVE_TZNAME
15381extern char *tzname[];
15382#endif
15383
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015384int main()
15385{
Brett Cannon18367812003-09-19 00:59:16 +000015386 /* Note that we need to ensure that not only does tzset(3)
15387 do 'something' with localtime, but it works as documented
15388 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015389 This includes making sure that tzname is set properly if
15390 tm->tm_zone does not exist since it is the alternative way
15391 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015392
15393 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015394 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015395 */
15396
Martin v. Löwis1d459062005-03-14 21:23:33 +000015397 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015398 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15399
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015400 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015401 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015402 if (localtime(&groundhogday)->tm_hour != 0)
15403 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015404#if HAVE_TZNAME
15405 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15406 if (strcmp(tzname[0], "UTC") ||
15407 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15408 exit(1);
15409#endif
Brett Cannon18367812003-09-19 00:59:16 +000015410
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015411 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015412 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015413 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015414 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015415#if HAVE_TZNAME
15416 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15417 exit(1);
15418#endif
Brett Cannon18367812003-09-19 00:59:16 +000015419
15420 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15421 tzset();
15422 if (localtime(&groundhogday)->tm_hour != 11)
15423 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015424#if HAVE_TZNAME
15425 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15426 exit(1);
15427#endif
15428
15429#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015430 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15431 exit(1);
15432 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15433 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015434#endif
Brett Cannon18367812003-09-19 00:59:16 +000015435
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015436 exit(0);
15437}
15438
15439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015440if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015441 ac_cv_working_tzset=yes
15442else
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15446 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015447fi
15448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449fi
15450
Matthias Kloseb9621712010-04-24 17:59:49 +000015451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15452$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015453if test "$ac_cv_working_tzset" = yes
15454then
15455
Matthias Kloseb9621712010-04-24 17:59:49 +000015456$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015457
15458fi
15459
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015460# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15462$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015463if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015465else
Matthias Kloseb9621712010-04-24 17:59:49 +000015466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015467/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015468#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015469int
15470main ()
15471{
15472
15473struct stat st;
15474st.st_mtim.tv_nsec = 1;
15475
15476 ;
15477 return 0;
15478}
15479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015480if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015481 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015482else
Matthias Kloseb9621712010-04-24 17:59:49 +000015483 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15486fi
15487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15489$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015490if test "$ac_cv_stat_tv_nsec" = yes
15491then
15492
Matthias Kloseb9621712010-04-24 17:59:49 +000015493$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015494
15495fi
15496
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015497# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15499$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015500if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015501 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015502else
Matthias Kloseb9621712010-04-24 17:59:49 +000015503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015504/* end confdefs.h. */
15505#include <sys/stat.h>
15506int
15507main ()
15508{
15509
15510struct stat st;
15511st.st_mtimespec.tv_nsec = 1;
15512
15513 ;
15514 return 0;
15515}
15516_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015518 ac_cv_stat_tv_nsec2=yes
15519else
Matthias Kloseb9621712010-04-24 17:59:49 +000015520 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015521fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15523fi
15524
Matthias Kloseb9621712010-04-24 17:59:49 +000015525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15526$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015527if test "$ac_cv_stat_tv_nsec2" = yes
15528then
15529
Matthias Kloseb9621712010-04-24 17:59:49 +000015530$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015531
15532fi
15533
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015534# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015535ac_save_cppflags="$CPPFLAGS"
15536CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015537
15538for ac_header in curses.h ncurses.h
15539do :
15540 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15541ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15542if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15543 cat >>confdefs.h <<_ACEOF
15544#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15545_ACEOF
15546
15547fi
15548
15549done
15550
15551
15552# On Solaris, term.h requires curses.h
15553for ac_header in term.h
15554do :
15555 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15556#ifdef HAVE_CURSES_H
15557#include <curses.h>
15558#endif
15559
15560"
15561if test "x$ac_cv_header_term_h" = xyes; then :
15562 cat >>confdefs.h <<_ACEOF
15563#define HAVE_TERM_H 1
15564_ACEOF
15565
15566fi
15567
15568done
15569
15570
Jack Jansen666b1e72001-10-31 12:11:48 +000015571# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15573$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015574if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015575 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015576else
Matthias Kloseb9621712010-04-24 17:59:49 +000015577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015578/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015579#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015580int
15581main ()
15582{
Jack Jansen666b1e72001-10-31 12:11:48 +000015583
15584 int rtn;
15585 rtn = mvwdelch(0,0,0);
15586
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 ;
15588 return 0;
15589}
15590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015591if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015592 ac_cv_mvwdelch_is_expression=yes
15593else
Matthias Kloseb9621712010-04-24 17:59:49 +000015594 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015595fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15597fi
15598
Matthias Kloseb9621712010-04-24 17:59:49 +000015599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15600$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015601
15602if test "$ac_cv_mvwdelch_is_expression" = yes
15603then
Martin v. Löwis11437992002-04-12 09:54:03 +000015604
Matthias Kloseb9621712010-04-24 17:59:49 +000015605$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015606
15607fi
15608
Matthias Kloseb9621712010-04-24 17:59:49 +000015609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15610$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015611if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015612 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015613else
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015615/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015616#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015617int
15618main ()
15619{
Jack Jansen666b1e72001-10-31 12:11:48 +000015620
15621 WINDOW *w;
15622 w->_flags = 0;
15623
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 ;
15625 return 0;
15626}
15627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015628if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015629 ac_cv_window_has_flags=yes
15630else
Matthias Kloseb9621712010-04-24 17:59:49 +000015631 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15634fi
15635
Matthias Kloseb9621712010-04-24 17:59:49 +000015636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15637$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015638
Jack Jansen666b1e72001-10-31 12:11:48 +000015639
15640if test "$ac_cv_window_has_flags" = yes
15641then
Martin v. Löwis11437992002-04-12 09:54:03 +000015642
Matthias Kloseb9621712010-04-24 17:59:49 +000015643$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015644
15645fi
15646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15648$as_echo_n "checking for is_term_resized... " >&6; }
15649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015650/* end confdefs.h. */
15651#include <curses.h>
15652int
15653main ()
15654{
15655void *x=is_term_resized
15656 ;
15657 return 0;
15658}
15659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015660if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015661
Matthias Kloseb9621712010-04-24 17:59:49 +000015662$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015663
Matthias Kloseb159a552010-04-25 21:00:44 +000015664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015665$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015666else
Matthias Kloseb9621712010-04-24 17:59:49 +000015667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15668$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015669
15670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15672
Matthias Kloseb9621712010-04-24 17:59:49 +000015673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15674$as_echo_n "checking for resize_term... " >&6; }
15675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015676/* end confdefs.h. */
15677#include <curses.h>
15678int
15679main ()
15680{
15681void *x=resize_term
15682 ;
15683 return 0;
15684}
15685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015686if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015687
Matthias Kloseb9621712010-04-24 17:59:49 +000015688$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015689
Matthias Kloseb159a552010-04-25 21:00:44 +000015690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015691$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015692else
Matthias Kloseb9621712010-04-24 17:59:49 +000015693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15694$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015695
15696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15700$as_echo_n "checking for resizeterm... " >&6; }
15701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015702/* end confdefs.h. */
15703#include <curses.h>
15704int
15705main ()
15706{
15707void *x=resizeterm
15708 ;
15709 return 0;
15710}
15711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015712if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015713
Matthias Kloseb9621712010-04-24 17:59:49 +000015714$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015715
Matthias Kloseb159a552010-04-25 21:00:44 +000015716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015717$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015718else
Matthias Kloseb9621712010-04-24 17:59:49 +000015719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15720$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015721
15722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015724# last curses configure check
15725CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015726
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15728$as_echo "$as_me: checking for device files" >&6;}
15729
15730if test "x$cross_compiling" = xyes; then
15731 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15733$as_echo_n "checking for /dev/ptmx... " >&6; }
15734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15735$as_echo "not set" >&6; }
15736 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15737 fi
15738 if test "${ac_cv_file__dev_ptc+set}" != set; then
15739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15740$as_echo_n "checking for /dev/ptc... " >&6; }
15741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15742$as_echo "not set" >&6; }
15743 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15744 fi
15745fi
15746
Matthias Kloseb9621712010-04-24 17:59:49 +000015747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15748$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015749if ${ac_cv_file__dev_ptmx+:} false; then :
15750 $as_echo_n "(cached) " >&6
15751else
15752 test "$cross_compiling" = yes &&
15753 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15754if test -r "/dev/ptmx"; then
15755 ac_cv_file__dev_ptmx=yes
15756else
15757 ac_cv_file__dev_ptmx=no
15758fi
15759fi
15760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15761$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15762if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015763
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015764fi
15765
15766if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015767
Matthias Kloseb9621712010-04-24 17:59:49 +000015768$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015769
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015770fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15772$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015773if ${ac_cv_file__dev_ptc+:} false; then :
15774 $as_echo_n "(cached) " >&6
15775else
15776 test "$cross_compiling" = yes &&
15777 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15778if test -r "/dev/ptc"; then
15779 ac_cv_file__dev_ptc=yes
15780else
15781 ac_cv_file__dev_ptc=no
15782fi
15783fi
15784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15785$as_echo "$ac_cv_file__dev_ptc" >&6; }
15786if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015787
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015788fi
15789
15790if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015791
Matthias Kloseb9621712010-04-24 17:59:49 +000015792$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015793
Neal Norwitz865400f2003-03-21 01:42:58 +000015794fi
15795
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015796if test "$have_long_long" = yes
15797then
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15799$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015800 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015801 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015802else
Matthias Kloseb9621712010-04-24 17:59:49 +000015803 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015804 ac_cv_have_long_long_format="cross -- assuming no"
15805 if test x$GCC = xyes; then
15806 save_CFLAGS=$CFLAGS
15807 CFLAGS="$CFLAGS -Werror -Wformat"
15808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15809/* end confdefs.h. */
15810
15811 #include <stdio.h>
15812 #include <stddef.h>
15813
15814int
15815main ()
15816{
15817
15818 char *buffer;
15819 sprintf(buffer, "%lld", (long long)123);
15820 sprintf(buffer, "%lld", (long long)-123);
15821 sprintf(buffer, "%llu", (unsigned long long)123);
15822
15823 ;
15824 return 0;
15825}
15826_ACEOF
15827if ac_fn_c_try_compile "$LINENO"; then :
15828 ac_cv_have_long_long_format=yes
15829
15830fi
15831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15832 CFLAGS=$save_CFLAGS
15833 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015834else
Matthias Kloseb9621712010-04-24 17:59:49 +000015835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015836/* end confdefs.h. */
15837
15838 #include <stdio.h>
15839 #include <stddef.h>
15840 #include <string.h>
15841
15842 #ifdef HAVE_SYS_TYPES_H
15843 #include <sys/types.h>
15844 #endif
15845
15846 int main()
15847 {
15848 char buffer[256];
15849
15850 if (sprintf(buffer, "%lld", (long long)123) < 0)
15851 return 1;
15852 if (strcmp(buffer, "123"))
15853 return 1;
15854
15855 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15856 return 1;
15857 if (strcmp(buffer, "-123"))
15858 return 1;
15859
15860 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15861 return 1;
15862 if (strcmp(buffer, "123"))
15863 return 1;
15864
15865 return 0;
15866 }
15867
15868_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015869if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015870 ac_cv_have_long_long_format=yes
15871else
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015874rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15875 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015876fi
15877
15878
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015879fi
15880
Matthias Kloseb9621712010-04-24 17:59:49 +000015881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15882$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015883fi
15884
Mark Dickinson89d7d412009-12-31 20:50:59 +000015885if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015886then
15887
Matthias Kloseb9621712010-04-24 17:59:49 +000015888$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015889
15890fi
15891
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015892if test $ac_sys_system = Darwin
15893then
15894 LIBS="$LIBS -framework CoreFoundation"
15895fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015896
Matthias Kloseb9621712010-04-24 17:59:49 +000015897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15898$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015899if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015900 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015901else
Matthias Kloseb9621712010-04-24 17:59:49 +000015902 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015903 ac_cv_have_size_t_format="cross -- assuming yes"
15904
Thomas Wouters477c8d52006-05-27 19:21:47 +000015905else
Matthias Kloseb9621712010-04-24 17:59:49 +000015906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015907/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015908
Thomas Wouters477c8d52006-05-27 19:21:47 +000015909#include <stdio.h>
15910#include <stddef.h>
15911#include <string.h>
15912
Christian Heimes2c181612007-12-17 20:04:13 +000015913#ifdef HAVE_SYS_TYPES_H
15914#include <sys/types.h>
15915#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015916
15917#ifdef HAVE_SSIZE_T
15918typedef ssize_t Py_ssize_t;
15919#elif SIZEOF_VOID_P == SIZEOF_LONG
15920typedef long Py_ssize_t;
15921#else
15922typedef int Py_ssize_t;
15923#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015924
Christian Heimes2c181612007-12-17 20:04:13 +000015925int main()
15926{
15927 char buffer[256];
15928
Thomas Wouters477c8d52006-05-27 19:21:47 +000015929 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15930 return 1;
15931
Thomas Wouters89f507f2006-12-13 04:49:30 +000015932 if (strcmp(buffer, "123"))
15933 return 1;
15934
15935 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15936 return 1;
15937
15938 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015939 return 1;
15940
15941 return 0;
15942}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015943
Thomas Wouters477c8d52006-05-27 19:21:47 +000015944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015945if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015946 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015947else
Matthias Kloseb9621712010-04-24 17:59:49 +000015948 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015950rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15951 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015952fi
15953
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015954fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15956$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015957if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015958
Matthias Kloseb9621712010-04-24 17:59:49 +000015959$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015960
15961fi
15962
Matthias Kloseb9621712010-04-24 17:59:49 +000015963ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015964#ifdef HAVE_SYS_TYPES_H
15965#include <sys/types.h>
15966#endif
15967#ifdef HAVE_SYS_SOCKET_H
15968#include <sys/socket.h>
15969#endif
15970
Matthias Kloseb9621712010-04-24 17:59:49 +000015971"
Victor Stinnere0be4232011-10-25 13:06:09 +020015972if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015973
Martin v. Löwis11437992002-04-12 09:54:03 +000015974else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015975
Matthias Kloseb9621712010-04-24 17:59:49 +000015976$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015977
15978fi
15979
Michael W. Hudson54241132001-12-07 15:38:26 +000015980
Matthias Kloseb9621712010-04-24 17:59:49 +000015981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15982$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015983if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015984 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015985else
Matthias Kloseb9621712010-04-24 17:59:49 +000015986 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015987 ac_cv_broken_mbstowcs=no
15988else
Matthias Kloseb9621712010-04-24 17:59:49 +000015989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015990/* end confdefs.h. */
15991
Stefan Krah19c21392012-11-22 23:47:32 +010015992#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015993#include<stdlib.h>
15994int main() {
15995 size_t len = -1;
15996 const char *str = "text";
15997 len = mbstowcs(NULL, str, 0);
15998 return (len != 4);
15999}
16000
16001_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016002if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016003 ac_cv_broken_mbstowcs=no
16004else
Matthias Kloseb9621712010-04-24 17:59:49 +000016005 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016007rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16008 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016009fi
16010
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016011fi
16012
Matthias Kloseb9621712010-04-24 17:59:49 +000016013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16014$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016015if test "$ac_cv_broken_mbstowcs" = yes
16016then
16017
Matthias Kloseb9621712010-04-24 17:59:49 +000016018$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016019
16020fi
16021
Antoine Pitroub52ec782009-01-25 16:34:23 +000016022# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16024$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016025
16026# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016027if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016028 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016029if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016030then
16031
Matthias Kloseb9621712010-04-24 17:59:49 +000016032$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016033
Matthias Kloseb9621712010-04-24 17:59:49 +000016034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16035$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016036fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016037if test "$withval" = no
16038then
16039
16040$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16041
Matthias Kloseb9621712010-04-24 17:59:49 +000016042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16043$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016044fi
16045
Antoine Pitrou042b1282010-08-13 21:15:58 +000016046else
16047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16048$as_echo "no value specified" >&6; }
16049fi
16050
Antoine Pitroub52ec782009-01-25 16:34:23 +000016051
Matthias Kloseb17289e2012-03-15 19:51:34 +010016052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16053$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16054if ${ac_cv_computed_gotos+:} false; then :
16055 $as_echo_n "(cached) " >&6
16056else
16057 if test "$cross_compiling" = yes; then :
16058 if test "${with_computed_gotos+set}" = set; then
16059 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16060 else
16061 ac_cv_computed_gotos=no
16062 fi
16063else
16064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16065/* end confdefs.h. */
16066
16067int main(int argc, char **argv)
16068{
16069 static void *targets[1] = { &&LABEL1 };
16070 goto LABEL2;
16071LABEL1:
16072 return 0;
16073LABEL2:
16074 goto *targets[0];
16075 return 1;
16076}
16077
16078_ACEOF
16079if ac_fn_c_try_run "$LINENO"; then :
16080 ac_cv_computed_gotos=yes
16081else
16082 ac_cv_computed_gotos=no
16083fi
16084rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16085 conftest.$ac_objext conftest.beam conftest.$ac_ext
16086fi
16087
16088fi
16089
16090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16091$as_echo "$ac_cv_computed_gotos" >&6; }
16092case "$ac_cv_computed_gotos" in yes*)
16093
16094$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16095
16096esac
16097
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016098case $ac_sys_system in
16099AIX*)
16100
16101$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16102 ;;
16103esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016104
Michael W. Hudson54241132001-12-07 15:38:26 +000016105
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016106
16107
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016108for h in `(cd $srcdir;echo Python/thread_*.h)`
16109do
16110 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16111done
16112
Michael W. Hudson54241132001-12-07 15:38:26 +000016113
Ned Deily0db50cf2014-07-25 12:41:31 -070016114SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16116$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016117for dir in $SRCDIRS; do
16118 if test ! -d $dir; then
16119 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016120 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016121done
Matthias Kloseb9621712010-04-24 17:59:49 +000016122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16123$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016124
Stefan Krah1919b7e2012-03-21 18:25:23 +010016125# Availability of -O2:
16126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16127$as_echo_n "checking for -O2... " >&6; }
16128saved_cflags="$CFLAGS"
16129CFLAGS="-O2"
16130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16131/* end confdefs.h. */
16132
16133int
16134main ()
16135{
16136
16137
16138 ;
16139 return 0;
16140}
16141_ACEOF
16142if ac_fn_c_try_compile "$LINENO"; then :
16143 have_O2=yes
16144else
16145 have_O2=no
16146fi
16147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16149$as_echo "$have_O2" >&6; }
16150CFLAGS="$saved_cflags"
16151
16152# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16153# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16155$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16156saved_cflags="$CFLAGS"
16157CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16158if test "$have_O2" = no; then
16159 CFLAGS=""
16160fi
16161if test "$cross_compiling" = yes; then :
16162 have_glibc_memmove_bug=undefined
16163else
16164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16165/* end confdefs.h. */
16166
16167#include <stdio.h>
16168#include <stdlib.h>
16169#include <string.h>
16170void foo(void *p, void *q) { memmove(p, q, 19); }
16171int main() {
16172 char a[32] = "123456789000000000";
16173 foo(&a[9], a);
16174 if (strcmp(a, "123456789123456789000000000") != 0)
16175 return 1;
16176 foo(a, &a[9]);
16177 if (strcmp(a, "123456789000000000") != 0)
16178 return 1;
16179 return 0;
16180}
16181
16182_ACEOF
16183if ac_fn_c_try_run "$LINENO"; then :
16184 have_glibc_memmove_bug=no
16185else
16186 have_glibc_memmove_bug=yes
16187fi
16188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16189 conftest.$ac_objext conftest.beam conftest.$ac_ext
16190fi
16191
16192CFLAGS="$saved_cflags"
16193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16194$as_echo "$have_glibc_memmove_bug" >&6; }
16195if test "$have_glibc_memmove_bug" = yes; then
16196
16197$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16198
16199fi
16200
16201if test "$have_gcc_asm_for_x87" = yes; then
16202 # Some versions of gcc miscompile inline asm:
16203 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16204 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16205 case $CC in
16206 *gcc*)
16207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16208$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16209 saved_cflags="$CFLAGS"
16210 CFLAGS="-O2"
16211 if test "$cross_compiling" = yes; then :
16212 have_ipa_pure_const_bug=undefined
16213else
16214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16215/* end confdefs.h. */
16216
16217 __attribute__((noinline)) int
16218 foo(int *p) {
16219 int r;
16220 asm ( "movl \$6, (%1)\n\t"
16221 "xorl %0, %0\n\t"
16222 : "=r" (r) : "r" (p) : "memory"
16223 );
16224 return r;
16225 }
16226 int main() {
16227 int p = 8;
16228 if ((foo(&p) ? : p) != 6)
16229 return 1;
16230 return 0;
16231 }
16232
16233_ACEOF
16234if ac_fn_c_try_run "$LINENO"; then :
16235 have_ipa_pure_const_bug=no
16236else
16237 have_ipa_pure_const_bug=yes
16238fi
16239rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16240 conftest.$ac_objext conftest.beam conftest.$ac_ext
16241fi
16242
16243 CFLAGS="$saved_cflags"
16244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16245$as_echo "$have_ipa_pure_const_bug" >&6; }
16246 if test "$have_ipa_pure_const_bug" = yes; then
16247
16248$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16249
16250 fi
16251 ;;
16252 esac
16253fi
16254
Victor Stinner4f5366e2015-01-09 02:13:19 +010016255# Check for stdatomic.h
16256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16257$as_echo_n "checking for stdatomic.h... " >&6; }
16258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16259/* end confdefs.h. */
16260
16261
16262 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016263 atomic_int value = ATOMIC_VAR_INIT(1);
16264 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016265 int main() {
16266 int loaded_value = atomic_load(&value);
16267 return 0;
16268 }
16269
16270
16271_ACEOF
16272if ac_fn_c_try_link "$LINENO"; then :
16273 have_stdatomic_h=yes
16274else
16275 have_stdatomic_h=no
16276fi
16277rm -f core conftest.err conftest.$ac_objext \
16278 conftest$ac_exeext conftest.$ac_ext
16279
16280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16281$as_echo "$have_stdatomic_h" >&6; }
16282
16283if test "$have_stdatomic_h" = yes; then
16284
16285$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16286
16287fi
16288
16289# Check for GCC >= 4.7 __atomic builtins
16290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16291$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16293/* end confdefs.h. */
16294
16295
16296 volatile int val = 1;
16297 int main() {
16298 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16299 return 0;
16300 }
16301
16302
16303_ACEOF
16304if ac_fn_c_try_link "$LINENO"; then :
16305 have_builtin_atomic=yes
16306else
16307 have_builtin_atomic=no
16308fi
16309rm -f core conftest.err conftest.$ac_objext \
16310 conftest$ac_exeext conftest.$ac_ext
16311
16312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16313$as_echo "$have_builtin_atomic" >&6; }
16314
16315if test "$have_builtin_atomic" = yes; then
16316
16317$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16318
16319fi
16320
Ned Deily322f5ba2013-11-21 23:01:59 -080016321# ensurepip option
16322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16323$as_echo_n "checking for ensurepip... " >&6; }
16324
16325# Check whether --with-ensurepip was given.
16326if test "${with_ensurepip+set}" = set; then :
16327 withval=$with_ensurepip;
16328else
16329 with_ensurepip=upgrade
16330fi
16331
16332case $with_ensurepip in #(
16333 yes|upgrade) :
16334 ENSUREPIP=upgrade ;; #(
16335 install) :
16336 ENSUREPIP=install ;; #(
16337 no) :
16338 ENSUREPIP=no ;; #(
16339 *) :
16340 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16341esac
16342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16343$as_echo "$ENSUREPIP" >&6; }
16344
16345
Victor Stinner35a97c02015-03-08 02:59:09 +010016346# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16348$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16350/* end confdefs.h. */
16351
16352
16353 #include <dirent.h>
16354
16355 int main() {
16356 struct dirent entry;
16357 return entry.d_type == DT_UNKNOWN;
16358 }
16359
16360
16361_ACEOF
16362if ac_fn_c_try_link "$LINENO"; then :
16363 have_dirent_d_type=yes
16364else
16365 have_dirent_d_type=no
16366fi
16367rm -f core conftest.err conftest.$ac_objext \
16368 conftest$ac_exeext conftest.$ac_ext
16369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16370$as_echo "$have_dirent_d_type" >&6; }
16371
16372if test "$have_dirent_d_type" = yes; then
16373
16374$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16375
16376fi
16377
Victor Stinner9eb57c52015-03-19 22:21:49 +010016378# check if the Linux getrandom() syscall is available
16379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16380$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16381cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16382/* end confdefs.h. */
16383
16384
Victor Stinner1b80b242016-04-12 22:34:58 +020016385 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016386 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016387 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016388
16389 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016390 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016391 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016392 const int flags = GRND_NONBLOCK;
16393 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016394 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016395 return 0;
16396 }
16397
16398
16399_ACEOF
16400if ac_fn_c_try_link "$LINENO"; then :
16401 have_getrandom_syscall=yes
16402else
16403 have_getrandom_syscall=no
16404fi
16405rm -f core conftest.err conftest.$ac_objext \
16406 conftest$ac_exeext conftest.$ac_ext
16407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16408$as_echo "$have_getrandom_syscall" >&6; }
16409
16410if test "$have_getrandom_syscall" = yes; then
16411
16412$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16413
16414fi
16415
Victor Stinner3abf44e2015-09-18 15:38:37 +020016416# check if the getrandom() function is available
16417# the test was written for the Solaris function of <sys/random.h>
16418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16419$as_echo_n "checking for the getrandom() function... " >&6; }
16420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16421/* end confdefs.h. */
16422
16423
16424 #include <sys/random.h>
16425
16426 int main() {
16427 char buffer[1];
16428 const size_t buflen = sizeof(buffer);
16429 const int flags = 0;
16430 /* ignore the result, Python checks for ENOSYS at runtime */
16431 (void)getrandom(buffer, buflen, flags);
16432 return 0;
16433 }
16434
16435
16436_ACEOF
16437if ac_fn_c_try_link "$LINENO"; then :
16438 have_getrandom=yes
16439else
16440 have_getrandom=no
16441fi
16442rm -f core conftest.err conftest.$ac_objext \
16443 conftest$ac_exeext conftest.$ac_ext
16444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16445$as_echo "$have_getrandom" >&6; }
16446
16447if test "$have_getrandom" = yes; then
16448
16449$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16450
16451fi
16452
Guido van Rossum627b2d71993-12-24 10:39:16 +000016453# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016454ac_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 +000016455
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016456ac_config_files="$ac_config_files Modules/ld_so_aix"
16457
Martin v. Löwis11437992002-04-12 09:54:03 +000016458cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016459# This file is a shell script that caches the results of configure
16460# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016461# scripts and configure runs, see configure's option --config-cache.
16462# It is not useful on other systems. If it contains results you don't
16463# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016464#
Martin v. Löwis11437992002-04-12 09:54:03 +000016465# config.status only pays attention to the cache file if you give it
16466# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016467#
Skip Montanaro6dead952003-09-25 14:50:04 +000016468# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016469# loading this file, other *unset* `ac_cv_foo' will be assigned the
16470# following values.
16471
16472_ACEOF
16473
Guido van Rossumf78abae1997-01-21 22:02:36 +000016474# The following way of writing the cache mishandles newlines in values,
16475# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016476# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016477# Ultrix sh set writes to stderr and can't be redirected directly,
16478# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479(
16480 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16481 eval ac_val=\$$ac_var
16482 case $ac_val in #(
16483 *${as_nl}*)
16484 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016485 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16486$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016487 esac
16488 case $ac_var in #(
16489 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016490 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16491 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016492 esac ;;
16493 esac
16494 done
16495
Martin v. Löwis11437992002-04-12 09:54:03 +000016496 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016497 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16498 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016499 # `set' does not quote correctly, so add quotes: double-quote
16500 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016501 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016502 "s/'/'\\\\''/g;
16503 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016504 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016505 *)
16506 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016508 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509 esac |
16510 sort
16511) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016512 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016513 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016514 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016515 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016516 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16517 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16519 :end' >>confcache
16520if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16521 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016522 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016523 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16524$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016525 if test ! -f "$cache_file" || test -h "$cache_file"; then
16526 cat confcache >"$cache_file"
16527 else
16528 case $cache_file in #(
16529 */* | ?:*)
16530 mv -f confcache "$cache_file"$$ &&
16531 mv -f "$cache_file"$$ "$cache_file" ;; #(
16532 *)
16533 mv -f confcache "$cache_file" ;;
16534 esac
16535 fi
16536 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016537 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016538 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16539$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016540 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016541fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016542rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016543
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016544test "x$prefix" = xNONE && prefix=$ac_default_prefix
16545# Let make expand exec_prefix.
16546test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016547
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016548DEFS=-DHAVE_CONFIG_H
16549
Skip Montanaro6dead952003-09-25 14:50:04 +000016550ac_libobjs=
16551ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016552U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016553for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16554 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016555 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016556 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016557 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16558 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016559 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16560 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016561done
16562LIBOBJS=$ac_libobjs
16563
16564LTLIBOBJS=$ac_ltlibobjs
16565
16566
Martin v. Löwis11437992002-04-12 09:54:03 +000016567
Matthias Kloseb9621712010-04-24 17:59:49 +000016568
Victor Stinnere0be4232011-10-25 13:06:09 +020016569: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016570ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016571ac_clean_files_save=$ac_clean_files
16572ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016573{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16574$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16575as_write_fail=0
16576cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016577#! $SHELL
16578# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016579# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016580# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016581# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016582
Martin v. Löwis11437992002-04-12 09:54:03 +000016583debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016584ac_cs_recheck=false
16585ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016586
Matthias Kloseb9621712010-04-24 17:59:49 +000016587SHELL=\${CONFIG_SHELL-$SHELL}
16588export SHELL
16589_ASEOF
16590cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16591## -------------------- ##
16592## M4sh Initialization. ##
16593## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016594
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016595# Be more Bourne compatible
16596DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016597if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016598 emulate sh
16599 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016600 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016601 # is contrary to our usage. Disable this feature.
16602 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016603 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016604else
Matthias Kloseb9621712010-04-24 17:59:49 +000016605 case `(set -o) 2>/dev/null` in #(
16606 *posix*) :
16607 set -o posix ;; #(
16608 *) :
16609 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016611fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016612
16613
Matthias Kloseb9621712010-04-24 17:59:49 +000016614as_nl='
16615'
16616export as_nl
16617# Printing a long string crashes Solaris 7 /usr/bin/printf.
16618as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16619as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16620as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16621# Prefer a ksh shell builtin over an external printf program on Solaris,
16622# but without wasting forks for bash or zsh.
16623if test -z "$BASH_VERSION$ZSH_VERSION" \
16624 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16625 as_echo='print -r --'
16626 as_echo_n='print -rn --'
16627elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16628 as_echo='printf %s\n'
16629 as_echo_n='printf %s'
16630else
16631 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16632 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16633 as_echo_n='/usr/ucb/echo -n'
16634 else
16635 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16636 as_echo_n_body='eval
16637 arg=$1;
16638 case $arg in #(
16639 *"$as_nl"*)
16640 expr "X$arg" : "X\\(.*\\)$as_nl";
16641 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16642 esac;
16643 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16644 '
16645 export as_echo_n_body
16646 as_echo_n='sh -c $as_echo_n_body as_echo'
16647 fi
16648 export as_echo_body
16649 as_echo='sh -c $as_echo_body as_echo'
16650fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016651
16652# The user is always right.
16653if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016654 PATH_SEPARATOR=:
16655 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16656 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16657 PATH_SEPARATOR=';'
16658 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661
16662# IFS
16663# We need space, tab and new line, in precisely that order. Quoting is
16664# there to prevent editors from complaining about space-tab.
16665# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16666# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016667IFS=" "" $as_nl"
16668
16669# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016670as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016671case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672 *[\\/]* ) as_myself=$0 ;;
16673 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016674for as_dir in $PATH
16675do
16676 IFS=$as_save_IFS
16677 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016678 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16679 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016682 ;;
16683esac
16684# We did not find ourselves, most probably we were run as `sh COMMAND'
16685# in which case we are not to be found in the path.
16686if test "x$as_myself" = x; then
16687 as_myself=$0
16688fi
16689if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016690 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16691 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016692fi
16693
Matthias Kloseb9621712010-04-24 17:59:49 +000016694# Unset variables that we do not need and which cause bugs (e.g. in
16695# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16696# suppresses any "Segmentation fault" message there. '((' could
16697# trigger a bug in pdksh 5.2.14.
16698for as_var in BASH_ENV ENV MAIL MAILPATH
16699do eval test x\${$as_var+set} = xset \
16700 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701done
16702PS1='$ '
16703PS2='> '
16704PS4='+ '
16705
16706# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016707LC_ALL=C
16708export LC_ALL
16709LANGUAGE=C
16710export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016711
Matthias Kloseb9621712010-04-24 17:59:49 +000016712# CDPATH.
16713(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16714
16715
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016716# as_fn_error STATUS ERROR [LINENO LOG_FD]
16717# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016718# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16719# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016720# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016721as_fn_error ()
16722{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016723 as_status=$1; test $as_status -eq 0 && as_status=1
16724 if test "$4"; then
16725 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16726 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016727 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016728 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016729 as_fn_exit $as_status
16730} # as_fn_error
16731
16732
16733# as_fn_set_status STATUS
16734# -----------------------
16735# Set $? to STATUS, without forking.
16736as_fn_set_status ()
16737{
16738 return $1
16739} # as_fn_set_status
16740
16741# as_fn_exit STATUS
16742# -----------------
16743# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16744as_fn_exit ()
16745{
16746 set +e
16747 as_fn_set_status $1
16748 exit $1
16749} # as_fn_exit
16750
16751# as_fn_unset VAR
16752# ---------------
16753# Portably unset VAR.
16754as_fn_unset ()
16755{
16756 { eval $1=; unset $1;}
16757}
16758as_unset=as_fn_unset
16759# as_fn_append VAR VALUE
16760# ----------------------
16761# Append the text in VALUE to the end of the definition contained in VAR. Take
16762# advantage of any shell optimizations that allow amortized linear growth over
16763# repeated appends, instead of the typical quadratic growth present in naive
16764# implementations.
16765if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16766 eval 'as_fn_append ()
16767 {
16768 eval $1+=\$2
16769 }'
16770else
16771 as_fn_append ()
16772 {
16773 eval $1=\$$1\$2
16774 }
16775fi # as_fn_append
16776
16777# as_fn_arith ARG...
16778# ------------------
16779# Perform arithmetic evaluation on the ARGs, and store the result in the
16780# global $as_val. Take advantage of shells that can avoid forks. The arguments
16781# must be portable across $(()) and expr.
16782if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16783 eval 'as_fn_arith ()
16784 {
16785 as_val=$(( $* ))
16786 }'
16787else
16788 as_fn_arith ()
16789 {
16790 as_val=`expr "$@" || test $? -eq 1`
16791 }
16792fi # as_fn_arith
16793
16794
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016795if expr a : '\(a\)' >/dev/null 2>&1 &&
16796 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16797 as_expr=expr
16798else
16799 as_expr=false
16800fi
16801
16802if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16803 as_basename=basename
16804else
16805 as_basename=false
16806fi
16807
Matthias Kloseb9621712010-04-24 17:59:49 +000016808if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16809 as_dirname=dirname
16810else
16811 as_dirname=false
16812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016814as_me=`$as_basename -- "$0" ||
16815$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16816 X"$0" : 'X\(//\)$' \| \
16817 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016818$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819 sed '/^.*\/\([^/][^/]*\)\/*$/{
16820 s//\1/
16821 q
16822 }
16823 /^X\/\(\/\/\)$/{
16824 s//\1/
16825 q
16826 }
16827 /^X\/\(\/\).*/{
16828 s//\1/
16829 q
16830 }
16831 s/.*/./; q'`
16832
Matthias Kloseb9621712010-04-24 17:59:49 +000016833# Avoid depending upon Character Ranges.
16834as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16835as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16836as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16837as_cr_digits='0123456789'
16838as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016839
16840ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016841case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016842-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016843 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016844 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016845 xy) ECHO_C='\c';;
16846 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16847 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016848 esac;;
16849*)
16850 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016851esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016852
Martin v. Löwis11437992002-04-12 09:54:03 +000016853rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016854if test -d conf$$.dir; then
16855 rm -f conf$$.dir/conf$$.file
16856else
16857 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016858 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016860if (echo >conf$$.file) 2>/dev/null; then
16861 if ln -s conf$$.file conf$$ 2>/dev/null; then
16862 as_ln_s='ln -s'
16863 # ... but there are two gotchas:
16864 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16865 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016866 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016867 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016868 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016869 elif ln conf$$.file conf$$ 2>/dev/null; then
16870 as_ln_s=ln
16871 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016872 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016873 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016874else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016875 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016876fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016877rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16878rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016879
Matthias Kloseb9621712010-04-24 17:59:49 +000016880
16881# as_fn_mkdir_p
16882# -------------
16883# Create "$as_dir" as a directory, including parents if necessary.
16884as_fn_mkdir_p ()
16885{
16886
16887 case $as_dir in #(
16888 -*) as_dir=./$as_dir;;
16889 esac
16890 test -d "$as_dir" || eval $as_mkdir_p || {
16891 as_dirs=
16892 while :; do
16893 case $as_dir in #(
16894 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16895 *) as_qdir=$as_dir;;
16896 esac
16897 as_dirs="'$as_qdir' $as_dirs"
16898 as_dir=`$as_dirname -- "$as_dir" ||
16899$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16900 X"$as_dir" : 'X\(//\)[^/]' \| \
16901 X"$as_dir" : 'X\(//\)$' \| \
16902 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16903$as_echo X"$as_dir" |
16904 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16905 s//\1/
16906 q
16907 }
16908 /^X\(\/\/\)[^/].*/{
16909 s//\1/
16910 q
16911 }
16912 /^X\(\/\/\)$/{
16913 s//\1/
16914 q
16915 }
16916 /^X\(\/\).*/{
16917 s//\1/
16918 q
16919 }
16920 s/.*/./; q'`
16921 test -d "$as_dir" && break
16922 done
16923 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016924 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016925
16926
16927} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016928if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016929 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016930else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016931 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016932 as_mkdir_p=false
16933fi
16934
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016935
16936# as_fn_executable_p FILE
16937# -----------------------
16938# Test if FILE is an executable regular file.
16939as_fn_executable_p ()
16940{
16941 test -f "$1" && test -x "$1"
16942} # as_fn_executable_p
16943as_test_x='test -x'
16944as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016945
16946# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016947as_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 +000016948
16949# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016950as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016951
16952
Martin v. Löwis11437992002-04-12 09:54:03 +000016953exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016954## ----------------------------------- ##
16955## Main body of $CONFIG_STATUS script. ##
16956## ----------------------------------- ##
16957_ASEOF
16958test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016959
Matthias Kloseb9621712010-04-24 17:59:49 +000016960cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16961# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016962# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016963# values after options handling.
16964ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016965This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016966generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016967
16968 CONFIG_FILES = $CONFIG_FILES
16969 CONFIG_HEADERS = $CONFIG_HEADERS
16970 CONFIG_LINKS = $CONFIG_LINKS
16971 CONFIG_COMMANDS = $CONFIG_COMMANDS
16972 $ $0 $@
16973
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016974on `(hostname || uname -n) 2>/dev/null | sed 1q`
16975"
16976
Martin v. Löwis11437992002-04-12 09:54:03 +000016977_ACEOF
16978
Matthias Kloseb9621712010-04-24 17:59:49 +000016979case $ac_config_files in *"
16980"*) set x $ac_config_files; shift; ac_config_files=$*;;
16981esac
16982
16983case $ac_config_headers in *"
16984"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16985esac
16986
16987
16988cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016989# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016990config_files="$ac_config_files"
16991config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016992
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016993_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016994
Matthias Kloseb9621712010-04-24 17:59:49 +000016995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016996ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016997\`$as_me' instantiates files and other configuration actions
16998from templates according to the current configuration. Unless the files
16999and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017000
Matthias Kloseb9621712010-04-24 17:59:49 +000017001Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017002
17003 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017004 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017005 --config print configuration, then exit
17006 -q, --quiet, --silent
17007 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017008 -d, --debug don't remove temporary files
17009 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017010 --file=FILE[:TEMPLATE]
17011 instantiate the configuration file FILE
17012 --header=FILE[:TEMPLATE]
17013 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017014
17015Configuration files:
17016$config_files
17017
17018Configuration headers:
17019$config_headers
17020
Matthias Kloseb9621712010-04-24 17:59:49 +000017021Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017024cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17025ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017026ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017027python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017028configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017029 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017030
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017031Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017032This config.status script is free software; the Free Software Foundation
17033gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034
17035ac_pwd='$ac_pwd'
17036srcdir='$srcdir'
17037INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017038MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017039test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017040_ACEOF
17041
Matthias Kloseb9621712010-04-24 17:59:49 +000017042cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17043# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017044ac_need_defaults=:
17045while test $# != 0
17046do
17047 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017048 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017049 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17050 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017051 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017052 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017053 --*=)
17054 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17055 ac_optarg=
17056 ac_shift=:
17057 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017058 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017059 ac_option=$1
17060 ac_optarg=$2
17061 ac_shift=shift
17062 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017063 esac
17064
Skip Montanaro6dead952003-09-25 14:50:04 +000017065 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017066 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017067 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17068 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017070 $as_echo "$ac_cs_version"; exit ;;
17071 --config | --confi | --conf | --con | --co | --c )
17072 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017073 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017074 debug=: ;;
17075 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017076 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017077 case $ac_optarg in
17078 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017079 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017080 esac
17081 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017082 ac_need_defaults=false;;
17083 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017084 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017085 case $ac_optarg in
17086 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17087 esac
17088 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017089 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090 --he | --h)
17091 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017092 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017093Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017095 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017096 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17097 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17098 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017099
17100 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017101 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017102Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017103
Matthias Kloseb9621712010-04-24 17:59:49 +000017104 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017105 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017106
17107 esac
17108 shift
17109done
17110
Skip Montanaro6dead952003-09-25 14:50:04 +000017111ac_configure_extra_args=
17112
17113if $ac_cs_silent; then
17114 exec 6>/dev/null
17115 ac_configure_extra_args="$ac_configure_extra_args --silent"
17116fi
17117
17118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017119cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017120if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017121 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017122 shift
17123 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17124 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017125 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017126 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017127fi
17128
Martin v. Löwis11437992002-04-12 09:54:03 +000017129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017130cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017131exec 5>>config.log
17132{
17133 echo
17134 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17135## Running $as_me. ##
17136_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017137 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017138} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017141cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017142_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017143
Matthias Kloseb9621712010-04-24 17:59:49 +000017144cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017145
17146# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017147for ac_config_target in $ac_config_targets
17148do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017149 case $ac_config_target in
17150 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17151 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17152 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017153 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17154 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017155 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17156 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017157 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017158 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017159 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160
Victor Stinnere0be4232011-10-25 13:06:09 +020017161 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017162 esac
17163done
17164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017165
Martin v. Löwis11437992002-04-12 09:54:03 +000017166# If the user did not use the arguments to specify the items to instantiate,
17167# then the envvar interface is used. Set only those that are not.
17168# We use the long form for the default assignment because of an extremely
17169# bizarre bug on SunOS 4.1.3.
17170if $ac_need_defaults; then
17171 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17172 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17173fi
17174
Skip Montanaro6dead952003-09-25 14:50:04 +000017175# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017177# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017178# Hook for its removal unless debugging.
17179# Note that there is a small window in which the directory will not be cleaned:
17180# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017181$debug ||
17182{
Victor Stinnere0be4232011-10-25 13:06:09 +020017183 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017185 : "${ac_tmp:=$tmp}"
17186 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017188 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017189}
Martin v. Löwis11437992002-04-12 09:54:03 +000017190# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017191
Martin v. Löwis11437992002-04-12 09:54:03 +000017192{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017193 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017194 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017195} ||
17196{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017197 tmp=./conf$$-$RANDOM
17198 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017199} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017200ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017201
Matthias Kloseb9621712010-04-24 17:59:49 +000017202# Set up the scripts for CONFIG_FILES section.
17203# No need to generate them if there are no CONFIG_FILES.
17204# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017206
Matthias Kloseb9621712010-04-24 17:59:49 +000017207
17208ac_cr=`echo X | tr X '\015'`
17209# On cygwin, bash can eat \r inside `` if the user requested igncr.
17210# But we know of no other shell where ac_cr would be empty at this
17211# point, so we can use a bashism as a fallback.
17212if test "x$ac_cr" = x; then
17213 eval ac_cr=\$\'\\r\'
17214fi
17215ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17216if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017217 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017218else
17219 ac_cs_awk_cr=$ac_cr
17220fi
17221
Victor Stinnere0be4232011-10-25 13:06:09 +020017222echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017223_ACEOF
17224
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017225
Matthias Kloseb9621712010-04-24 17:59:49 +000017226{
17227 echo "cat >conf$$subs.awk <<_ACEOF" &&
17228 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17229 echo "_ACEOF"
17230} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017231 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17232ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017233ac_delim='%!_!# '
17234for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017235 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017236 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017237
Matthias Kloseb9621712010-04-24 17:59:49 +000017238 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17239 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240 break
17241 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017242 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017243 else
17244 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017245 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017246done
Matthias Kloseb9621712010-04-24 17:59:49 +000017247rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248
Matthias Kloseb9621712010-04-24 17:59:49 +000017249cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017250cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017252sed -n '
17253h
17254s/^/S["/; s/!.*/"]=/
17255p
17256g
17257s/^[^!]*!//
17258:repl
17259t repl
17260s/'"$ac_delim"'$//
17261t delim
17262:nl
17263h
17264s/\(.\{148\}\)..*/\1/
17265t more1
17266s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17267p
17268n
17269b repl
17270:more1
17271s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17272p
17273g
17274s/.\{148\}//
17275t nl
17276:delim
17277h
17278s/\(.\{148\}\)..*/\1/
17279t more2
17280s/["\\]/\\&/g; s/^/"/; s/$/"/
17281p
17282b
17283:more2
17284s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17285p
17286g
17287s/.\{148\}//
17288t delim
17289' <conf$$subs.awk | sed '
17290/^[^""]/{
17291 N
17292 s/\n//
17293}
17294' >>$CONFIG_STATUS || ac_write_fail=1
17295rm -f conf$$subs.awk
17296cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17297_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017298cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017299 for (key in S) S_is_set[key] = 1
17300 FS = ""
17301
17302}
17303{
17304 line = $ 0
17305 nfields = split(line, field, "@")
17306 substed = 0
17307 len = length(field[1])
17308 for (i = 2; i < nfields; i++) {
17309 key = field[i]
17310 keylen = length(key)
17311 if (S_is_set[key]) {
17312 value = S[key]
17313 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17314 len += length(value) + length(field[++i])
17315 substed = 1
17316 } else
17317 len += 1 + keylen
17318 }
17319
17320 print line
17321}
17322
17323_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017325cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17326if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17327 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17328else
17329 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017330fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017331 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017332_ACEOF
17333
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017334# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17335# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336# trailing colons and then remove the whole line if VPATH becomes empty
17337# (actually we leave an empty line to preserve line numbers).
17338if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017339 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17340h
17341s///
17342s/^/:/
17343s/[ ]*$/:/
17344s/:\$(srcdir):/:/g
17345s/:\${srcdir}:/:/g
17346s/:@srcdir@:/:/g
17347s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017349x
17350s/\(=[ ]*\).*/\1/
17351G
17352s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017353s/^[^=]*=[ ]*$//
17354}'
17355fi
17356
Matthias Kloseb9621712010-04-24 17:59:49 +000017357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017358fi # test -n "$CONFIG_FILES"
17359
Matthias Kloseb9621712010-04-24 17:59:49 +000017360# Set up the scripts for CONFIG_HEADERS section.
17361# No need to generate them if there are no CONFIG_HEADERS.
17362# This happens for instance with `./config.status Makefile'.
17363if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017364cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017365BEGIN {
17366_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367
Matthias Kloseb9621712010-04-24 17:59:49 +000017368# Transform confdefs.h into an awk script `defines.awk', embedded as
17369# here-document in config.status, that substitutes the proper values into
17370# config.h.in to produce config.h.
17371
17372# Create a delimiter string that does not exist in confdefs.h, to ease
17373# handling of long lines.
17374ac_delim='%!_!# '
17375for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017376 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17377 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017378 break
17379 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017380 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017381 else
17382 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17383 fi
17384done
17385
17386# For the awk script, D is an array of macro values keyed by name,
17387# likewise P contains macro parameters if any. Preserve backslash
17388# newline sequences.
17389
17390ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17391sed -n '
17392s/.\{148\}/&'"$ac_delim"'/g
17393t rset
17394:rset
17395s/^[ ]*#[ ]*define[ ][ ]*/ /
17396t def
17397d
17398:def
17399s/\\$//
17400t bsnl
17401s/["\\]/\\&/g
17402s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17403D["\1"]=" \3"/p
17404s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17405d
17406:bsnl
17407s/["\\]/\\&/g
17408s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17409D["\1"]=" \3\\\\\\n"\\/p
17410t cont
17411s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17412t cont
17413d
17414:cont
17415n
17416s/.\{148\}/&'"$ac_delim"'/g
17417t clear
17418:clear
17419s/\\$//
17420t bsnlc
17421s/["\\]/\\&/g; s/^/"/; s/$/"/p
17422d
17423:bsnlc
17424s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17425b cont
17426' <confdefs.h | sed '
17427s/'"$ac_delim"'/"\\\
17428"/g' >>$CONFIG_STATUS || ac_write_fail=1
17429
17430cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17431 for (key in D) D_is_set[key] = 1
17432 FS = ""
17433}
17434/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17435 line = \$ 0
17436 split(line, arg, " ")
17437 if (arg[1] == "#") {
17438 defundef = arg[2]
17439 mac1 = arg[3]
17440 } else {
17441 defundef = substr(arg[1], 2)
17442 mac1 = arg[2]
17443 }
17444 split(mac1, mac2, "(") #)
17445 macro = mac2[1]
17446 prefix = substr(line, 1, index(line, defundef) - 1)
17447 if (D_is_set[macro]) {
17448 # Preserve the white space surrounding the "#".
17449 print prefix "define", macro P[macro] D[macro]
17450 next
17451 } else {
17452 # Replace #undef with comments. This is necessary, for example,
17453 # in the case of _POSIX_SOURCE, which is predefined and required
17454 # on some systems where configure will not decide to define it.
17455 if (defundef == "undef") {
17456 print "/*", prefix defundef, macro, "*/"
17457 next
17458 }
17459 }
17460}
17461{ print }
17462_ACAWK
17463_ACEOF
17464cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017465 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017466fi # test -n "$CONFIG_HEADERS"
17467
17468
17469eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17470shift
17471for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017472do
17473 case $ac_tag in
17474 :[FHLC]) ac_mode=$ac_tag; continue;;
17475 esac
17476 case $ac_mode$ac_tag in
17477 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017478 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017479 :[FH]-) ac_tag=-:-;;
17480 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17481 esac
17482 ac_save_IFS=$IFS
17483 IFS=:
17484 set x $ac_tag
17485 IFS=$ac_save_IFS
17486 shift
17487 ac_file=$1
17488 shift
17489
17490 case $ac_mode in
17491 :L) ac_source=$1;;
17492 :[FH])
17493 ac_file_inputs=
17494 for ac_f
17495 do
17496 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017497 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498 *) # Look for the file first in the build tree, then in the source tree
17499 # (if the path is not absolute). The absolute path cannot be DOS-style,
17500 # because $ac_f cannot contain `:'.
17501 test -f "$ac_f" ||
17502 case $ac_f in
17503 [\\/$]*) false;;
17504 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17505 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017506 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017508 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17509 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017510 done
17511
17512 # Let's still pretend it is `configure' which instantiates (i.e., don't
17513 # use $as_me), people would be surprised to read:
17514 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017515 configure_input='Generated from '`
17516 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17517 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518 if test x"$ac_file" != x-; then
17519 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017520 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17521$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017523 # Neutralize special characters interpreted by sed in replacement strings.
17524 case $configure_input in #(
17525 *\&* | *\|* | *\\* )
17526 ac_sed_conf_input=`$as_echo "$configure_input" |
17527 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17528 *) ac_sed_conf_input=$configure_input;;
17529 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530
17531 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017532 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17533 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017534 esac
17535 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017536 esac
17537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017538 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017539$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017540 X"$ac_file" : 'X\(//\)[^/]' \| \
17541 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017543$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17545 s//\1/
17546 q
17547 }
17548 /^X\(\/\/\)[^/].*/{
17549 s//\1/
17550 q
17551 }
17552 /^X\(\/\/\)$/{
17553 s//\1/
17554 q
17555 }
17556 /^X\(\/\).*/{
17557 s//\1/
17558 q
17559 }
17560 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017561 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017562 ac_builddir=.
17563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564case "$ac_dir" in
17565.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17566*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017567 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017569 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570 case $ac_top_builddir_sub in
17571 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17572 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17573 esac ;;
17574esac
17575ac_abs_top_builddir=$ac_pwd
17576ac_abs_builddir=$ac_pwd$ac_dir_suffix
17577# for backward compatibility:
17578ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017579
17580case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017582 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017583 ac_top_srcdir=$ac_top_builddir_sub
17584 ac_abs_top_srcdir=$ac_pwd ;;
17585 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017586 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017587 ac_top_srcdir=$srcdir
17588 ac_abs_top_srcdir=$srcdir ;;
17589 *) # Relative name.
17590 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17591 ac_top_srcdir=$ac_top_build_prefix$srcdir
17592 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017593esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017595
Martin v. Löwis11437992002-04-12 09:54:03 +000017596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597 case $ac_mode in
17598 :F)
17599 #
17600 # CONFIG_FILE
17601 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017602
17603 case $INSTALL in
17604 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017606 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017607 ac_MKDIR_P=$MKDIR_P
17608 case $MKDIR_P in
17609 [\\/$]* | ?:[\\/]* ) ;;
17610 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17611 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017612_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017613
Matthias Kloseb9621712010-04-24 17:59:49 +000017614cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017615# If the template does not know about datarootdir, expand it.
17616# FIXME: This hack should be removed a few years after 2.60.
17617ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017618ac_sed_dataroot='
17619/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017620 p
17621 q
17622}
17623/@datadir@/p
17624/@docdir@/p
17625/@infodir@/p
17626/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017627/@mandir@/p'
17628case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017629*datarootdir*) ac_datarootdir_seen=yes;;
17630*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017631 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17632$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017634cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635 ac_datarootdir_hack='
17636 s&@datadir@&$datadir&g
17637 s&@docdir@&$docdir&g
17638 s&@infodir@&$infodir&g
17639 s&@localedir@&$localedir&g
17640 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017641 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642esac
17643_ACEOF
17644
17645# Neutralize VPATH when `$srcdir' = `.'.
17646# Shell code in configure.ac might set extrasub.
17647# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017648cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17649ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017650$extrasub
17651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017653:t
17654/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017655s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017656s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017657s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658s&@srcdir@&$ac_srcdir&;t t
17659s&@abs_srcdir@&$ac_abs_srcdir&;t t
17660s&@top_srcdir@&$ac_top_srcdir&;t t
17661s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17662s&@builddir@&$ac_builddir&;t t
17663s&@abs_builddir@&$ac_abs_builddir&;t t
17664s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17665s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017666s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017668"
Victor Stinnere0be4232011-10-25 13:06:09 +020017669eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17670 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017672test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017673 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17674 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17675 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017676 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017677which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017678$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017679which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017680
Victor Stinnere0be4232011-10-25 13:06:09 +020017681 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017682 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017683 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17684 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017685 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017686 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017687 ;;
17688 :H)
17689 #
17690 # CONFIG_HEADER
17691 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017692 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017693 {
17694 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017695 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17696 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017697 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017698 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017699 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17700$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017701 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017702 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017703 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017704 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017705 fi
17706 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017707 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017708 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017709 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017710 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017711 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017712
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713
17714 esac
17715
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017716
17717 case $ac_file$ac_mode in
17718 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17719
17720 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721done # for ac_tag
17722
Guido van Rossum627b2d71993-12-24 10:39:16 +000017723
Matthias Kloseb9621712010-04-24 17:59:49 +000017724as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017725_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017726ac_clean_files=$ac_clean_files_save
17727
Matthias Kloseb9621712010-04-24 17:59:49 +000017728test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017729 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017730
Martin v. Löwis11437992002-04-12 09:54:03 +000017731
17732# configure is writing to config.log, and then calls config.status.
17733# config.status does its own redirection, appending to config.log.
17734# Unfortunately, on DOS this fails, as config.log is still kept open
17735# by configure, so config.status won't be able to write to it; its
17736# output is simply discarded. So we exec the FD to /dev/null,
17737# effectively closing config.log, so it can be properly (re)opened and
17738# appended to by config.status. When coming back to configure, we
17739# need to make the FD available again.
17740if test "$no_create" != yes; then
17741 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017742 ac_config_status_args=
17743 test "$silent" = yes &&
17744 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017745 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017746 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017747 exec 5>>config.log
17748 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17749 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017750 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017751fi
17752if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17754$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017755fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017756
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017757
Christian Heimes75ed8902013-11-20 01:11:18 +010017758echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017759if test ! -f Modules/Setup
17760then
17761 cp $srcdir/Modules/Setup.dist Modules/Setup
17762fi
17763
Christian Heimes75ed8902013-11-20 01:11:18 +010017764echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017765if test ! -f Modules/Setup.local
17766then
17767 echo "# Edit this file for local setup changes" >Modules/Setup.local
17768fi
17769
Christian Heimes75ed8902013-11-20 01:11:18 +010017770echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017771$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17772 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017773 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017774mv config.c Modules