blob: 68970848702dc8d1d1e7291f18963eadeb125711 [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.
Yury Selivanov7aa53412015-05-30 10:57:56 -04003# Generated by GNU Autoconf 2.69 for python 3.5.
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'
Yury Selivanov7aa53412015-05-30 10:57:56 -0400583PACKAGE_VERSION='3.5'
584PACKAGE_STRING='python 3.5'
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
Kushal Das02d23a22014-04-15 23:50:06 +0530683OPCODEHGEN
Matthias Klosec4c48422012-10-21 23:05:35 +0200684PYTHON
685ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200686ac_ct_READELF
687READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000688ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200689ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000690AR
691RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000692USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000693GNULD
694LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000695LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000696RUNSHARED
697INSTSONAME
698LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000699PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000700BLDLIBRARY
701DLLLIBRARY
702LDLIBRARY
703LIBRARY
704BUILDEXEEXT
705EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200706NO_AS_NEEDED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200708PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200709MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200710ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000711MAINCC
712CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713GREP
714CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000715OBJEXT
716EXEEXT
717ac_ct_CC
718CPPFLAGS
719LDFLAGS
720CFLAGS
721CC
722EXPORT_MACOSX_DEPLOYMENT_TARGET
723CONFIGURE_MACOSX_DEPLOYMENT_TARGET
724SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200725_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000726MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000727FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800729FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000730FRAMEWORKALTINSTALLLAST
731FRAMEWORKALTINSTALLFIRST
732FRAMEWORKINSTALLLAST
733FRAMEWORKINSTALLFIRST
734PYTHONFRAMEWORKINSTALLDIR
735PYTHONFRAMEWORKPREFIX
736PYTHONFRAMEWORKDIR
737PYTHONFRAMEWORKIDENTIFIER
738PYTHONFRAMEWORK
739LIPO_32BIT_FLAGS
740ARCH_RUN_32BIT
741UNIVERSALSDK
742CONFIG_ARGS
743SOVERSION
744VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200745PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500754HAS_HG
755HGBRANCH
756HGTAG
757HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400758BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000759target_alias
760host_alias
761build_alias
762LIBS
763ECHO_T
764ECHO_N
765ECHO_C
766DEFS
767mandir
768localedir
769libdir
770psdir
771pdfdir
772dvidir
773htmldir
774infodir
775docdir
776oldincludedir
777includedir
778localstatedir
779sharedstatedir
780sysconfdir
781datadir
782datarootdir
783libexecdir
784sbindir
785bindir
786program_transform_name
787prefix
788exec_prefix
789PACKAGE_URL
790PACKAGE_BUGREPORT
791PACKAGE_STRING
792PACKAGE_VERSION
793PACKAGE_TARNAME
794PACKAGE_NAME
795PATH_SEPARATOR
796SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000797ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000798ac_user_opts='
799enable_option_checking
800enable_universalsdk
801with_universal_archs
802with_framework_name
803enable_framework
804with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600805with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000806with_cxx_main
807with_suffix
808enable_shared
809enable_profiling
810with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700811with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100812with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100813with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000814with_libs
815with_system_expat
816with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100817with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000818enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700819with_tcltk_includes
820with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000821with_dbmliborder
822with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000823with_threads
824with_thread
825enable_ipv6
826with_doc_strings
827with_tsc
828with_pymalloc
829with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000830with_fpectl
831with_libm
832with_libc
833enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800835with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000836'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837 ac_precious_vars='build_alias
838host_alias
839target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100840MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841CC
842CFLAGS
843LDFLAGS
844LIBS
845CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100846CPP
847PKG_CONFIG
848PKG_CONFIG_PATH
849PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850
Guido van Rossum627b2d71993-12-24 10:39:16 +0000851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000853ac_init_help=
854ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000855ac_unrecognized_opts=
856ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857# The variables have the same names as the options, with
858# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000859cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862no_recursion=
863prefix=NONE
864program_prefix=NONE
865program_suffix=NONE
866program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871x_includes=NONE
872x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000873
874# Installation directory options.
875# These are left unexpanded so users can "make install exec_prefix=/foo"
876# and all the variables that are supposed to be based on exec_prefix
877# by default will actually change.
878# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000879# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880bindir='${exec_prefix}/bin'
881sbindir='${exec_prefix}/sbin'
882libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883datarootdir='${prefix}/share'
884datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885sysconfdir='${prefix}/etc'
886sharedstatedir='${prefix}/com'
887localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888includedir='${prefix}/include'
889oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
891infodir='${datarootdir}/info'
892htmldir='${docdir}'
893dvidir='${docdir}'
894pdfdir='${docdir}'
895psdir='${docdir}'
896libdir='${exec_prefix}/lib'
897localedir='${datarootdir}/locale'
898mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000899
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000903do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904 # If the previous option needs an argument, assign it.
905 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907 ac_prev=
908 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200912 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
913 *=) ac_optarg= ;;
914 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000915 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917 # Accept the important Cygnus configure options, so we can diagnose typos.
918
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 case $ac_dashdash$ac_option in
920 --)
921 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923 -bindir | --bindir | --bindi | --bind | --bin | --bi)
924 ac_prev=bindir ;;
925 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000927
928 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000933 -cache-file | --cache-file | --cache-fil | --cache-fi \
934 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
935 ac_prev=cache_file ;;
936 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
937 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 cache_file=$ac_optarg ;;
939
940 --config-cache | -C)
941 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000942
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000943 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000944 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000946 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
949 | --dataroo | --dataro | --datar)
950 ac_prev=datarootdir ;;
951 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
952 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
953 datarootdir=$ac_optarg ;;
954
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000956 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200959 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 ac_useropt_orig=$ac_useropt
961 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
962 case $ac_user_opts in
963 *"
964"enable_$ac_useropt"
965"*) ;;
966 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
967 ac_unrecognized_sep=', ';;
968 esac
969 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970
971 -docdir | --docdir | --docdi | --doc | --do)
972 ac_prev=docdir ;;
973 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
974 docdir=$ac_optarg ;;
975
976 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
977 ac_prev=dvidir ;;
978 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
979 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000982 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000983 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200985 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 ac_useropt_orig=$ac_useropt
987 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
988 case $ac_user_opts in
989 *"
990"enable_$ac_useropt"
991"*) ;;
992 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
993 ac_unrecognized_sep=', ';;
994 esac
995 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
998 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
999 | --exec | --exe | --ex)
1000 ac_prev=exec_prefix ;;
1001 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1002 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1003 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001005
1006 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007 # Obsolete; use --with-gas.
1008 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001009
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 -help | --help | --hel | --he | -h)
1011 ac_init_help=long ;;
1012 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1013 ac_init_help=recursive ;;
1014 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1015 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001022 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1023 ac_prev=htmldir ;;
1024 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1025 | --ht=*)
1026 htmldir=$ac_optarg ;;
1027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 -includedir | --includedir | --includedi | --included | --include \
1029 | --includ | --inclu | --incl | --inc)
1030 ac_prev=includedir ;;
1031 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1032 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -infodir | --infodir | --infodi | --infod | --info | --inf)
1036 ac_prev=infodir ;;
1037 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -libdir | --libdir | --libdi | --libd)
1041 ac_prev=libdir ;;
1042 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1046 | --libexe | --libex | --libe)
1047 ac_prev=libexecdir ;;
1048 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1049 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001050 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001052 -localedir | --localedir | --localedi | --localed | --locale)
1053 ac_prev=localedir ;;
1054 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1055 localedir=$ac_optarg ;;
1056
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001058 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 ac_prev=localstatedir ;;
1060 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001063
1064 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1065 ac_prev=mandir ;;
1066 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001070 # Obsolete; use --without-fp.
1071 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001074 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075 no_create=yes ;;
1076
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001077 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1078 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1079 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1082 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1083 | --oldin | --oldi | --old | --ol | --o)
1084 ac_prev=oldincludedir ;;
1085 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1086 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1087 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001088 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001089
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1091 ac_prev=prefix ;;
1092 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
1095 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1096 | --program-pre | --program-pr | --program-p)
1097 ac_prev=program_prefix ;;
1098 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1099 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001100 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101
1102 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1103 | --program-suf | --program-su | --program-s)
1104 ac_prev=program_suffix ;;
1105 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1106 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108
1109 -program-transform-name | --program-transform-name \
1110 | --program-transform-nam | --program-transform-na \
1111 | --program-transform-n | --program-transform- \
1112 | --program-transform | --program-transfor \
1113 | --program-transfo | --program-transf \
1114 | --program-trans | --program-tran \
1115 | --progr-tra | --program-tr | --program-t)
1116 ac_prev=program_transform_name ;;
1117 -program-transform-name=* | --program-transform-name=* \
1118 | --program-transform-nam=* | --program-transform-na=* \
1119 | --program-transform-n=* | --program-transform-=* \
1120 | --program-transform=* | --program-transfor=* \
1121 | --program-transfo=* | --program-transf=* \
1122 | --program-trans=* | --program-tran=* \
1123 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001126 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1127 ac_prev=pdfdir ;;
1128 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1129 pdfdir=$ac_optarg ;;
1130
1131 -psdir | --psdir | --psdi | --psd | --ps)
1132 ac_prev=psdir ;;
1133 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1134 psdir=$ac_optarg ;;
1135
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1137 | -silent | --silent | --silen | --sile | --sil)
1138 silent=yes ;;
1139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001140 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1141 ac_prev=sbindir ;;
1142 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1143 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001145
1146 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1147 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1148 | --sharedst | --shareds | --shared | --share | --shar \
1149 | --sha | --sh)
1150 ac_prev=sharedstatedir ;;
1151 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1152 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1153 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1154 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 -site | --site | --sit)
1158 ac_prev=site ;;
1159 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001161
Guido van Rossum7f43da71994-08-01 12:15:30 +00001162 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1163 ac_prev=srcdir ;;
1164 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001165 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1168 | --syscon | --sysco | --sysc | --sys | --sy)
1169 ac_prev=sysconfdir ;;
1170 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1171 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001172 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001173
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001177 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001178
1179 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1180 verbose=yes ;;
1181
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 -version | --version | --versio | --versi | --vers | -V)
1183 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
1185 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001186 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001187 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001188 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001189 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001190 ac_useropt_orig=$ac_useropt
1191 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1192 case $ac_user_opts in
1193 *"
1194"with_$ac_useropt"
1195"*) ;;
1196 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1197 ac_unrecognized_sep=', ';;
1198 esac
1199 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001200
1201 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001203 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001205 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt_orig=$ac_useropt
1207 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1208 case $ac_user_opts in
1209 *"
1210"with_$ac_useropt"
1211"*) ;;
1212 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1213 ac_unrecognized_sep=', ';;
1214 esac
1215 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 --x)
1218 # Obsolete; use --with-x.
1219 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1222 | --x-incl | --x-inc | --x-in | --x-i)
1223 ac_prev=x_includes ;;
1224 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1225 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
1228 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1229 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1230 ac_prev=x_libraries ;;
1231 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1232 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001233 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001235 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1236Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237 ;;
1238
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 *=*)
1240 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1241 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001242 case $ac_envvar in #(
1243 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001244 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001245 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 export $ac_envvar ;;
1248
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001249 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001252 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001254 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001255 ;;
1256
1257 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258done
1259
Guido van Rossum7f43da71994-08-01 12:15:30 +00001260if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263fi
1264
Matthias Kloseb9621712010-04-24 17:59:49 +00001265if test -n "$ac_unrecognized_opts"; then
1266 case $enable_option_checking in
1267 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001269 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1270 esac
1271fi
1272
1273# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001274for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1275 datadir sysconfdir sharedstatedir localstatedir includedir \
1276 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1277 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001278do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 # Remove trailing slashes.
1281 case $ac_val in
1282 */ )
1283 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1284 eval $ac_var=\$ac_val;;
1285 esac
1286 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001287 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 [\\/$]* | ?:[\\/]* ) continue;;
1289 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001290 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001291 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001292done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293
Martin v. Löwis11437992002-04-12 09:54:03 +00001294# There might be people who depend on the old broken behavior: `$host'
1295# used to hold the argument of --host etc.
1296# FIXME: To remove some day.
1297build=$build_alias
1298host=$host_alias
1299target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001300
Martin v. Löwis11437992002-04-12 09:54:03 +00001301# FIXME: To remove some day.
1302if test "x$host_alias" != x; then
1303 if test "x$build_alias" = x; then
1304 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001305 elif test "x$build_alias" != "x$host_alias"; then
1306 cross_compiling=yes
1307 fi
1308fi
1309
1310ac_tool_prefix=
1311test -n "$host_alias" && ac_tool_prefix=$host_alias-
1312
1313test "$silent" = yes && exec 6>/dev/null
1314
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001316ac_pwd=`pwd` && test -n "$ac_pwd" &&
1317ac_ls_di=`ls -di .` &&
1318ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001319 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001321 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001322
1323
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324# Find the source files, if location was not specified.
1325if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001328 ac_confdir=`$as_dirname -- "$as_myself" ||
1329$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1330 X"$as_myself" : 'X\(//\)[^/]' \| \
1331 X"$as_myself" : 'X\(//\)$' \| \
1332 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1333$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1335 s//\1/
1336 q
1337 }
1338 /^X\(\/\/\)[^/].*/{
1339 s//\1/
1340 q
1341 }
1342 /^X\(\/\/\)$/{
1343 s//\1/
1344 q
1345 }
1346 /^X\(\/\).*/{
1347 s//\1/
1348 q
1349 }
1350 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001351 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001352 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353 srcdir=..
1354 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001355else
1356 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001358if test ! -r "$srcdir/$ac_unique_file"; then
1359 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001360 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001362ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1363ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001364 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365 pwd)`
1366# When building in place, set srcdir=.
1367if test "$ac_abs_confdir" = "$ac_pwd"; then
1368 srcdir=.
1369fi
1370# Remove unnecessary trailing slashes from srcdir.
1371# Double slashes in file names in object file debugging info
1372# mess up M-x gdb in Emacs.
1373case $srcdir in
1374*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1375esac
1376for ac_var in $ac_precious_vars; do
1377 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1378 eval ac_env_${ac_var}_value=\$${ac_var}
1379 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1380 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1381done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001382
Martin v. Löwis11437992002-04-12 09:54:03 +00001383#
1384# Report the --help message.
1385#
1386if test "$ac_init_help" = "long"; then
1387 # Omit some internal or obsolete options to make the list less imposing.
1388 # This message is too long to be a string in the A/UX 3.1 sh.
1389 cat <<_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001390\`configure' configures python 3.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001391
1392Usage: $0 [OPTION]... [VAR=VALUE]...
1393
1394To assign environment variables (e.g., CC, CFLAGS...), specify them as
1395VAR=VALUE. See below for descriptions of some of the useful variables.
1396
1397Defaults for the options are specified in brackets.
1398
1399Configuration:
1400 -h, --help display this help and exit
1401 --help=short display options specific to this package
1402 --help=recursive display the short help of all the included packages
1403 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001404 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001405 --cache-file=FILE cache test results in FILE [disabled]
1406 -C, --config-cache alias for \`--cache-file=config.cache'
1407 -n, --no-create do not create output files
1408 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1409
Martin v. Löwis11437992002-04-12 09:54:03 +00001410Installation directories:
1411 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001412 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001413 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001414 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001415
1416By default, \`make install' will install all the files in
1417\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1418an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1419for instance \`--prefix=\$HOME'.
1420
1421For better control, use the options below.
1422
1423Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001424 --bindir=DIR user executables [EPREFIX/bin]
1425 --sbindir=DIR system admin executables [EPREFIX/sbin]
1426 --libexecdir=DIR program executables [EPREFIX/libexec]
1427 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1428 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1429 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1430 --libdir=DIR object code libraries [EPREFIX/lib]
1431 --includedir=DIR C header files [PREFIX/include]
1432 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1433 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1434 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1435 --infodir=DIR info documentation [DATAROOTDIR/info]
1436 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1437 --mandir=DIR man documentation [DATAROOTDIR/man]
1438 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1439 --htmldir=DIR html documentation [DOCDIR]
1440 --dvidir=DIR dvi documentation [DOCDIR]
1441 --pdfdir=DIR pdf documentation [DOCDIR]
1442 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001443_ACEOF
1444
1445 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001446
1447System types:
1448 --build=BUILD configure for building on BUILD [guessed]
1449 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001450_ACEOF
1451fi
1452
1453if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001454 case $ac_init_help in
Yury Selivanov7aa53412015-05-30 10:57:56 -04001455 short | recursive ) echo "Configuration of python 3.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001456 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001457 cat <<\_ACEOF
1458
1459Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001460 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1462 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001463 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001464 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001465 --enable-framework[=INSTALLDIR]
1466 Build (MacOSX|Darwin) framework
1467 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001468 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001469 --enable-loadable-sqlite-extensions
1470 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --enable-ipv6 Enable ipv6 (with ipv4) support
1472 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001473 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001474 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001475
1476Optional Packages:
1477 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1478 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001479 --with-universal-archs=ARCH
1480 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001481 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001482 --with-framework-name=FRAMEWORK
1483 specify an alternate name of the framework built
1484 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001486 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001487 --with-cxx-main=<compiler>
1488 compile main() and link python executable with C++
1489 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --with-suffix=.exe set executable suffix
1491 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001492 --with-lto Enable Link Time Optimization in PGO builds.
1493 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001494 --with-hash-algorithm=[fnv|siphash24]
1495 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001496 --with-address-sanitizer
1497 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001498 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001499 --with-system-expat build pyexpat module using an installed expat
1500 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001501 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001502 --with-system-libmpdec build _decimal module using an installed libmpdec
1503 library
Ned Deilyd819b932013-09-06 01:07:05 -07001504 --with-tcltk-includes='-I...'
1505 override search for Tcl and Tk include files
1506 --with-tcltk-libs='-L...'
1507 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001508 --with-dbmliborder=db1:db2:...
1509 order to check db backends for dbm. Valid value is a
1510 colon separated string with the backend names
1511 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001512 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with(out)-threads[=DIRECTORY]
1514 disable/enable thread support
1515 --with(out)-thread[=DIRECTORY]
1516 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001518 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001519 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001520 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with-fpectl enable SIGFPE catching
1522 --with-libm=STRING math library
1523 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001524 --with(out)-computed-gotos
1525 Use computed gotos in evaluation loop (enabled by
1526 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001527 --with(out)-ensurepip=[=upgrade]
1528 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001529
1530Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001531 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 CC C compiler command
1533 CFLAGS C compiler flags
1534 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1535 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001536 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001537 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001540 PKG_CONFIG path to pkg-config utility
1541 PKG_CONFIG_PATH
1542 directories to add to pkg-config's search path
1543 PKG_CONFIG_LIBDIR
1544 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001545
1546Use these variables to override the choices made by `configure' or to help
1547it to find libraries and programs with nonstandard names/locations.
1548
Georg Brandle2e15612009-05-20 18:25:10 +00001549Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001550_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001552fi
1553
1554if test "$ac_init_help" = "recursive"; then
1555 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001557 test -d "$ac_dir" ||
1558 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1559 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ac_builddir=.
1561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562case "$ac_dir" in
1563.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001565 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001566 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001567 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568 case $ac_top_builddir_sub in
1569 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1570 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1571 esac ;;
1572esac
1573ac_abs_top_builddir=$ac_pwd
1574ac_abs_builddir=$ac_pwd$ac_dir_suffix
1575# for backward compatibility:
1576ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001577
1578case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001581 ac_top_srcdir=$ac_top_builddir_sub
1582 ac_abs_top_srcdir=$ac_pwd ;;
1583 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 ac_top_srcdir=$srcdir
1586 ac_abs_top_srcdir=$srcdir ;;
1587 *) # Relative name.
1588 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1589 ac_top_srcdir=$ac_top_build_prefix$srcdir
1590 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001591esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001592ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001594 cd "$ac_dir" || { ac_status=$?; continue; }
1595 # Check for guested configure.
1596 if test -f "$ac_srcdir/configure.gnu"; then
1597 echo &&
1598 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1599 elif test -f "$ac_srcdir/configure"; then
1600 echo &&
1601 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001603 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 fi || ac_status=$?
1605 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 done
1607fi
1608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001610if $ac_init_version; then
1611 cat <<\_ACEOF
Yury Selivanov7aa53412015-05-30 10:57:56 -04001612python configure 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001613generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001614
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001615Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001616This configure script is free software; the Free Software Foundation
1617gives unlimited permission to copy, distribute and modify it.
1618_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001619 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001621
1622## ------------------------ ##
1623## Autoconf initialization. ##
1624## ------------------------ ##
1625
1626# ac_fn_c_try_compile LINENO
1627# --------------------------
1628# Try to compile conftest.$ac_ext, and return whether this succeeded.
1629ac_fn_c_try_compile ()
1630{
1631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1632 rm -f conftest.$ac_objext
1633 if { { ac_try="$ac_compile"
1634case "(($ac_try" in
1635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1636 *) ac_try_echo=$ac_try;;
1637esac
1638eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1639$as_echo "$ac_try_echo"; } >&5
1640 (eval "$ac_compile") 2>conftest.err
1641 ac_status=$?
1642 if test -s conftest.err; then
1643 grep -v '^ *+' conftest.err >conftest.er1
1644 cat conftest.er1 >&5
1645 mv -f conftest.er1 conftest.err
1646 fi
1647 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1648 test $ac_status = 0; } && {
1649 test -z "$ac_c_werror_flag" ||
1650 test ! -s conftest.err
1651 } && test -s conftest.$ac_objext; then :
1652 ac_retval=0
1653else
1654 $as_echo "$as_me: failed program was:" >&5
1655sed 's/^/| /' conftest.$ac_ext >&5
1656
1657 ac_retval=1
1658fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001659 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001660 as_fn_set_status $ac_retval
1661
1662} # ac_fn_c_try_compile
1663
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001664# ac_fn_c_try_cpp LINENO
1665# ----------------------
1666# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1667ac_fn_c_try_cpp ()
1668{
1669 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670 if { { ac_try="$ac_cpp conftest.$ac_ext"
1671case "(($ac_try" in
1672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1673 *) ac_try_echo=$ac_try;;
1674esac
1675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1676$as_echo "$ac_try_echo"; } >&5
1677 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1678 ac_status=$?
1679 if test -s conftest.err; then
1680 grep -v '^ *+' conftest.err >conftest.er1
1681 cat conftest.er1 >&5
1682 mv -f conftest.er1 conftest.err
1683 fi
1684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1685 test $ac_status = 0; } > conftest.i && {
1686 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1687 test ! -s conftest.err
1688 }; then :
1689 ac_retval=0
1690else
1691 $as_echo "$as_me: failed program was:" >&5
1692sed 's/^/| /' conftest.$ac_ext >&5
1693
1694 ac_retval=1
1695fi
1696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1697 as_fn_set_status $ac_retval
1698
1699} # ac_fn_c_try_cpp
1700
Matthias Kloseb9621712010-04-24 17:59:49 +00001701# ac_fn_c_try_link LINENO
1702# -----------------------
1703# Try to link conftest.$ac_ext, and return whether this succeeded.
1704ac_fn_c_try_link ()
1705{
1706 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1707 rm -f conftest.$ac_objext conftest$ac_exeext
1708 if { { ac_try="$ac_link"
1709case "(($ac_try" in
1710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1711 *) ac_try_echo=$ac_try;;
1712esac
1713eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1714$as_echo "$ac_try_echo"; } >&5
1715 (eval "$ac_link") 2>conftest.err
1716 ac_status=$?
1717 if test -s conftest.err; then
1718 grep -v '^ *+' conftest.err >conftest.er1
1719 cat conftest.er1 >&5
1720 mv -f conftest.er1 conftest.err
1721 fi
1722 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1723 test $ac_status = 0; } && {
1724 test -z "$ac_c_werror_flag" ||
1725 test ! -s conftest.err
1726 } && test -s conftest$ac_exeext && {
1727 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001728 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001729 }; then :
1730 ac_retval=0
1731else
1732 $as_echo "$as_me: failed program was:" >&5
1733sed 's/^/| /' conftest.$ac_ext >&5
1734
1735 ac_retval=1
1736fi
1737 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1738 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1739 # interfere with the next link command; also delete a directory that is
1740 # left behind by Apple's compiler. We do this before executing the actions.
1741 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001742 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001743 as_fn_set_status $ac_retval
1744
1745} # ac_fn_c_try_link
1746
Matthias Kloseb9621712010-04-24 17:59:49 +00001747# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1748# -------------------------------------------------------
1749# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1750# the include files in INCLUDES and setting the cache variable VAR
1751# accordingly.
1752ac_fn_c_check_header_mongrel ()
1753{
1754 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001755 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1757$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001758if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001759 $as_echo_n "(cached) " >&6
1760fi
1761eval ac_res=\$$3
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1763$as_echo "$ac_res" >&6; }
1764else
1765 # Is the header compilable?
1766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1767$as_echo_n "checking $2 usability... " >&6; }
1768cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1769/* end confdefs.h. */
1770$4
1771#include <$2>
1772_ACEOF
1773if ac_fn_c_try_compile "$LINENO"; then :
1774 ac_header_compiler=yes
1775else
1776 ac_header_compiler=no
1777fi
1778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1780$as_echo "$ac_header_compiler" >&6; }
1781
1782# Is the header present?
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1784$as_echo_n "checking $2 presence... " >&6; }
1785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786/* end confdefs.h. */
1787#include <$2>
1788_ACEOF
1789if ac_fn_c_try_cpp "$LINENO"; then :
1790 ac_header_preproc=yes
1791else
1792 ac_header_preproc=no
1793fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001794rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1796$as_echo "$ac_header_preproc" >&6; }
1797
1798# So? What about this header?
1799case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1800 yes:no: )
1801 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1802$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1803 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1804$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1805 ;;
1806 no:yes:* )
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1808$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1809 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1810$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1812$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1814$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001817( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001818## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001819## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001820 ) | sed "s/^/$as_me: WARNING: /" >&2
1821 ;;
1822esac
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1824$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001825if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001826 $as_echo_n "(cached) " >&6
1827else
1828 eval "$3=\$ac_header_compiler"
1829fi
1830eval ac_res=\$$3
1831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1832$as_echo "$ac_res" >&6; }
1833fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001834 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001835
1836} # ac_fn_c_check_header_mongrel
1837
1838# ac_fn_c_try_run LINENO
1839# ----------------------
1840# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1841# that executables *can* be run.
1842ac_fn_c_try_run ()
1843{
1844 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1845 if { { ac_try="$ac_link"
1846case "(($ac_try" in
1847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1848 *) ac_try_echo=$ac_try;;
1849esac
1850eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1851$as_echo "$ac_try_echo"; } >&5
1852 (eval "$ac_link") 2>&5
1853 ac_status=$?
1854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1855 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1856 { { case "(($ac_try" in
1857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1858 *) ac_try_echo=$ac_try;;
1859esac
1860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1861$as_echo "$ac_try_echo"; } >&5
1862 (eval "$ac_try") 2>&5
1863 ac_status=$?
1864 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1865 test $ac_status = 0; }; }; then :
1866 ac_retval=0
1867else
1868 $as_echo "$as_me: program exited with status $ac_status" >&5
1869 $as_echo "$as_me: failed program was:" >&5
1870sed 's/^/| /' conftest.$ac_ext >&5
1871
1872 ac_retval=$ac_status
1873fi
1874 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001875 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001876 as_fn_set_status $ac_retval
1877
1878} # ac_fn_c_try_run
1879
1880# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1881# -------------------------------------------------------
1882# Tests whether HEADER exists and can be compiled using the include files in
1883# INCLUDES, setting the cache variable VAR accordingly.
1884ac_fn_c_check_header_compile ()
1885{
1886 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1888$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001889if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001890 $as_echo_n "(cached) " >&6
1891else
1892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1893/* end confdefs.h. */
1894$4
1895#include <$2>
1896_ACEOF
1897if ac_fn_c_try_compile "$LINENO"; then :
1898 eval "$3=yes"
1899else
1900 eval "$3=no"
1901fi
1902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1903fi
1904eval ac_res=\$$3
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1906$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001907 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001908
1909} # ac_fn_c_check_header_compile
1910
Matthias Kloseb9621712010-04-24 17:59:49 +00001911# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1912# -------------------------------------------
1913# Tests whether TYPE exists after having included INCLUDES, setting cache
1914# variable VAR accordingly.
1915ac_fn_c_check_type ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001920if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927int
1928main ()
1929{
1930if (sizeof ($2))
1931 return 0;
1932 ;
1933 return 0;
1934}
1935_ACEOF
1936if ac_fn_c_try_compile "$LINENO"; then :
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$4
1940int
1941main ()
1942{
1943if (sizeof (($2)))
1944 return 0;
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950
1951else
1952 eval "$3=yes"
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1955fi
1956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1957fi
1958eval ac_res=\$$3
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1960$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001961 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001962
1963} # ac_fn_c_check_type
1964
1965# ac_fn_c_find_uintX_t LINENO BITS VAR
1966# ------------------------------------
1967# Finds an unsigned integer type with width BITS, setting cache variable VAR
1968# accordingly.
1969ac_fn_c_find_uintX_t ()
1970{
1971 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1973$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001974if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001975 $as_echo_n "(cached) " >&6
1976else
1977 eval "$3=no"
1978 # Order is important - never check a type that is potentially smaller
1979 # than half of the expected target width.
1980 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1981 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$ac_includes_default
1985int
1986main ()
1987{
1988static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001989test_array [0] = 0;
1990return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001991
1992 ;
1993 return 0;
1994}
1995_ACEOF
1996if ac_fn_c_try_compile "$LINENO"; then :
1997 case $ac_type in #(
1998 uint$2_t) :
1999 eval "$3=yes" ;; #(
2000 *) :
2001 eval "$3=\$ac_type" ;;
2002esac
2003fi
2004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002005 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007else
2008 break
2009fi
2010 done
2011fi
2012eval ac_res=\$$3
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2014$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002015 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017} # ac_fn_c_find_uintX_t
2018
2019# ac_fn_c_find_intX_t LINENO BITS VAR
2020# -----------------------------------
2021# Finds a signed integer type with width BITS, setting cache variable VAR
2022# accordingly.
2023ac_fn_c_find_intX_t ()
2024{
2025 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2027$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002028if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002029 $as_echo_n "(cached) " >&6
2030else
2031 eval "$3=no"
2032 # Order is important - never check a type that is potentially smaller
2033 # than half of the expected target width.
2034 for ac_type in int$2_t 'int' 'long int' \
2035 'long long int' 'short int' 'signed char'; do
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002039 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002040int
2041main ()
2042{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002043static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002044test_array [0] = 0;
2045return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002055 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002056int
2057main ()
2058{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002059static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002060 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002061test_array [0] = 0;
2062return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069
2070else
2071 case $ac_type in #(
2072 int$2_t) :
2073 eval "$3=yes" ;; #(
2074 *) :
2075 eval "$3=\$ac_type" ;;
2076esac
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002081 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002082
2083else
2084 break
2085fi
2086 done
2087fi
2088eval ac_res=\$$3
2089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2090$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002091 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093} # ac_fn_c_find_intX_t
2094
2095# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2096# --------------------------------------------
2097# Tries to find the compile-time value of EXPR in a program that includes
2098# INCLUDES, setting VAR accordingly. Returns whether the value could be
2099# computed
2100ac_fn_c_compute_int ()
2101{
2102 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103 if test "$cross_compiling" = yes; then
2104 # Depending upon the size, compute the lo and hi bounds.
2105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002112test_array [0] = 0;
2113return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002114
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_lo=0 ac_mid=0
2121 while :; do
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002129test_array [0] = 0;
2130return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002131
2132 ;
2133 return 0;
2134}
2135_ACEOF
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 ac_hi=$ac_mid; break
2138else
2139 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2140 if test $ac_lo -le $ac_mid; then
2141 ac_lo= ac_hi=
2142 break
2143 fi
2144 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2145fi
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147 done
2148else
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152int
2153main ()
2154{
2155static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002156test_array [0] = 0;
2157return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_compile "$LINENO"; then :
2164 ac_hi=-1 ac_mid=-1
2165 while :; do
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h. */
2168$4
2169int
2170main ()
2171{
2172static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002173test_array [0] = 0;
2174return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002175
2176 ;
2177 return 0;
2178}
2179_ACEOF
2180if ac_fn_c_try_compile "$LINENO"; then :
2181 ac_lo=$ac_mid; break
2182else
2183 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2184 if test $ac_mid -le $ac_hi; then
2185 ac_lo= ac_hi=
2186 break
2187 fi
2188 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2189fi
2190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2191 done
2192else
2193 ac_lo= ac_hi=
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196fi
2197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198# Binary search between lo and hi bounds.
2199while test "x$ac_lo" != "x$ac_hi"; do
2200 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2202/* end confdefs.h. */
2203$4
2204int
2205main ()
2206{
2207static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002208test_array [0] = 0;
2209return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002210
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_compile "$LINENO"; then :
2216 ac_hi=$ac_mid
2217else
2218 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2219fi
2220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221done
2222case $ac_lo in #((
2223?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2224'') ac_retval=1 ;;
2225esac
2226 else
2227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2228/* end confdefs.h. */
2229$4
2230static long int longval () { return $2; }
2231static unsigned long int ulongval () { return $2; }
2232#include <stdio.h>
2233#include <stdlib.h>
2234int
2235main ()
2236{
2237
2238 FILE *f = fopen ("conftest.val", "w");
2239 if (! f)
2240 return 1;
2241 if (($2) < 0)
2242 {
2243 long int i = longval ();
2244 if (i != ($2))
2245 return 1;
2246 fprintf (f, "%ld", i);
2247 }
2248 else
2249 {
2250 unsigned long int i = ulongval ();
2251 if (i != ($2))
2252 return 1;
2253 fprintf (f, "%lu", i);
2254 }
2255 /* Do not output a trailing newline, as this causes \r\n confusion
2256 on some platforms. */
2257 return ferror (f) || fclose (f) != 0;
2258
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_run "$LINENO"; then :
2264 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2265else
2266 ac_retval=1
2267fi
2268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2269 conftest.$ac_objext conftest.beam conftest.$ac_ext
2270rm -f conftest.val
2271
2272 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002273 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002274 as_fn_set_status $ac_retval
2275
2276} # ac_fn_c_compute_int
2277
2278# ac_fn_c_check_func LINENO FUNC VAR
2279# ----------------------------------
2280# Tests whether FUNC exists, setting the cache variable VAR accordingly
2281ac_fn_c_check_func ()
2282{
2283 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2285$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002286if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002287 $as_echo_n "(cached) " >&6
2288else
2289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290/* end confdefs.h. */
2291/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2293#define $2 innocuous_$2
2294
2295/* System header to define __stub macros and hopefully few prototypes,
2296 which can conflict with char $2 (); below.
2297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2298 <limits.h> exists even on freestanding compilers. */
2299
2300#ifdef __STDC__
2301# include <limits.h>
2302#else
2303# include <assert.h>
2304#endif
2305
2306#undef $2
2307
2308/* Override any GCC internal prototype to avoid an error.
2309 Use char because int might match the return type of a GCC
2310 builtin and then its argument prototype would still apply. */
2311#ifdef __cplusplus
2312extern "C"
2313#endif
2314char $2 ();
2315/* The GNU C library defines this for functions which it implements
2316 to always fail with ENOSYS. Some functions are actually named
2317 something starting with __ and the normal name is an alias. */
2318#if defined __stub_$2 || defined __stub___$2
2319choke me
2320#endif
2321
2322int
2323main ()
2324{
2325return $2 ();
2326 ;
2327 return 0;
2328}
2329_ACEOF
2330if ac_fn_c_try_link "$LINENO"; then :
2331 eval "$3=yes"
2332else
2333 eval "$3=no"
2334fi
2335rm -f core conftest.err conftest.$ac_objext \
2336 conftest$ac_exeext conftest.$ac_ext
2337fi
2338eval ac_res=\$$3
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002342
2343} # ac_fn_c_check_func
2344
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002345# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2346# ---------------------------------------------
2347# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2348# accordingly.
2349ac_fn_c_check_decl ()
2350{
2351 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2352 as_decl_name=`echo $2|sed 's/ *(.*//'`
2353 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2355$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2356if eval \${$3+:} false; then :
2357 $as_echo_n "(cached) " >&6
2358else
2359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h. */
2361$4
2362int
2363main ()
2364{
2365#ifndef $as_decl_name
2366#ifdef __cplusplus
2367 (void) $as_decl_use;
2368#else
2369 (void) $as_decl_name;
2370#endif
2371#endif
2372
2373 ;
2374 return 0;
2375}
2376_ACEOF
2377if ac_fn_c_try_compile "$LINENO"; then :
2378 eval "$3=yes"
2379else
2380 eval "$3=no"
2381fi
2382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2383fi
2384eval ac_res=\$$3
2385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2386$as_echo "$ac_res" >&6; }
2387 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2388
2389} # ac_fn_c_check_decl
2390
Matthias Kloseb9621712010-04-24 17:59:49 +00002391# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2392# ----------------------------------------------------
2393# Tries to find if the field MEMBER exists in type AGGR, after including
2394# INCLUDES, setting cache variable VAR accordingly.
2395ac_fn_c_check_member ()
2396{
2397 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2399$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002400if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002401 $as_echo_n "(cached) " >&6
2402else
2403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2404/* end confdefs.h. */
2405$5
2406int
2407main ()
2408{
2409static $2 ac_aggr;
2410if (ac_aggr.$3)
2411return 0;
2412 ;
2413 return 0;
2414}
2415_ACEOF
2416if ac_fn_c_try_compile "$LINENO"; then :
2417 eval "$4=yes"
2418else
2419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2420/* end confdefs.h. */
2421$5
2422int
2423main ()
2424{
2425static $2 ac_aggr;
2426if (sizeof ac_aggr.$3)
2427return 0;
2428 ;
2429 return 0;
2430}
2431_ACEOF
2432if ac_fn_c_try_compile "$LINENO"; then :
2433 eval "$4=yes"
2434else
2435 eval "$4=no"
2436fi
2437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2438fi
2439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2440fi
2441eval ac_res=\$$4
2442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2443$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002444 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002445
2446} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002448This file contains any messages produced by compilers while
2449running configure, to aid debugging if configure makes a mistake.
2450
Yury Selivanov7aa53412015-05-30 10:57:56 -04002451It was created by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002452generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454 $ $0 $@
2455
2456_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002457exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002458{
2459cat <<_ASUNAME
2460## --------- ##
2461## Platform. ##
2462## --------- ##
2463
2464hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2465uname -m = `(uname -m) 2>/dev/null || echo unknown`
2466uname -r = `(uname -r) 2>/dev/null || echo unknown`
2467uname -s = `(uname -s) 2>/dev/null || echo unknown`
2468uname -v = `(uname -v) 2>/dev/null || echo unknown`
2469
2470/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2471/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2472
2473/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2474/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2475/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002476/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002477/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2478/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2479/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2480
2481_ASUNAME
2482
2483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2484for as_dir in $PATH
2485do
2486 IFS=$as_save_IFS
2487 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002488 $as_echo "PATH: $as_dir"
2489 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002490IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002491
2492} >&5
2493
2494cat >&5 <<_ACEOF
2495
2496
2497## ----------- ##
2498## Core tests. ##
2499## ----------- ##
2500
2501_ACEOF
2502
2503
2504# Keep a trace of the command line.
2505# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002506# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002507# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002508# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002509ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002510ac_configure_args0=
2511ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002512ac_must_keep_next=false
2513for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002514do
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 for ac_arg
2516 do
2517 case $ac_arg in
2518 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2519 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2520 | -silent | --silent | --silen | --sile | --sil)
2521 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002522 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 esac
2525 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002530 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002532 case $ac_arg in
2533 *=* | --config-cache | -C | -disable-* | --disable-* \
2534 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2535 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2536 | -with-* | --with-* | -without-* | --without-* | --x)
2537 case "$ac_configure_args0 " in
2538 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2539 esac
2540 ;;
2541 -* ) ac_must_keep_next=true ;;
2542 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002544 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 ;;
2546 esac
2547 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
Matthias Kloseb9621712010-04-24 17:59:49 +00002549{ ac_configure_args0=; unset ac_configure_args0;}
2550{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
2552# When interrupted or exit'd, cleanup temporary files, and complete
2553# config.log. We remove comments because anyway the quotes in there
2554# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002555# WARNING: Use '\'' to represent an apostrophe within the trap.
2556# 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 +00002557trap 'exit_status=$?
2558 # Save into config.log some information that might help in debugging.
2559 {
2560 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002561
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002562 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002563## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002564## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 echo
2566 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567(
2568 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2569 eval ac_val=\$$ac_var
2570 case $ac_val in #(
2571 *${as_nl}*)
2572 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2574$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 esac
2576 case $ac_var in #(
2577 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002578 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2579 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 esac ;;
2581 esac
2582 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002584 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2585 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 "s/'\''/'\''\\\\'\'''\''/g;
2588 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2589 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002590 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002592 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 esac |
2594 sort
2595)
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002597
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002598 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002599## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002600## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002601 echo
2602 for ac_var in $ac_subst_vars
2603 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604 eval ac_val=\$$ac_var
2605 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002607 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002609 done | sort
2610 echo
2611
2612 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002613 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002615## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002616 echo
2617 for ac_var in $ac_subst_files
2618 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 eval ac_val=\$$ac_var
2620 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002621 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002622 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002623 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002624 done | sort
2625 echo
2626 fi
2627
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002629 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002630## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002631## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002633 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 echo
2635 fi
2636 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002637 $as_echo "$as_me: caught signal $ac_signal"
2638 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002640 rm -f core *.core core.conftest.* &&
2641 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002643' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002644for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002645 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002646done
2647ac_signal=0
2648
2649# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002651
Matthias Kloseb9621712010-04-24 17:59:49 +00002652$as_echo "/* confdefs.h */" > confdefs.h
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654# Predefined preprocessor variables.
2655
2656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_NAME "$PACKAGE_NAME"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2662_ACEOF
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_VERSION "$PACKAGE_VERSION"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_STRING "$PACKAGE_STRING"
2670_ACEOF
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2674_ACEOF
2675
Matthias Kloseb9621712010-04-24 17:59:49 +00002676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_URL "$PACKAGE_URL"
2678_ACEOF
2679
Martin v. Löwis11437992002-04-12 09:54:03 +00002680
2681# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002682# Prefer an explicitly selected file to automatically selected ones.
2683ac_site_file1=NONE
2684ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002685if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002686 # We do not want a PATH search for config.site.
2687 case $CONFIG_SITE in #((
2688 -*) ac_site_file1=./$CONFIG_SITE;;
2689 */*) ac_site_file1=$CONFIG_SITE;;
2690 *) ac_site_file1=./$CONFIG_SITE;;
2691 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002692elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002693 ac_site_file1=$prefix/share/config.site
2694 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695else
Matthias Kloseb9621712010-04-24 17:59:49 +00002696 ac_site_file1=$ac_default_prefix/share/config.site
2697 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002699for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700do
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 test "x$ac_site_file" = xNONE && continue
2702 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2704$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002706 . "$ac_site_file" \
2707 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2709as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002710See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711 fi
2712done
2713
2714if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002715 # Some versions of bash will fail to source /dev/null (special files
2716 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2717 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2719$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 esac
2724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002725else
Matthias Kloseb9621712010-04-24 17:59:49 +00002726 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2727$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 >$cache_file
2729fi
2730
2731# Check that the precious variables saved in the cache have kept the same
2732# value.
2733ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2736 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 case $ac_old_set,$ac_new_set in
2740 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2742$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 +00002743 ac_cache_corrupted=: ;;
2744 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2746$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 ac_cache_corrupted=: ;;
2748 ,);;
2749 *)
2750 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002751 # differences in whitespace do not lead to failure.
2752 ac_old_val_w=`echo x $ac_old_val`
2753 ac_new_val_w=`echo x $ac_new_val`
2754 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2756$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2757 ac_cache_corrupted=:
2758 else
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2760$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2761 eval $ac_var=\$ac_old_val
2762 fi
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2764$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2766$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 fi;;
2768 esac
2769 # Pass precious variables to config.status.
2770 if test "$ac_new_set" = set; then
2771 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002772 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 *) ac_arg=$ac_var=$ac_new_val ;;
2774 esac
2775 case " $ac_configure_args " in
2776 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002777 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 esac
2779 fi
2780done
2781if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2785$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002786 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002788## -------------------- ##
2789## Main body of script. ##
2790## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002791
Guido van Rossum7f43da71994-08-01 12:15:30 +00002792ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2796ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797
Guido van Rossum627b2d71993-12-24 10:39:16 +00002798
Michael W. Hudson54241132001-12-07 15:38:26 +00002799
Trent Nelson4d4ec652012-10-16 08:51:24 -04002800
Trent Nelson5595ab52012-10-17 04:47:31 -04002801if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002802 # If we're building out-of-tree, we need to make sure the following
2803 # resources get picked up before their $srcdir counterparts.
2804 # Objects/ -> typeslots.inc
2805 # Include/ -> Python-ast.h, graminit.h
2806 # Python/ -> importlib.h
2807 # (A side effect of this is that these resources will automatically be
2808 # regenerated when building out-of-tree, regardless of whether or not
2809 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2810 # off.)
2811 BASECPPFLAGS="-IObjects -IInclude -IPython"
2812else
2813 BASECPPFLAGS=""
2814fi
2815
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002816
2817
2818
2819
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002820if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002821then
2822# Extract the first word of "hg", so it can be a program name with args.
2823set dummy hg; ac_word=$2
2824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2825$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002826if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002827 $as_echo_n "(cached) " >&6
2828else
2829 if test -n "$HAS_HG"; then
2830 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2831else
2832as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2833for as_dir in $PATH
2834do
2835 IFS=$as_save_IFS
2836 test -z "$as_dir" && as_dir=.
2837 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002838 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002839 ac_cv_prog_HAS_HG="found"
2840 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2841 break 2
2842 fi
2843done
2844 done
2845IFS=$as_save_IFS
2846
2847 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2848fi
2849fi
2850HAS_HG=$ac_cv_prog_HAS_HG
2851if test -n "$HAS_HG"; then
2852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2853$as_echo "$HAS_HG" >&6; }
2854else
2855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2856$as_echo "no" >&6; }
2857fi
2858
2859
2860else
2861HAS_HG=no-repository
2862fi
2863if test $HAS_HG = found
2864then
2865 HGVERSION="hg id -i \$(srcdir)"
2866 HGTAG="hg id -t \$(srcdir)"
2867 HGBRANCH="hg id -b \$(srcdir)"
2868else
2869 HGVERSION=""
2870 HGTAG=""
2871 HGBRANCH=""
2872fi
2873
2874
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002875ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002876
2877
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002878ac_aux_dir=
2879for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2880 if test -f "$ac_dir/install-sh"; then
2881 ac_aux_dir=$ac_dir
2882 ac_install_sh="$ac_aux_dir/install-sh -c"
2883 break
2884 elif test -f "$ac_dir/install.sh"; then
2885 ac_aux_dir=$ac_dir
2886 ac_install_sh="$ac_aux_dir/install.sh -c"
2887 break
2888 elif test -f "$ac_dir/shtool"; then
2889 ac_aux_dir=$ac_dir
2890 ac_install_sh="$ac_aux_dir/shtool install -c"
2891 break
2892 fi
2893done
2894if test -z "$ac_aux_dir"; then
2895 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2896fi
2897
2898# These three variables are undocumented and unsupported,
2899# and are intended to be withdrawn in a future Autoconf release.
2900# They can cause serious problems if a builder's source tree is in a directory
2901# whose full name contains unusual characters.
2902ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2903ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2904ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2905
2906
2907# Make sure we can run config.sub.
2908$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2909 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2910
2911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2912$as_echo_n "checking build system type... " >&6; }
2913if ${ac_cv_build+:} false; then :
2914 $as_echo_n "(cached) " >&6
2915else
2916 ac_build_alias=$build_alias
2917test "x$ac_build_alias" = x &&
2918 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2919test "x$ac_build_alias" = x &&
2920 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2921ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2922 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2923
2924fi
2925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2926$as_echo "$ac_cv_build" >&6; }
2927case $ac_cv_build in
2928*-*-*) ;;
2929*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2930esac
2931build=$ac_cv_build
2932ac_save_IFS=$IFS; IFS='-'
2933set x $ac_cv_build
2934shift
2935build_cpu=$1
2936build_vendor=$2
2937shift; shift
2938# Remember, the first character of IFS is used to create $*,
2939# except with old shells:
2940build_os=$*
2941IFS=$ac_save_IFS
2942case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2943
2944
2945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2946$as_echo_n "checking host system type... " >&6; }
2947if ${ac_cv_host+:} false; then :
2948 $as_echo_n "(cached) " >&6
2949else
2950 if test "x$host_alias" = x; then
2951 ac_cv_host=$ac_cv_build
2952else
2953 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2954 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2955fi
2956
2957fi
2958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2959$as_echo "$ac_cv_host" >&6; }
2960case $ac_cv_host in
2961*-*-*) ;;
2962*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2963esac
2964host=$ac_cv_host
2965ac_save_IFS=$IFS; IFS='-'
2966set x $ac_cv_host
2967shift
2968host_cpu=$1
2969host_vendor=$2
2970shift; shift
2971# Remember, the first character of IFS is used to create $*,
2972# except with old shells:
2973host_os=$*
2974IFS=$ac_save_IFS
2975case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2976
2977
2978
doko@python.orga10e4a92013-01-25 18:45:12 +01002979
2980
Ned Deilyfcbc2462014-08-22 13:32:49 -07002981# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2982rm -f pybuilddir.txt
2983
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002984if test "$cross_compiling" = yes; then
2985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2986$as_echo_n "checking for python interpreter for cross build... " >&6; }
2987 if test -z "$PYTHON_FOR_BUILD"; then
2988 for interp in python$PACKAGE_VERSION python3 python; do
2989 which $interp >/dev/null 2>&1 || continue
2990 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2991 break
2992 fi
2993 interp=
2994 done
2995 if test x$interp = x; then
2996 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2997 fi
2998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2999$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003000 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 +02003001 fi
Christian Heimes954ac032012-12-12 13:10:21 +01003002elif test "$cross_compiling" = maybe; then
3003 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003004else
3005 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
3006fi
3007
3008
Martin v. Löwis11437992002-04-12 09:54:03 +00003009
Benjamin Petersond23f8222009-04-05 19:13:16 +00003010if test "$prefix" != "/"; then
3011 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3012fi
3013
3014
Martin v. Löwis11437992002-04-12 09:54:03 +00003015
3016
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003017# We don't use PACKAGE_ variables, and they cause conflicts
3018# with other autoconf-based packages that include Python.h
3019grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3020rm confdefs.h
3021mv confdefs.h.new confdefs.h
3022
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003023
Yury Selivanov7aa53412015-05-30 10:57:56 -04003024VERSION=3.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003025
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003026# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003027
3028SOVERSION=1.0
3029
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003030# The later defininition of _XOPEN_SOURCE disables certain features
3031# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3032
Matthias Kloseb9621712010-04-24 17:59:49 +00003033$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003034
3035
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003036# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3037# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3038# them.
3039
Matthias Kloseb9621712010-04-24 17:59:49 +00003040$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003041
3042
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003043# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3044# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3045# them.
3046
Matthias Kloseb9621712010-04-24 17:59:49 +00003047$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003048
3049
Martin v. Löwisd6320502004-08-12 13:45:08 +00003050# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3051# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3052
Matthias Kloseb9621712010-04-24 17:59:49 +00003053$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003054
3055
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003056# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3057# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3058# them.
3059
Matthias Kloseb9621712010-04-24 17:59:49 +00003060$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003061
3062
3063
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003064define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003065
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003066# Arguments passed to configure.
3067
3068CONFIG_ARGS="$ac_configure_args"
3069
Matthias Kloseb9621712010-04-24 17:59:49 +00003070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3071$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003072# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003073if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003074 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003075 case $enableval in
3076 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003077 # Locate the best usable SDK, see Mac/README.txt for more
3078 # information
3079 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003080 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003081 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003082 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3083 if test ! -d "${enableval}"
3084 then
3085 enableval=/
3086 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003087 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003088 ;;
3089 esac
3090 case $enableval in
3091 no)
3092 UNIVERSALSDK=
3093 enable_universalsdk=
3094 ;;
3095 *)
3096 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003097 if test ! -d "${UNIVERSALSDK}"
3098 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003099 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003100 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003101 ;;
3102 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003103
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003104
Thomas Wouters477c8d52006-05-27 19:21:47 +00003105else
3106
3107 UNIVERSALSDK=
3108 enable_universalsdk=
3109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003110fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003111
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003112if test -n "${UNIVERSALSDK}"
3113then
Matthias Kloseb9621712010-04-24 17:59:49 +00003114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3115$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003116else
Matthias Kloseb9621712010-04-24 17:59:49 +00003117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3118$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003119fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003121
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003122
Ned Deily87adb6e2013-10-18 21:09:56 -07003123ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003124
Ned Deilycbfb9a52012-06-23 16:02:19 -07003125# For backward compatibility reasons we prefer to select '32-bit' if available,
3126# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003128if test "`uname -s`" = "Darwin"
3129then
3130 if test -n "${UNIVERSALSDK}"
3131 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003132 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003133 then
3134 UNIVERSAL_ARCHS="intel"
3135 fi
3136 fi
3137fi
3138
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003139
Matthias Kloseb9621712010-04-24 17:59:49 +00003140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3141$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003142
3143# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003144if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003145 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003146 UNIVERSAL_ARCHS="$withval"
3147
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003148fi
3149
Ned Deily87adb6e2013-10-18 21:09:56 -07003150if test -n "${UNIVERSALSDK}"
3151then
3152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3153$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3154else
3155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3156$as_echo "no" >&6; }
3157fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003158
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003159
3160# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003161if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003162 withval=$with_framework_name;
3163 PYTHONFRAMEWORK=${withval}
3164 PYTHONFRAMEWORKDIR=${withval}.framework
3165 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3166
3167else
3168
3169 PYTHONFRAMEWORK=Python
3170 PYTHONFRAMEWORKDIR=Python.framework
3171 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3172
3173fi
3174
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003175# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003176if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003177 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003178 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003179 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003180 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003181 esac
3182 case $enableval in
3183 no)
3184 PYTHONFRAMEWORK=
3185 PYTHONFRAMEWORKDIR=no-framework
3186 PYTHONFRAMEWORKPREFIX=
3187 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003188 FRAMEWORKINSTALLFIRST=
3189 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003190 FRAMEWORKALTINSTALLFIRST=
3191 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003192 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003193 if test "x${prefix}" = "xNONE"; then
3194 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3195 else
3196 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3197 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003199 ;;
3200 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003201 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003202 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003204 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003205 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3206 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003207 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003208 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003209
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003210 if test "x${prefix}" = "xNONE" ; then
3211 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003212
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003213 else
3214 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3215 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003216
3217 case "${enableval}" in
3218 /System*)
3219 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3220 if test "${prefix}" = "NONE" ; then
3221 # See below
3222 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3223 fi
3224 ;;
3225
3226 /Library*)
3227 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3228 ;;
3229
3230 */Library/Frameworks)
3231 MDIR="`dirname "${enableval}"`"
3232 MDIR="`dirname "${MDIR}"`"
3233 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3234
3235 if test "${prefix}" = "NONE"; then
3236 # User hasn't specified the
3237 # --prefix option, but wants to install
3238 # the framework in a non-default location,
3239 # ensure that the compatibility links get
3240 # installed relative to that prefix as well
3241 # instead of in /usr/local.
3242 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3243 fi
3244 ;;
3245
3246 *)
3247 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3248 ;;
3249 esac
3250
Jack Jansen127e56e2001-09-11 14:41:54 +00003251 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003252
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003253 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003255 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003256
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003257 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003258
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003259 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3260
3261 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3262
Jack Jansene578a632001-08-15 01:27:14 +00003263 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003264
Guido van Rossum563e7081996-09-10 18:20:48 +00003265else
Martin v. Löwis11437992002-04-12 09:54:03 +00003266
Jack Jansene578a632001-08-15 01:27:14 +00003267 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003268 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003269 PYTHONFRAMEWORKPREFIX=
3270 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003271 FRAMEWORKINSTALLFIRST=
3272 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003273 FRAMEWORKALTINSTALLFIRST=
3274 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003275 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003276 if test "x${prefix}" = "xNONE" ; then
3277 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3278 else
3279 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3280 fi
Jack Jansene578a632001-08-15 01:27:14 +00003281 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003282
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003283
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003284fi
3285
Thomas Wouters477c8d52006-05-27 19:21:47 +00003286
3287
Michael W. Hudson54241132001-12-07 15:38:26 +00003288
3289
3290
3291
Jack Jansene578a632001-08-15 01:27:14 +00003292
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003293
3294
3295
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003296
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003297
Ned Deilyb8f944f2013-11-21 22:42:25 -08003298
Jack Jansene578a632001-08-15 01:27:14 +00003299##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003300## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003301## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003302##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003303# Set name for machine-dependent library files
3304
Matthias Kloseb9621712010-04-24 17:59:49 +00003305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3306$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003307if test -z "$MACHDEP"
3308then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003309 # avoid using uname for cross builds
3310 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003311 # ac_sys_system and ac_sys_release are used for setting
3312 # a lot of different things including 'define_xopen_source'
3313 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003314 case "$host" in
3315 *-*-linux*)
3316 ac_sys_system=Linux
3317 ;;
3318 *-*-cygwin*)
3319 ac_sys_system=Cygwin
3320 ;;
3321 *)
3322 # for now, limit cross builds to known configurations
3323 MACHDEP="unknown"
3324 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3325 esac
3326 ac_sys_release=
3327 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003328 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003329 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003330 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003331 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003332 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003333 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003334 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003335 fi
3336 ac_md_system=`echo $ac_sys_system |
3337 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3338 ac_md_release=`echo $ac_sys_release |
3339 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3340 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003341
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003342 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003343 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003344 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003345 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003346 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003347 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003348 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003349fi
Guido van Rossum91922671997-10-09 20:24:13 +00003350
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003351
3352if test "$cross_compiling" = yes; then
3353 case "$host" in
3354 *-*-linux*)
3355 case "$host_cpu" in
3356 arm*)
3357 _host_cpu=arm
3358 ;;
3359 *)
3360 _host_cpu=$host_cpu
3361 esac
3362 ;;
3363 *-*-cygwin*)
3364 _host_cpu=
3365 ;;
3366 *)
3367 # for now, limit cross builds to known configurations
3368 MACHDEP="unknown"
3369 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3370 esac
3371 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3372fi
3373
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003374# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3375# disable features if it is defined, without any means to access these
3376# features as extensions. For these systems, we skip the definition of
3377# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3378# some feature, make sure there is no alternative way to access this
3379# feature. Also, when using wildcards, make sure you have verified the
3380# need for not defining _XOPEN_SOURCE on all systems matching the
3381# wildcard, and that the wildcard does not include future systems
3382# (which may remove their limitations).
3383case $ac_sys_system/$ac_sys_release in
3384 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3385 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003386 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003387 # In addition, Stefan Krah confirms that issue #1244610 exists through
3388 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003389 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003390 define_xopen_source=no
3391 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3392 # also defined. This can be overridden by defining _BSD_SOURCE
3393 # As this has a different meaning on Linux, only define it on OpenBSD
3394
Matthias Kloseb9621712010-04-24 17:59:49 +00003395$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003396
3397 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003398 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003399 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3400 # also defined. This can be overridden by defining _BSD_SOURCE
3401 # As this has a different meaning on Linux, only define it on OpenBSD
3402
Matthias Kloseb9621712010-04-24 17:59:49 +00003403$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003404
3405 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003406 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3407 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3408 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003409 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 +00003410 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003411 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3412 # request to enable features supported by the standard as a request
3413 # to disable features not supported by the standard. The best way
3414 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3415 # entirely and define __EXTENSIONS__ instead.
3416 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003417 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003418 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3419 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003420 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003421 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003422 define_xopen_source=no;;
3423 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003424 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003425 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003426 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003427 # On FreeBSD 4, the math functions C89 does not cover are never defined
3428 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3429 FreeBSD/4.*)
3430 define_xopen_source=no;;
3431 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3432 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3433 # identifies itself as Darwin/7.*
3434 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3435 # disables platform specific features beyond repair.
3436 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3437 # has no effect, don't bother defining them
3438 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003439 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003440 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003441 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003442 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3443 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3444 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003445 AIX/4)
3446 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003447 AIX/5)
3448 if test `uname -r` -eq 1; then
3449 define_xopen_source=no
3450 fi
3451 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003452 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3453 # defining NI_NUMERICHOST.
3454 QNX/6.3.2)
3455 define_xopen_source=no
3456 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003457
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003458esac
3459
3460if test $define_xopen_source = yes
3461then
Victor Stinner14d098d2011-09-07 22:29:43 +02003462 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003463
Victor Stinner14d098d2011-09-07 22:29:43 +02003464$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003465
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003466
3467 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3468 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3469 # several APIs are not declared. Since this is also needed in some
3470 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003471
Matthias Kloseb9621712010-04-24 17:59:49 +00003472$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003473
3474
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003475
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003476$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003477
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003478fi
3479
Christian Heimes647cd872013-12-07 23:39:33 +01003480# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3481case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003482 hp*|HP*)
3483 define_stdc_a1=yes;;
3484 *)
3485 define_stdc_a1=no;;
3486esac
3487
3488if test $define_stdc_a1 = yes
3489then
Christian Heimes647cd872013-12-07 23:39:33 +01003490
3491$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3492
Christian Heimesb02bcae2013-12-08 15:21:08 +01003493fi
Christian Heimes647cd872013-12-07 23:39:33 +01003494
Guido van Rossum91922671997-10-09 20:24:13 +00003495#
3496# SGI compilers allow the specification of the both the ABI and the
3497# ISA on the command line. Depending on the values of these switches,
3498# different and often incompatable code will be generated.
3499#
3500# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3501# thus supply support for various ABI/ISA combinations. The MACHDEP
3502# variable is also adjusted.
3503#
3504
3505if test ! -z "$SGI_ABI"
3506then
3507 CC="cc $SGI_ABI"
3508 LDFLAGS="$SGI_ABI $LDFLAGS"
3509 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3510fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3512$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003513
Jack Jansen6b08a402004-06-03 12:41:45 +00003514# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3515# it may influence the way we can build extensions, so distutils
3516# needs to check it
3517
Thomas Wouters477c8d52006-05-27 19:21:47 +00003518
Jack Jansen6b08a402004-06-03 12:41:45 +00003519CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003520EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003521
Guido van Rossum627b2d71993-12-24 10:39:16 +00003522# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003523
3524# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3525# for debug/optimization stuff. BASECFLAGS is for flags that are required
3526# just to get things to compile and link. Users are free to override OPT
3527# when running configure or make. The build should not break if they do.
3528# BASECFLAGS should generally not be messed with, however.
3529
3530# XXX shouldn't some/most/all of this code be merged with the stuff later
3531# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3533$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003535# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003536if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003537 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003538 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003539 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003540 without_gcc=yes;;
3541 yes) CC=gcc
3542 without_gcc=no;;
3543 *) CC=$withval
3544 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003545 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003546else
Martin v. Löwis11437992002-04-12 09:54:03 +00003547
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003548 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003549 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003550 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003551 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003552 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003553fi
3554
Matthias Kloseb9621712010-04-24 17:59:49 +00003555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3556$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003557
Zachary Ware5af85642015-12-21 12:09:17 -06003558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3559$as_echo_n "checking for --with-icc... " >&6; }
3560
3561# Check whether --with-icc was given.
3562if test "${with_icc+set}" = set; then :
3563 withval=$with_icc;
3564 case $withval in
3565 no) CC=${CC:-cc}
3566 with_icc=no;;
3567 yes) CC=icc
3568 CXX=icpc
3569 with_icc=yes;;
3570 *) CC=$withval
3571 with_icc=$withval;;
3572 esac
3573else
3574
3575 with_icc=no
3576fi
3577
3578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3579$as_echo "$with_icc" >&6; }
3580
Guido van Rossum8b131c51995-03-09 14:10:13 +00003581# If the user switches compilers, we can't believe the cache
3582if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3583then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003584 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003585(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003586fi
3587
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003588# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3589# when the compiler supports them, but we don't always want -O2, and
3590# we set -g later.
3591if test -z "$CFLAGS"; then
3592 CFLAGS=
3593fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003594
3595if test "$ac_sys_system" = "Darwin"
3596then
3597 # Compiler selection on MacOSX is more complicated than
3598 # AC_PROG_CC can handle, see Mac/README.txt for more
3599 # information
3600 if test -z "${CC}"
3601 then
3602 found_gcc=
3603 found_clang=
3604 as_save_IFS=$IFS; IFS=:
3605 for as_dir in $PATH
3606 do
3607 IFS=$as_save_IFS
3608 if test -x $as_dir/gcc; then
3609 if test -z "${found_gcc}"; then
3610 found_gcc=$as_dir/gcc
3611 fi
3612 fi
3613 if test -x $as_dir/clang; then
3614 if test -z "${found_clang}"; then
3615 found_clang=$as_dir/clang
3616 fi
3617 fi
3618 done
3619 IFS=$as_save_IFS
3620
3621 if test -n "$found_gcc" -a -n "$found_clang"
3622 then
3623 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3624 then
3625 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3626$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3627 CC="$found_clang"
3628 CXX="$found_clang++"
3629 fi
3630
3631
3632 elif test -z "$found_gcc" -a -n "$found_clang"
3633 then
3634 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3635$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3636 CC="$found_clang"
3637 CXX="$found_clang++"
3638
3639 elif test -z "$found_gcc" -a -z "$found_clang"
3640 then
3641 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3642 if test -n "${found_clang}"
3643 then
3644 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3645$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3646 CC="${found_clang}"
3647 CXX="`/usr/bin/xcrun -find clang++`"
3648
3649 # else: use default behaviour
3650 fi
3651 fi
3652 fi
3653fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003654ac_ext=c
3655ac_cpp='$CPP $CPPFLAGS'
3656ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3657ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3658ac_compiler_gnu=$ac_cv_c_compiler_gnu
3659if test -n "$ac_tool_prefix"; then
3660 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3661set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3663$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003664if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003666else
3667 if test -n "$CC"; then
3668 ac_cv_prog_CC="$CC" # Let the user override the test.
3669else
Martin v. Löwis11437992002-04-12 09:54:03 +00003670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3671for as_dir in $PATH
3672do
3673 IFS=$as_save_IFS
3674 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003675 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003678 $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 +00003679 break 2
3680 fi
3681done
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003683IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003684
Jack Jansendd19cf82001-12-06 22:36:17 +00003685fi
3686fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003687CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003688if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3690$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003691else
Matthias Kloseb9621712010-04-24 17:59:49 +00003692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3693$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003694fi
3695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003696
Martin v. Löwis11437992002-04-12 09:54:03 +00003697fi
3698if test -z "$ac_cv_prog_CC"; then
3699 ac_ct_CC=$CC
3700 # Extract the first word of "gcc", so it can be a program name with args.
3701set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3703$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003704if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003705 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003706else
3707 if test -n "$ac_ct_CC"; then
3708 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3709else
3710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3711for as_dir in $PATH
3712do
3713 IFS=$as_save_IFS
3714 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003715 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 $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 +00003719 break 2
3720 fi
3721done
Matthias Kloseb9621712010-04-24 17:59:49 +00003722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003724
3725fi
3726fi
3727ac_ct_CC=$ac_cv_prog_ac_ct_CC
3728if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3730$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003731else
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3733$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003734fi
3735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003736 if test "x$ac_ct_CC" = x; then
3737 CC=""
3738 else
3739 case $cross_compiling:$ac_tool_warned in
3740yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003741{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3742$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003743ac_tool_warned=yes ;;
3744esac
3745 CC=$ac_ct_CC
3746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003747else
3748 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003749fi
3750
Jack Jansendd19cf82001-12-06 22:36:17 +00003751if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752 if test -n "$ac_tool_prefix"; then
3753 # 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 +00003754set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3756$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003757if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003759else
3760 if test -n "$CC"; then
3761 ac_cv_prog_CC="$CC" # Let the user override the test.
3762else
Martin v. Löwis11437992002-04-12 09:54:03 +00003763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3764for as_dir in $PATH
3765do
3766 IFS=$as_save_IFS
3767 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $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 +00003772 break 2
3773 fi
3774done
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003776IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003777
3778fi
3779fi
3780CC=$ac_cv_prog_CC
3781if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3783$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003784else
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3786$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003787fi
3788
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003791fi
3792if test -z "$CC"; then
3793 # Extract the first word of "cc", so it can be a program name with args.
3794set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003797if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
3800 if test -n "$CC"; then
3801 ac_cv_prog_CC="$CC" # Let the user override the test.
3802else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003803 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3805for as_dir in $PATH
3806do
3807 IFS=$as_save_IFS
3808 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003811 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3812 ac_prog_rejected=yes
3813 continue
3814 fi
3815 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 $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 +00003817 break 2
3818 fi
3819done
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003822
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003823if test $ac_prog_rejected = yes; then
3824 # We found a bogon in the path, so make sure we never use it.
3825 set dummy $ac_cv_prog_CC
3826 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003827 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003828 # We chose a different compiler from the bogus one.
3829 # However, it has the same basename, so the bogon will be chosen
3830 # first if we set CC to just the basename; use the full file name.
3831 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003832 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003833 fi
3834fi
3835fi
3836fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003837CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003838if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3840$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003841else
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3843$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003844fi
3845
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003846
Martin v. Löwis11437992002-04-12 09:54:03 +00003847fi
3848if test -z "$CC"; then
3849 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 do
3852 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3853set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3855$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003856if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003858else
3859 if test -n "$CC"; then
3860 ac_cv_prog_CC="$CC" # Let the user override the test.
3861else
Martin v. Löwis11437992002-04-12 09:54:03 +00003862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3863for as_dir in $PATH
3864do
3865 IFS=$as_save_IFS
3866 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003867 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003869 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003870 $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 +00003871 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003872 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003873done
Matthias Kloseb9621712010-04-24 17:59:49 +00003874 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003875IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003876
3877fi
3878fi
3879CC=$ac_cv_prog_CC
3880if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3882$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003883else
Matthias Kloseb9621712010-04-24 17:59:49 +00003884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3885$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003886fi
3887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003888
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 test -n "$CC" && break
3890 done
3891fi
3892if test -z "$CC"; then
3893 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003895do
3896 # Extract the first word of "$ac_prog", so it can be a program name with args.
3897set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3899$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003900if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003901 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003902else
3903 if test -n "$ac_ct_CC"; then
3904 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3905else
3906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3907for as_dir in $PATH
3908do
3909 IFS=$as_save_IFS
3910 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003911 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003913 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003914 $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 +00003915 break 2
3916 fi
3917done
Matthias Kloseb9621712010-04-24 17:59:49 +00003918 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003919IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003920
Martin v. Löwis11437992002-04-12 09:54:03 +00003921fi
3922fi
3923ac_ct_CC=$ac_cv_prog_ac_ct_CC
3924if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3926$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003927else
Matthias Kloseb9621712010-04-24 17:59:49 +00003928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3929$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003930fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 test -n "$ac_ct_CC" && break
3934done
Michael W. Hudson54241132001-12-07 15:38:26 +00003935
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003936 if test "x$ac_ct_CC" = x; then
3937 CC=""
3938 else
3939 case $cross_compiling:$ac_tool_warned in
3940yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003941{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3942$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003943ac_tool_warned=yes ;;
3944esac
3945 CC=$ac_ct_CC
3946 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003947fi
3948
3949fi
3950
3951
Matthias Kloseb9621712010-04-24 17:59:49 +00003952test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003954as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003955See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003956
3957# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003958$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3959set X $ac_compile
3960ac_compiler=$2
3961for ac_option in --version -v -V -qversion; do
3962 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963case "(($ac_try" in
3964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3965 *) ac_try_echo=$ac_try;;
3966esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003967eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3968$as_echo "$ac_try_echo"; } >&5
3969 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 if test -s conftest.err; then
3972 sed '10a\
3973... rest of stderr output deleted ...
3974 10q' conftest.err >conftest.er1
3975 cat conftest.er1 >&5
3976 fi
3977 rm -f conftest.er1 conftest.err
3978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3979 test $ac_status = 0; }
3980done
Martin v. Löwis11437992002-04-12 09:54:03 +00003981
Matthias Kloseb9621712010-04-24 17:59:49 +00003982cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003983/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003984
Martin v. Löwis11437992002-04-12 09:54:03 +00003985int
3986main ()
3987{
3988
3989 ;
3990 return 0;
3991}
3992_ACEOF
3993ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003994ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003995# Try to create an executable without -o first, disregard a.out.
3996# It will help us diagnose broken compilers, and finding out an intuition
3997# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3999$as_echo_n "checking whether the C compiler works... " >&6; }
4000ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4001
4002# The possible output files:
4003ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004005ac_rmfiles=
4006for ac_file in $ac_files
4007do
4008 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004009 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4011 esac
4012done
4013rm -f $ac_rmfiles
4014
Matthias Kloseb9621712010-04-24 17:59:49 +00004015if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004016case "(($ac_try" in
4017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4018 *) ac_try_echo=$ac_try;;
4019esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004020eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4021$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004023 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004024 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4025 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004026 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4027# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4028# in a Makefile. We should not override ac_cv_exeext if it was cached,
4029# so that the user can short-circuit this test for compilers unknown to
4030# Autoconf.
4031for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004032do
4033 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036 ;;
4037 [ab].out )
4038 # We found the default executable, but exeext='' is most
4039 # certainly right.
4040 break;;
4041 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004042 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004043 then :; else
4044 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4045 fi
4046 # We set ac_cv_exeext here because the later test for it is not
4047 # safe: cross compilers may not add the suffix if given an `-o'
4048 # argument, so we may need to know it at that point already.
4049 # Even if this section looks crufty: it has the advantage of
4050 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004051 break;;
4052 * )
4053 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004054 esac
4055done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004056test "$ac_cv_exeext" = no && ac_cv_exeext=
4057
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004058else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004059 ac_file=''
4060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004061if test -z "$ac_file"; then :
4062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4063$as_echo "no" >&6; }
4064$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004065sed 's/^/| /' conftest.$ac_ext >&5
4066
Matthias Kloseb9621712010-04-24 17:59:49 +00004067{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4068$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004069as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004070See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004071else
4072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4073$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004074fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4076$as_echo_n "checking for C compiler default output file name... " >&6; }
4077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4078$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004079ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004080
Matthias Kloseb9621712010-04-24 17:59:49 +00004081rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004082ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4084$as_echo_n "checking for suffix of executables... " >&6; }
4085if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004086case "(($ac_try" in
4087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4088 *) ac_try_echo=$ac_try;;
4089esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004090eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4091$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004092 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004093 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004094 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4095 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004096 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4097# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4098# work properly (i.e., refer to `conftest.exe'), while it won't with
4099# `rm'.
4100for ac_file in conftest.exe conftest conftest.*; do
4101 test -f "$ac_file" || continue
4102 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004103 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004104 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4105 break;;
4106 * ) break;;
4107 esac
4108done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004109else
Matthias Kloseb9621712010-04-24 17:59:49 +00004110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004112as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004113See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004114fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004115rm -f conftest conftest$ac_cv_exeext
4116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4117$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004118
4119rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004120EXEEXT=$ac_cv_exeext
4121ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4123/* end confdefs.h. */
4124#include <stdio.h>
4125int
4126main ()
4127{
4128FILE *f = fopen ("conftest.out", "w");
4129 return ferror (f) || fclose (f) != 0;
4130
4131 ;
4132 return 0;
4133}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004134_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004135ac_clean_files="$ac_clean_files conftest.out"
4136# Check that the compiler produces executables we can run. If not, either
4137# the compiler is broken, or we cross compile.
4138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4139$as_echo_n "checking whether we are cross compiling... " >&6; }
4140if test "$cross_compiling" != yes; then
4141 { { ac_try="$ac_link"
4142case "(($ac_try" in
4143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4144 *) ac_try_echo=$ac_try;;
4145esac
4146eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4147$as_echo "$ac_try_echo"; } >&5
4148 (eval "$ac_link") 2>&5
4149 ac_status=$?
4150 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4151 test $ac_status = 0; }
4152 if { ac_try='./conftest$ac_cv_exeext'
4153 { { case "(($ac_try" in
4154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4155 *) ac_try_echo=$ac_try;;
4156esac
4157eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4158$as_echo "$ac_try_echo"; } >&5
4159 (eval "$ac_try") 2>&5
4160 ac_status=$?
4161 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4162 test $ac_status = 0; }; }; then
4163 cross_compiling=no
4164 else
4165 if test "$cross_compiling" = maybe; then
4166 cross_compiling=yes
4167 else
4168 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004170as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004171If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004172See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004173 fi
4174 fi
4175fi
4176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4177$as_echo "$cross_compiling" >&6; }
4178
4179rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4180ac_clean_files=$ac_clean_files_save
4181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4182$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004183if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004184 $as_echo_n "(cached) " >&6
4185else
4186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004187/* end confdefs.h. */
4188
4189int
4190main ()
4191{
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
4197rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004198if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004199case "(($ac_try" in
4200 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4201 *) ac_try_echo=$ac_try;;
4202esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004203eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4204$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004205 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004206 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4208 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004209 for ac_file in conftest.o conftest.obj conftest.*; do
4210 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004211 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004212 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004213 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4214 break;;
4215 esac
4216done
4217else
Matthias Kloseb9621712010-04-24 17:59:49 +00004218 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004219sed 's/^/| /' conftest.$ac_ext >&5
4220
Matthias Kloseb9621712010-04-24 17:59:49 +00004221{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4222$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004223as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004224See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004225fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004226rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004227fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4229$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004230OBJEXT=$ac_cv_objext
4231ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4233$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004234if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004235 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004236else
Matthias Kloseb9621712010-04-24 17:59:49 +00004237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004239
Martin v. Löwis11437992002-04-12 09:54:03 +00004240int
4241main ()
4242{
4243#ifndef __GNUC__
4244 choke me
4245#endif
4246
4247 ;
4248 return 0;
4249}
4250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004251if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 ac_compiler_gnu=yes
4253else
Matthias Kloseb9621712010-04-24 17:59:49 +00004254 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004257ac_cv_c_compiler_gnu=$ac_compiler_gnu
4258
4259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4261$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4262if test $ac_compiler_gnu = yes; then
4263 GCC=yes
4264else
4265 GCC=
4266fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004267ac_test_CFLAGS=${CFLAGS+set}
4268ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4270$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004271if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004272 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004273else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004274 ac_save_c_werror_flag=$ac_c_werror_flag
4275 ac_c_werror_flag=yes
4276 ac_cv_prog_cc_g=no
4277 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004280
Martin v. Löwis11437992002-04-12 09:54:03 +00004281int
4282main ()
4283{
4284
4285 ;
4286 return 0;
4287}
4288_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004289if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004290 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291else
Matthias Kloseb9621712010-04-24 17:59:49 +00004292 CFLAGS=""
4293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004294/* end confdefs.h. */
4295
4296int
4297main ()
4298{
4299
4300 ;
4301 return 0;
4302}
4303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004304if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305
Matthias Kloseb9621712010-04-24 17:59:49 +00004306else
4307 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004308 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310/* end confdefs.h. */
4311
4312int
4313main ()
4314{
4315
4316 ;
4317 return 0;
4318}
4319_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004320if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4328 ac_c_werror_flag=$ac_save_c_werror_flag
4329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4331$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004332if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004333 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004334elif test $ac_cv_prog_cc_g = yes; then
4335 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004336 CFLAGS="-g -O2"
4337 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004338 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004339 fi
4340else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004341 if test "$GCC" = yes; then
4342 CFLAGS="-O2"
4343 else
4344 CFLAGS=
4345 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4348$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004349if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004350 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004351else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004353ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004355/* end confdefs.h. */
4356#include <stdarg.h>
4357#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004358struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004359/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4360struct buf { int x; };
4361FILE * (*rcsopen) (struct buf *, struct stat *, int);
4362static char *e (p, i)
4363 char **p;
4364 int i;
4365{
4366 return p[i];
4367}
4368static char *f (char * (*g) (char **, int), char **p, ...)
4369{
4370 char *s;
4371 va_list v;
4372 va_start (v,p);
4373 s = g (p, va_arg (v,int));
4374 va_end (v);
4375 return s;
4376}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004377
4378/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4379 function prototypes and stuff, but not '\xHH' hex character constants.
4380 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004381 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004382 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4383 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004384 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004385int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4386
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4388 inside strings and character constants. */
4389#define FOO(x) 'x'
4390int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4391
Skip Montanaro6dead952003-09-25 14:50:04 +00004392int test (int i, double x);
4393struct s1 {int (*f) (int a);};
4394struct s2 {int (*f) (double a);};
4395int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4396int argc;
4397char **argv;
4398int
4399main ()
4400{
4401return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4402 ;
4403 return 0;
4404}
4405_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004406for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4407 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004408do
4409 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004410 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004411 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004413rm -f core conftest.err conftest.$ac_objext
4414 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004415done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004416rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004417CC=$ac_save_CC
4418
4419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004420# AC_CACHE_VAL
4421case "x$ac_cv_prog_cc_c89" in
4422 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4424$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004425 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4427$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004428 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004429 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4431$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004432esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004433if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004434
Matthias Kloseb9621712010-04-24 17:59:49 +00004435fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004436
Martin v. Löwis11437992002-04-12 09:54:03 +00004437ac_ext=c
4438ac_cpp='$CPP $CPPFLAGS'
4439ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4440ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4441ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004442
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004443ac_ext=c
4444ac_cpp='$CPP $CPPFLAGS'
4445ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4446ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4447ac_compiler_gnu=$ac_cv_c_compiler_gnu
4448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4449$as_echo_n "checking how to run the C preprocessor... " >&6; }
4450# On Suns, sometimes $CPP names a directory.
4451if test -n "$CPP" && test -d "$CPP"; then
4452 CPP=
4453fi
4454if test -z "$CPP"; then
4455 if ${ac_cv_prog_CPP+:} false; then :
4456 $as_echo_n "(cached) " >&6
4457else
4458 # Double quotes because CPP needs to be expanded
4459 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4460 do
4461 ac_preproc_ok=false
4462for ac_c_preproc_warn_flag in '' yes
4463do
4464 # Use a header file that comes with gcc, so configuring glibc
4465 # with a fresh cross-compiler works.
4466 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4467 # <limits.h> exists even on freestanding compilers.
4468 # On the NeXT, cc -E runs the code through the compiler's parser,
4469 # not just through cpp. "Syntax error" is here to catch this case.
4470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h. */
4472#ifdef __STDC__
4473# include <limits.h>
4474#else
4475# include <assert.h>
4476#endif
4477 Syntax error
4478_ACEOF
4479if ac_fn_c_try_cpp "$LINENO"; then :
4480
4481else
4482 # Broken: fails on valid input.
4483continue
4484fi
4485rm -f conftest.err conftest.i conftest.$ac_ext
4486
4487 # OK, works on sane cases. Now check whether nonexistent headers
4488 # can be detected and how.
4489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4490/* end confdefs.h. */
4491#include <ac_nonexistent.h>
4492_ACEOF
4493if ac_fn_c_try_cpp "$LINENO"; then :
4494 # Broken: success on invalid input.
4495continue
4496else
4497 # Passes both tests.
4498ac_preproc_ok=:
4499break
4500fi
4501rm -f conftest.err conftest.i conftest.$ac_ext
4502
4503done
4504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4505rm -f conftest.i conftest.err conftest.$ac_ext
4506if $ac_preproc_ok; then :
4507 break
4508fi
4509
4510 done
4511 ac_cv_prog_CPP=$CPP
4512
4513fi
4514 CPP=$ac_cv_prog_CPP
4515else
4516 ac_cv_prog_CPP=$CPP
4517fi
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4519$as_echo "$CPP" >&6; }
4520ac_preproc_ok=false
4521for ac_c_preproc_warn_flag in '' yes
4522do
4523 # Use a header file that comes with gcc, so configuring glibc
4524 # with a fresh cross-compiler works.
4525 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4526 # <limits.h> exists even on freestanding compilers.
4527 # On the NeXT, cc -E runs the code through the compiler's parser,
4528 # not just through cpp. "Syntax error" is here to catch this case.
4529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4530/* end confdefs.h. */
4531#ifdef __STDC__
4532# include <limits.h>
4533#else
4534# include <assert.h>
4535#endif
4536 Syntax error
4537_ACEOF
4538if ac_fn_c_try_cpp "$LINENO"; then :
4539
4540else
4541 # Broken: fails on valid input.
4542continue
4543fi
4544rm -f conftest.err conftest.i conftest.$ac_ext
4545
4546 # OK, works on sane cases. Now check whether nonexistent headers
4547 # can be detected and how.
4548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4549/* end confdefs.h. */
4550#include <ac_nonexistent.h>
4551_ACEOF
4552if ac_fn_c_try_cpp "$LINENO"; then :
4553 # Broken: success on invalid input.
4554continue
4555else
4556 # Passes both tests.
4557ac_preproc_ok=:
4558break
4559fi
4560rm -f conftest.err conftest.i conftest.$ac_ext
4561
4562done
4563# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4564rm -f conftest.i conftest.err conftest.$ac_ext
4565if $ac_preproc_ok; then :
4566
4567else
4568 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4569$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4570as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4571See \`config.log' for more details" "$LINENO" 5; }
4572fi
4573
4574ac_ext=c
4575ac_cpp='$CPP $CPPFLAGS'
4576ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4577ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4578ac_compiler_gnu=$ac_cv_c_compiler_gnu
4579
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4581$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4582if ${ac_cv_path_GREP+:} false; then :
4583 $as_echo_n "(cached) " >&6
4584else
4585 if test -z "$GREP"; then
4586 ac_path_GREP_found=false
4587 # Loop through the user's path and test for each of PROGNAME-LIST
4588 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4589for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4590do
4591 IFS=$as_save_IFS
4592 test -z "$as_dir" && as_dir=.
4593 for ac_prog in grep ggrep; do
4594 for ac_exec_ext in '' $ac_executable_extensions; do
4595 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4596 as_fn_executable_p "$ac_path_GREP" || continue
4597# Check for GNU ac_path_GREP and select it if it is found.
4598 # Check for GNU $ac_path_GREP
4599case `"$ac_path_GREP" --version 2>&1` in
4600*GNU*)
4601 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4602*)
4603 ac_count=0
4604 $as_echo_n 0123456789 >"conftest.in"
4605 while :
4606 do
4607 cat "conftest.in" "conftest.in" >"conftest.tmp"
4608 mv "conftest.tmp" "conftest.in"
4609 cp "conftest.in" "conftest.nl"
4610 $as_echo 'GREP' >> "conftest.nl"
4611 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4612 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4613 as_fn_arith $ac_count + 1 && ac_count=$as_val
4614 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4615 # Best one so far, save it but keep looking for a better one
4616 ac_cv_path_GREP="$ac_path_GREP"
4617 ac_path_GREP_max=$ac_count
4618 fi
4619 # 10*(2^10) chars as input seems more than enough
4620 test $ac_count -gt 10 && break
4621 done
4622 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4623esac
4624
4625 $ac_path_GREP_found && break 3
4626 done
4627 done
4628 done
4629IFS=$as_save_IFS
4630 if test -z "$ac_cv_path_GREP"; then
4631 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4632 fi
4633else
4634 ac_cv_path_GREP=$GREP
4635fi
4636
4637fi
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4639$as_echo "$ac_cv_path_GREP" >&6; }
4640 GREP="$ac_cv_path_GREP"
4641
4642
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004643
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004644
4645
Matthias Kloseb9621712010-04-24 17:59:49 +00004646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4647$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004648
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004649# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004650if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004651 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004652
4653 case $withval in
4654 no) with_cxx_main=no
4655 MAINCC='$(CC)';;
4656 yes) with_cxx_main=yes
4657 MAINCC='$(CXX)';;
4658 *) with_cxx_main=yes
4659 MAINCC=$withval
4660 if test -z "$CXX"
4661 then
4662 CXX=$withval
4663 fi;;
4664 esac
4665else
4666
4667 with_cxx_main=no
4668 MAINCC='$(CC)'
4669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004670fi
4671
Matthias Kloseb9621712010-04-24 17:59:49 +00004672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4673$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004674
4675preset_cxx="$CXX"
4676if test -z "$CXX"
4677then
4678 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004679 gcc) if test -n "$ac_tool_prefix"; then
4680 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4681set dummy ${ac_tool_prefix}g++; ac_word=$2
4682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4683$as_echo_n "checking for $ac_word... " >&6; }
4684if ${ac_cv_path_CXX+:} false; then :
4685 $as_echo_n "(cached) " >&6
4686else
4687 case $CXX in
4688 [\\/]* | ?:[\\/]*)
4689 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4690 ;;
4691 *)
4692 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4693for as_dir in notfound
4694do
4695 IFS=$as_save_IFS
4696 test -z "$as_dir" && as_dir=.
4697 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004699 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4700 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4701 break 2
4702 fi
4703done
4704 done
4705IFS=$as_save_IFS
4706
4707 ;;
4708esac
4709fi
4710CXX=$ac_cv_path_CXX
4711if test -n "$CXX"; then
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4713$as_echo "$CXX" >&6; }
4714else
4715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4716$as_echo "no" >&6; }
4717fi
4718
4719
4720fi
4721if test -z "$ac_cv_path_CXX"; then
4722 ac_pt_CXX=$CXX
4723 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4726$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004727if ${ac_cv_path_ac_pt_CXX+:} false; then :
4728 $as_echo_n "(cached) " >&6
4729else
4730 case $ac_pt_CXX in
4731 [\\/]* | ?:[\\/]*)
4732 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4733 ;;
4734 *)
4735 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4736for as_dir in notfound
4737do
4738 IFS=$as_save_IFS
4739 test -z "$as_dir" && as_dir=.
4740 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004741 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004742 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4743 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4744 break 2
4745 fi
4746done
4747 done
4748IFS=$as_save_IFS
4749
4750 ;;
4751esac
4752fi
4753ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4754if test -n "$ac_pt_CXX"; then
4755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4756$as_echo "$ac_pt_CXX" >&6; }
4757else
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4759$as_echo "no" >&6; }
4760fi
4761
4762 if test "x$ac_pt_CXX" = x; then
4763 CXX="g++"
4764 else
4765 case $cross_compiling:$ac_tool_warned in
4766yes:)
4767{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4768$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4769ac_tool_warned=yes ;;
4770esac
4771 CXX=$ac_pt_CXX
4772 fi
4773else
4774 CXX="$ac_cv_path_CXX"
4775fi
4776 ;;
4777 cc) if test -n "$ac_tool_prefix"; then
4778 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4779set dummy ${ac_tool_prefix}c++; ac_word=$2
4780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4781$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004782if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004783 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004784else
4785 case $CXX in
4786 [\\/]* | ?:[\\/]*)
4787 ac_cv_path_CXX="$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=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004795 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
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004798 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799 break 2
4800 fi
4801done
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004803IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004804
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805 ;;
4806esac
4807fi
4808CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004809if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4811$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004812else
Matthias Kloseb9621712010-04-24 17:59:49 +00004813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4814$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004816
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004817
4818fi
4819if test -z "$ac_cv_path_CXX"; then
4820 ac_pt_CXX=$CXX
4821 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004822set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4824$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004825if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004826 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004827else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004828 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004829 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004830 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 +00004831 ;;
4832 *)
4833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4834for as_dir in notfound
4835do
4836 IFS=$as_save_IFS
4837 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004838 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004839 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004840 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004841 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004842 break 2
4843 fi
4844done
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004846IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004847
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004848 ;;
4849esac
4850fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004851ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4852if test -n "$ac_pt_CXX"; then
4853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4854$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004855else
Matthias Kloseb9621712010-04-24 17:59:49 +00004856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4857$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004859
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004860 if test "x$ac_pt_CXX" = x; then
4861 CXX="c++"
4862 else
4863 case $cross_compiling:$ac_tool_warned in
4864yes:)
4865{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4866$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4867ac_tool_warned=yes ;;
4868esac
4869 CXX=$ac_pt_CXX
4870 fi
4871else
4872 CXX="$ac_cv_path_CXX"
4873fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004874 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004875 clang|*/clang) if test -n "$ac_tool_prefix"; then
4876 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4877set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4879$as_echo_n "checking for $ac_word... " >&6; }
4880if ${ac_cv_path_CXX+:} false; then :
4881 $as_echo_n "(cached) " >&6
4882else
4883 case $CXX in
4884 [\\/]* | ?:[\\/]*)
4885 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4886 ;;
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=.
4893 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
Ned Deilycbfb9a52012-06-23 16:02:19 -07004895 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4896 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4897 break 2
4898 fi
4899done
4900 done
4901IFS=$as_save_IFS
4902
Ned Deilycbfb9a52012-06-23 16:02:19 -07004903 ;;
4904esac
4905fi
4906CXX=$ac_cv_path_CXX
4907if test -n "$CXX"; then
4908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4909$as_echo "$CXX" >&6; }
4910else
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4912$as_echo "no" >&6; }
4913fi
4914
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004915
4916fi
4917if test -z "$ac_cv_path_CXX"; then
4918 ac_pt_CXX=$CXX
4919 # Extract the first word of "clang++", so it can be a program name with args.
4920set dummy clang++; ac_word=$2
4921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4922$as_echo_n "checking for $ac_word... " >&6; }
4923if ${ac_cv_path_ac_pt_CXX+:} false; then :
4924 $as_echo_n "(cached) " >&6
4925else
4926 case $ac_pt_CXX in
4927 [\\/]* | ?:[\\/]*)
4928 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4929 ;;
4930 *)
4931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4932for as_dir in notfound
4933do
4934 IFS=$as_save_IFS
4935 test -z "$as_dir" && as_dir=.
4936 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004937 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004938 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4939 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4940 break 2
4941 fi
4942done
4943 done
4944IFS=$as_save_IFS
4945
4946 ;;
4947esac
4948fi
4949ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4950if test -n "$ac_pt_CXX"; then
4951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4952$as_echo "$ac_pt_CXX" >&6; }
4953else
4954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4955$as_echo "no" >&6; }
4956fi
4957
4958 if test "x$ac_pt_CXX" = x; then
4959 CXX="clang++"
4960 else
4961 case $cross_compiling:$ac_tool_warned in
4962yes:)
4963{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4964$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4965ac_tool_warned=yes ;;
4966esac
4967 CXX=$ac_pt_CXX
4968 fi
4969else
4970 CXX="$ac_cv_path_CXX"
4971fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004972 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004973 icc|*/icc) if test -n "$ac_tool_prefix"; then
4974 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4975set dummy ${ac_tool_prefix}icpc; 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_CXX+:} false; then :
4979 $as_echo_n "(cached) " >&6
4980else
4981 case $CXX in
4982 [\\/]* | ?:[\\/]*)
4983 ac_cv_path_CXX="$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
4992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4993 ac_cv_path_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
5004CXX=$ac_cv_path_CXX
5005if test -n "$CXX"; then
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5007$as_echo "$CXX" >&6; }
5008else
5009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5010$as_echo "no" >&6; }
5011fi
5012
5013
5014fi
5015if test -z "$ac_cv_path_CXX"; then
5016 ac_pt_CXX=$CXX
5017 # Extract the first word of "icpc", so it can be a program name with args.
5018set dummy icpc; ac_word=$2
5019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5020$as_echo_n "checking for $ac_word... " >&6; }
5021if ${ac_cv_path_ac_pt_CXX+:} false; then :
5022 $as_echo_n "(cached) " >&6
5023else
5024 case $ac_pt_CXX in
5025 [\\/]* | ?:[\\/]*)
5026 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5027 ;;
5028 *)
5029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5030for as_dir in notfound
5031do
5032 IFS=$as_save_IFS
5033 test -z "$as_dir" && as_dir=.
5034 for ac_exec_ext in '' $ac_executable_extensions; do
5035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5036 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5038 break 2
5039 fi
5040done
5041 done
5042IFS=$as_save_IFS
5043
5044 ;;
5045esac
5046fi
5047ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5048if test -n "$ac_pt_CXX"; then
5049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5050$as_echo "$ac_pt_CXX" >&6; }
5051else
5052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5053$as_echo "no" >&6; }
5054fi
5055
5056 if test "x$ac_pt_CXX" = x; then
5057 CXX="icpc"
5058 else
5059 case $cross_compiling:$ac_tool_warned in
5060yes:)
5061{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5062$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5063ac_tool_warned=yes ;;
5064esac
5065 CXX=$ac_pt_CXX
5066 fi
5067else
5068 CXX="$ac_cv_path_CXX"
5069fi
5070 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005071 esac
5072 if test "$CXX" = "notfound"
5073 then
5074 CXX=""
5075 fi
5076fi
5077if test -z "$CXX"
5078then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005079 if test -n "$ac_tool_prefix"; then
5080 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5081 do
5082 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5083set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5085$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005086if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005088else
5089 if test -n "$CXX"; then
5090 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5091else
5092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5093for as_dir in $PATH
5094do
5095 IFS=$as_save_IFS
5096 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005097 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005098 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005099 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005101 break 2
5102 fi
5103done
Matthias Kloseb9621712010-04-24 17:59:49 +00005104 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005105IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005106
5107fi
5108fi
5109CXX=$ac_cv_prog_CXX
5110if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5112$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005113else
Matthias Kloseb9621712010-04-24 17:59:49 +00005114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5115$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116fi
5117
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005118
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005119 test -n "$CXX" && break
5120 done
5121fi
5122if test -z "$CXX"; then
5123 ac_ct_CXX=$CXX
5124 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5125do
5126 # Extract the first word of "$ac_prog", so it can be a program name with args.
5127set dummy $ac_prog; ac_word=$2
5128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5129$as_echo_n "checking for $ac_word... " >&6; }
5130if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5131 $as_echo_n "(cached) " >&6
5132else
5133 if test -n "$ac_ct_CXX"; then
5134 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5135else
5136as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5137for as_dir in $PATH
5138do
5139 IFS=$as_save_IFS
5140 test -z "$as_dir" && as_dir=.
5141 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005142 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005143 ac_cv_prog_ac_ct_CXX="$ac_prog"
5144 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5145 break 2
5146 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005147done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005148 done
5149IFS=$as_save_IFS
5150
5151fi
5152fi
5153ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5154if test -n "$ac_ct_CXX"; then
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5156$as_echo "$ac_ct_CXX" >&6; }
5157else
5158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5159$as_echo "no" >&6; }
5160fi
5161
5162
5163 test -n "$ac_ct_CXX" && break
5164done
5165
5166 if test "x$ac_ct_CXX" = x; then
5167 CXX="notfound"
5168 else
5169 case $cross_compiling:$ac_tool_warned in
5170yes:)
5171{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5172$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5173ac_tool_warned=yes ;;
5174esac
5175 CXX=$ac_ct_CXX
5176 fi
5177fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005178
5179 if test "$CXX" = "notfound"
5180 then
5181 CXX=""
5182 fi
5183fi
5184if test "$preset_cxx" != "$CXX"
5185then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005186 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005187
5188 By default, distutils will build C++ extension modules with \"$CXX\".
5189 If this is not intended, then set CXX on the configure command line.
5190 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005191$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005192
5193 By default, distutils will build C++ extension modules with \"$CXX\".
5194 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005195 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005196fi
5197
5198
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005199MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5200
5201
5202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5203$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5204cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005205#undef bfin
5206#undef cris
5207#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005208#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005209#undef hppa
5210#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005211#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005212#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005213#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005214#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005215#undef unix
5216#if defined(__linux__)
5217# if defined(__x86_64__) && defined(__LP64__)
5218 x86_64-linux-gnu
5219# elif defined(__x86_64__) && defined(__ILP32__)
5220 x86_64-linux-gnux32
5221# elif defined(__i386__)
5222 i386-linux-gnu
5223# elif defined(__aarch64__) && defined(__AARCH64EL__)
5224# if defined(__ILP32__)
5225 aarch64_ilp32-linux-gnu
5226# else
5227 aarch64-linux-gnu
5228# endif
5229# elif defined(__aarch64__) && defined(__AARCH64EB__)
5230# if defined(__ILP32__)
5231 aarch64_be_ilp32-linux-gnu
5232# else
5233 aarch64_be-linux-gnu
5234# endif
5235# elif defined(__alpha__)
5236 alpha-linux-gnu
5237# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5238# if defined(__ARMEL__)
5239 arm-linux-gnueabihf
5240# else
5241 armeb-linux-gnueabihf
5242# endif
5243# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5244# if defined(__ARMEL__)
5245 arm-linux-gnueabi
5246# else
5247 armeb-linux-gnueabi
5248# endif
5249# elif defined(__hppa__)
5250 hppa-linux-gnu
5251# elif defined(__ia64__)
5252 ia64-linux-gnu
5253# elif defined(__m68k__) && !defined(__mcoldfire__)
5254 m68k-linux-gnu
5255# elif defined(__mips_hard_float) && defined(_MIPSEL)
5256# if _MIPS_SIM == _ABIO32
5257 mipsel-linux-gnu
5258# elif _MIPS_SIM == _ABIN32
5259 mips64el-linux-gnuabin32
5260# elif _MIPS_SIM == _ABI64
5261 mips64el-linux-gnuabi64
5262# else
5263# error unknown platform triplet
5264# endif
5265# elif defined(__mips_hard_float)
5266# if _MIPS_SIM == _ABIO32
5267 mips-linux-gnu
5268# elif _MIPS_SIM == _ABIN32
5269 mips64-linux-gnuabin32
5270# elif _MIPS_SIM == _ABI64
5271 mips64-linux-gnuabi64
5272# else
5273# error unknown platform triplet
5274# endif
5275# elif defined(__or1k__)
5276 or1k-linux-gnu
5277# elif defined(__powerpc__) && defined(__SPE__)
5278 powerpc-linux-gnuspe
5279# elif defined(__powerpc64__)
5280# if defined(__LITTLE_ENDIAN__)
5281 powerpc64le-linux-gnu
5282# else
5283 powerpc64-linux-gnu
5284# endif
5285# elif defined(__powerpc__)
5286 powerpc-linux-gnu
5287# elif defined(__s390x__)
5288 s390x-linux-gnu
5289# elif defined(__s390__)
5290 s390-linux-gnu
5291# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5292 sh4-linux-gnu
5293# elif defined(__sparc__) && defined(__arch64__)
5294 sparc64-linux-gnu
5295# elif defined(__sparc__)
5296 sparc-linux-gnu
5297# else
5298# error unknown platform triplet
5299# endif
5300#elif defined(__FreeBSD_kernel__)
5301# if defined(__LP64__)
5302 x86_64-kfreebsd-gnu
5303# elif defined(__i386__)
5304 i386-kfreebsd-gnu
5305# else
5306# error unknown platform triplet
5307# endif
5308#elif defined(__gnu_hurd__)
5309 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005310#elif defined(__APPLE__)
5311 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005312#else
5313# error unknown platform triplet
5314#endif
5315
5316EOF
5317
5318if $CPP conftest.c >conftest.out 2>/dev/null; then
5319 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5321$as_echo "$PLATFORM_TRIPLET" >&6; }
5322else
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5324$as_echo "none" >&6; }
5325fi
5326rm -f conftest.c conftest.out
5327
5328if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5329 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5330 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5331 fi
5332fi
5333PLATDIR=plat-$MACHDEP
5334
5335
5336
5337
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5339$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5340save_LDFLAGS="$LDFLAGS"
5341LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005342
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5344/* end confdefs.h. */
5345
5346int
5347main ()
5348{
5349
5350 ;
5351 return 0;
5352}
5353_ACEOF
5354if ac_fn_c_try_link "$LINENO"; then :
5355 NO_AS_NEEDED="-Wl,--no-as-needed"
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5357$as_echo "yes" >&6; }
5358else
5359 NO_AS_NEEDED=""
5360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5361$as_echo "no" >&6; }
5362fi
5363rm -f core conftest.err conftest.$ac_objext \
5364 conftest$ac_exeext conftest.$ac_ext
5365LDFLAGS="$save_LDFLAGS"
5366
5367
5368
5369# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005370
Matthias Kloseb9621712010-04-24 17:59:49 +00005371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5372$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005373if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005374 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005375else
5376 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5377 then ac_cv_path_EGREP="$GREP -E"
5378 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005379 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005380 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 # Loop through the user's path and test for each of PROGNAME-LIST
5382 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5384do
5385 IFS=$as_save_IFS
5386 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005387 for ac_prog in egrep; do
5388 for ac_exec_ext in '' $ac_executable_extensions; do
5389 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005390 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005391# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005392 # Check for GNU $ac_path_EGREP
5393case `"$ac_path_EGREP" --version 2>&1` in
5394*GNU*)
5395 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5396*)
5397 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399 while :
5400 do
5401 cat "conftest.in" "conftest.in" >"conftest.tmp"
5402 mv "conftest.tmp" "conftest.in"
5403 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005404 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5406 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005407 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005408 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5409 # Best one so far, save it but keep looking for a better one
5410 ac_cv_path_EGREP="$ac_path_EGREP"
5411 ac_path_EGREP_max=$ac_count
5412 fi
5413 # 10*(2^10) chars as input seems more than enough
5414 test $ac_count -gt 10 && break
5415 done
5416 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5417esac
5418
Matthias Kloseb9621712010-04-24 17:59:49 +00005419 $ac_path_EGREP_found && break 3
5420 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005421 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005424 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005425 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 +00005426 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005427else
5428 ac_cv_path_EGREP=$EGREP
5429fi
5430
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005431 fi
5432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5434$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005435 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005436
5437
Matthias Kloseb9621712010-04-24 17:59:49 +00005438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5439$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005440if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005441 $as_echo_n "(cached) " >&6
5442else
5443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005444/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005445#include <stdlib.h>
5446#include <stdarg.h>
5447#include <string.h>
5448#include <float.h>
5449
5450int
5451main ()
5452{
5453
5454 ;
5455 return 0;
5456}
5457_ACEOF
5458if ac_fn_c_try_compile "$LINENO"; then :
5459 ac_cv_header_stdc=yes
5460else
5461 ac_cv_header_stdc=no
5462fi
5463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5464
5465if test $ac_cv_header_stdc = yes; then
5466 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5468/* end confdefs.h. */
5469#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005470
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005471_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005473 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005474
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005475else
Matthias Kloseb9621712010-04-24 17:59:49 +00005476 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005477fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005478rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005479
Matthias Kloseb9621712010-04-24 17:59:49 +00005480fi
5481
5482if test $ac_cv_header_stdc = yes; then
5483 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5485/* end confdefs.h. */
5486#include <stdlib.h>
5487
5488_ACEOF
5489if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5490 $EGREP "free" >/dev/null 2>&1; then :
5491
5492else
5493 ac_cv_header_stdc=no
5494fi
5495rm -f conftest*
5496
5497fi
5498
5499if test $ac_cv_header_stdc = yes; then
5500 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5501 if test "$cross_compiling" = yes; then :
5502 :
5503else
5504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5505/* end confdefs.h. */
5506#include <ctype.h>
5507#include <stdlib.h>
5508#if ((' ' & 0x0FF) == 0x020)
5509# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5510# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5511#else
5512# define ISLOWER(c) \
5513 (('a' <= (c) && (c) <= 'i') \
5514 || ('j' <= (c) && (c) <= 'r') \
5515 || ('s' <= (c) && (c) <= 'z'))
5516# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5517#endif
5518
5519#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5520int
5521main ()
5522{
5523 int i;
5524 for (i = 0; i < 256; i++)
5525 if (XOR (islower (i), ISLOWER (i))
5526 || toupper (i) != TOUPPER (i))
5527 return 2;
5528 return 0;
5529}
5530_ACEOF
5531if ac_fn_c_try_run "$LINENO"; then :
5532
5533else
5534 ac_cv_header_stdc=no
5535fi
5536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5537 conftest.$ac_objext conftest.beam conftest.$ac_ext
5538fi
5539
5540fi
5541fi
5542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5543$as_echo "$ac_cv_header_stdc" >&6; }
5544if test $ac_cv_header_stdc = yes; then
5545
5546$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5547
5548fi
5549
5550# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5551for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5552 inttypes.h stdint.h unistd.h
5553do :
5554 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5555ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5556"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005557if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005558 cat >>confdefs.h <<_ACEOF
5559#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5560_ACEOF
5561
5562fi
5563
5564done
5565
5566
5567
5568 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 +02005569if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005570 MINIX=yes
5571else
5572 MINIX=
5573fi
5574
5575
5576 if test "$MINIX" = yes; then
5577
5578$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5579
5580
5581$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5582
5583
5584$as_echo "#define _MINIX 1" >>confdefs.h
5585
5586 fi
5587
5588
5589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5590$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005591if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005592 $as_echo_n "(cached) " >&6
5593else
5594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5595/* end confdefs.h. */
5596
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005597# define __EXTENSIONS__ 1
5598 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005599int
5600main ()
5601{
5602
5603 ;
5604 return 0;
5605}
5606_ACEOF
5607if ac_fn_c_try_compile "$LINENO"; then :
5608 ac_cv_safe_to_define___extensions__=yes
5609else
5610 ac_cv_safe_to_define___extensions__=no
5611fi
5612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5613fi
5614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5615$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5616 test $ac_cv_safe_to_define___extensions__ = yes &&
5617 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5618
5619 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5620
5621 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5622
5623 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5624
5625 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5626
5627
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629# Check for unsupported systems
5630case $ac_sys_system/$ac_sys_release in
5631atheos*|Linux*/1*)
5632 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5633 echo See README for details.
5634 exit 1;;
5635esac
5636
5637
Matthias Kloseb9621712010-04-24 17:59:49 +00005638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5639$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
5641# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005642if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 withval=$with_suffix;
5644 case $withval in
5645 no) EXEEXT=;;
5646 yes) EXEEXT=.exe;;
5647 *) EXEEXT=$withval;;
5648 esac
5649fi
5650
Matthias Kloseb9621712010-04-24 17:59:49 +00005651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5652$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653
5654# Test whether we're running on a non-case-sensitive system, in which
5655# case we give a warning if no ext is given
5656
Matthias Kloseb9621712010-04-24 17:59:49 +00005657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5658$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659if test ! -d CaseSensitiveTestDir; then
5660mkdir CaseSensitiveTestDir
5661fi
5662
5663if test -d casesensitivetestdir
5664then
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5666$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 BUILDEXEEXT=.exe
5668else
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 BUILDEXEEXT=$EXEEXT
5672fi
5673rmdir CaseSensitiveTestDir
5674
5675case $MACHDEP in
5676bsdos*)
5677 case $CC in
5678 gcc) CC="$CC -D_HAVE_BSDI";;
5679 esac;;
5680esac
5681
5682case $ac_sys_system in
5683hp*|HP*)
5684 case $CC in
5685 cc|*/cc) CC="$CC -Ae";;
5686 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687esac
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
Matthias Kloseb9621712010-04-24 17:59:49 +00005690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5691$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692if test -z "$LIBRARY"
5693then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005694 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5697$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
5699# LDLIBRARY is the name of the library to link against (as opposed to the
5700# name of the library into which to insert object files). BLDLIBRARY is also
5701# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5702# is blank as the main program is not linked directly against LDLIBRARY.
5703# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5704# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5705# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5706# DLLLIBRARY is the shared (i.e., DLL) library.
5707#
5708# RUNSHARED is used to run shared python without installed libraries
5709#
5710# INSTSONAME is the name of the shared library that will be use to install
5711# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005712#
5713# LDVERSION is the shared library version number, normally the Python version
5714# with the ABI build flags appended.
5715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717
5718
5719
5720
5721
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723LDLIBRARY="$LIBRARY"
5724BLDLIBRARY='$(LDLIBRARY)'
5725INSTSONAME='$(LDLIBRARY)'
5726DLLLIBRARY=''
5727LDLIBRARYDIR=''
5728RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005729LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731# LINKCC is the command that links the python executable -- default is $(CC).
5732# If CXX is set, and if it is needed to link a main function that was
5733# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5734# python might then depend on the C++ runtime
5735# This is altered for AIX in order to build the export list before
5736# linking.
5737
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5739$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740if test -z "$LINKCC"
5741then
5742 LINKCC='$(PURIFY) $(MAINCC)'
5743 case $ac_sys_system in
5744 AIX*)
5745 exp_extra="\"\""
5746 if test $ac_sys_release -ge 5 -o \
5747 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5748 exp_extra="."
5749 fi
5750 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 QNX*)
5752 # qcc must be used because the other compilers do not
5753 # support -N.
5754 LINKCC=qcc;;
5755 esac
5756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5758$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5761# make sure we default having it set to "no": this is used by
5762# distutils.unixccompiler to know if it should add --enable-new-dtags
5763# to linker command lines, and failing to detect GNU ld simply results
5764# in the same bahaviour as before.
5765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5767$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768ac_prog=ld
5769if test "$GCC" = yes; then
5770 ac_prog=`$CC -print-prog-name=ld`
5771fi
5772case `"$ac_prog" -V 2>&1 < /dev/null` in
5773 *GNU*)
5774 GNULD=yes;;
5775 *)
5776 GNULD=no;;
5777esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5779$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5782$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005783if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005784 $as_echo_n "(cached) " >&6
5785else
5786 ac_cv_c_inline=no
5787for ac_kw in inline __inline__ __inline; do
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789/* end confdefs.h. */
5790#ifndef __cplusplus
5791typedef int foo_t;
5792static $ac_kw foo_t static_foo () {return 0; }
5793$ac_kw foo_t foo () {return 0; }
5794#endif
5795
5796_ACEOF
5797if ac_fn_c_try_compile "$LINENO"; then :
5798 ac_cv_c_inline=$ac_kw
5799fi
5800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5801 test "$ac_cv_c_inline" != no && break
5802done
5803
5804fi
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5806$as_echo "$ac_cv_c_inline" >&6; }
5807
5808case $ac_cv_c_inline in
5809 inline | yes) ;;
5810 *)
5811 case $ac_cv_c_inline in
5812 no) ac_val=;;
5813 *) ac_val=$ac_cv_c_inline;;
5814 esac
5815 cat >>confdefs.h <<_ACEOF
5816#ifndef __cplusplus
5817#define inline $ac_val
5818#endif
5819_ACEOF
5820 ;;
5821esac
5822
5823if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005824
5825$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005826
5827
5828fi
5829
5830
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5832$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005834if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835 enableval=$enable_shared;
5836fi
5837
5838
5839if test -z "$enable_shared"
5840then
5841 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005842 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843 enable_shared="yes";;
5844 *)
5845 enable_shared="no";;
5846 esac
5847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5849$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5852$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005854if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855 enableval=$enable_profiling;
5856fi
5857
5858if test "x$enable_profiling" = xyes; then
5859 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005860 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862/* end confdefs.h. */
5863int main() { return 0; }
5864_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865if ac_fn_c_try_link "$LINENO"; then :
5866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005870rm -f core conftest.err conftest.$ac_objext \
5871 conftest$ac_exeext conftest.$ac_ext
5872 CC="$ac_save_cc"
5873else
5874 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5877$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879if test "x$enable_profiling" = xyes; then
5880 BASECFLAGS="-pg $BASECFLAGS"
5881 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882fi
5883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5885$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5888# library that we build, but we do not want to link against it (we
5889# will find it with a -framework option). For this reason there is an
5890# extra variable BLDLIBRARY against which Python and the extension
5891# modules are linked, BLDLIBRARY. This is normally the same as
5892# LDLIBRARY, but empty for MacOSX framework builds.
5893if test "$enable_framework"
5894then
5895 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005896 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 BLDLIBRARY=''
5898else
5899 BLDLIBRARY='$(LDLIBRARY)'
5900fi
5901
5902# Other platforms follow
5903if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005904 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905
Matthias Kloseb9621712010-04-24 17:59:49 +00005906$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
5908 case $ac_sys_system in
5909 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).dll.a'
5911 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
5913 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).so'
5915 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005918 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005919 then
5920 PY3LIBRARY=libpython3.so
5921 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005923 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
5925 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005928 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005929 then
5930 PY3LIBRARY=libpython3.so
5931 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
5933 hp*|HP*)
5934 case `uname -m` in
5935 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 ;;
5938 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).dylib'
5947 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005948 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005950 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005951 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005952 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005953 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954
5955 esac
5956else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005957 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 case $ac_sys_system in
5959 CYGWIN*)
5960 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 esac
5964fi
5965
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005966if test "$cross_compiling" = yes; then
5967 RUNSHARED=
5968fi
5969
Matthias Kloseb9621712010-04-24 17:59:49 +00005970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5971$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972
5973if test -n "$ac_tool_prefix"; then
5974 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5975set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005978if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
5981 if test -n "$RANLIB"; then
5982 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5983else
5984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987 IFS=$as_save_IFS
5988 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 break 2
5994 fi
5995done
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997IFS=$as_save_IFS
5998
5999fi
6000fi
6001RANLIB=$ac_cv_prog_RANLIB
6002if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6004$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005else
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008fi
6009
6010
6011fi
6012if test -z "$ac_cv_prog_RANLIB"; then
6013 ac_ct_RANLIB=$RANLIB
6014 # Extract the first word of "ranlib", so it can be a program name with args.
6015set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6017$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006018if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020else
6021 if test -n "$ac_ct_RANLIB"; then
6022 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6023else
6024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6025for as_dir in $PATH
6026do
6027 IFS=$as_save_IFS
6028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033 break 2
6034 fi
6035done
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037IFS=$as_save_IFS
6038
6039fi
6040fi
6041ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6042if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6044$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048fi
6049
6050 if test "x$ac_ct_RANLIB" = x; then
6051 RANLIB=":"
6052 else
6053 case $cross_compiling:$ac_tool_warned in
6054yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006055{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6056$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057ac_tool_warned=yes ;;
6058esac
6059 RANLIB=$ac_ct_RANLIB
6060 fi
6061else
6062 RANLIB="$ac_cv_prog_RANLIB"
6063fi
6064
6065
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006066if test -n "$ac_tool_prefix"; then
6067 for ac_prog in ar aal
6068 do
6069 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6070set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6072$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006073if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075else
6076 if test -n "$AR"; then
6077 ac_cv_prog_AR="$AR" # Let the user override the test.
6078else
6079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082 IFS=$as_save_IFS
6083 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006086 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088 break 2
6089 fi
6090done
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092IFS=$as_save_IFS
6093
6094fi
6095fi
6096AR=$ac_cv_prog_AR
6097if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6099$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006100else
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6102$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103fi
6104
6105
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006106 test -n "$AR" && break
6107 done
6108fi
6109if test -z "$AR"; then
6110 ac_ct_AR=$AR
6111 for ac_prog in ar aal
6112do
6113 # Extract the first word of "$ac_prog", so it can be a program name with args.
6114set dummy $ac_prog; ac_word=$2
6115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6116$as_echo_n "checking for $ac_word... " >&6; }
6117if ${ac_cv_prog_ac_ct_AR+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119else
6120 if test -n "$ac_ct_AR"; then
6121 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6122else
6123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124for as_dir in $PATH
6125do
6126 IFS=$as_save_IFS
6127 test -z "$as_dir" && as_dir=.
6128 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006130 ac_cv_prog_ac_ct_AR="$ac_prog"
6131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6132 break 2
6133 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006135 done
6136IFS=$as_save_IFS
6137
6138fi
6139fi
6140ac_ct_AR=$ac_cv_prog_ac_ct_AR
6141if test -n "$ac_ct_AR"; then
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6143$as_echo "$ac_ct_AR" >&6; }
6144else
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6146$as_echo "no" >&6; }
6147fi
6148
6149
6150 test -n "$ac_ct_AR" && break
6151done
6152
6153 if test "x$ac_ct_AR" = x; then
6154 AR="ar"
6155 else
6156 case $cross_compiling:$ac_tool_warned in
6157yes:)
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6160ac_tool_warned=yes ;;
6161esac
6162 AR=$ac_ct_AR
6163 fi
6164fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165
6166
6167# tweak ARFLAGS only if the user didn't set it on the command line
6168
6169if test -z "$ARFLAGS"
6170then
6171 ARFLAGS="rc"
6172fi
6173
doko@ubuntu.com58844492012-06-30 18:25:32 +02006174if test -n "$ac_tool_prefix"; then
6175 for ac_prog in readelf
6176 do
6177 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6178set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6180$as_echo_n "checking for $ac_word... " >&6; }
6181if ${ac_cv_prog_READELF+:} false; then :
6182 $as_echo_n "(cached) " >&6
6183else
6184 if test -n "$READELF"; then
6185 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6186else
6187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188for as_dir in $PATH
6189do
6190 IFS=$as_save_IFS
6191 test -z "$as_dir" && as_dir=.
6192 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006193 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006194 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6195 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6196 break 2
6197 fi
6198done
6199 done
6200IFS=$as_save_IFS
6201
6202fi
6203fi
6204READELF=$ac_cv_prog_READELF
6205if test -n "$READELF"; then
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6207$as_echo "$READELF" >&6; }
6208else
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6210$as_echo "no" >&6; }
6211fi
6212
6213
6214 test -n "$READELF" && break
6215 done
6216fi
6217if test -z "$READELF"; then
6218 ac_ct_READELF=$READELF
6219 for ac_prog in readelf
6220do
6221 # Extract the first word of "$ac_prog", so it can be a program name with args.
6222set dummy $ac_prog; ac_word=$2
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224$as_echo_n "checking for $ac_word... " >&6; }
6225if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6226 $as_echo_n "(cached) " >&6
6227else
6228 if test -n "$ac_ct_READELF"; then
6229 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6230else
6231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232for as_dir in $PATH
6233do
6234 IFS=$as_save_IFS
6235 test -z "$as_dir" && as_dir=.
6236 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006237 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006238 ac_cv_prog_ac_ct_READELF="$ac_prog"
6239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6240 break 2
6241 fi
6242done
6243 done
6244IFS=$as_save_IFS
6245
6246fi
6247fi
6248ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6249if test -n "$ac_ct_READELF"; then
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6251$as_echo "$ac_ct_READELF" >&6; }
6252else
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254$as_echo "no" >&6; }
6255fi
6256
6257
6258 test -n "$ac_ct_READELF" && break
6259done
6260
6261 if test "x$ac_ct_READELF" = x; then
6262 READELF=":"
6263 else
6264 case $cross_compiling:$ac_tool_warned in
6265yes:)
6266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6268ac_tool_warned=yes ;;
6269esac
6270 READELF=$ac_ct_READELF
6271 fi
6272fi
6273
6274if test "$cross_compiling" = yes; then
6275 case "$READELF" in
6276 readelf|:)
6277 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6278 ;;
6279 esac
6280fi
6281
6282
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283
Matthias Klosec4c48422012-10-21 23:05:35 +02006284for ac_prog in python$PACKAGE_VERSION python3 python
6285do
6286 # Extract the first word of "$ac_prog", so it can be a program name with args.
6287set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6289$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02006290if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006291 $as_echo_n "(cached) " >&6
6292else
Matthias Klosec4c48422012-10-21 23:05:35 +02006293 if test -n "$PYTHON"; then
6294 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006295else
6296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6297for as_dir in $PATH
6298do
6299 IFS=$as_save_IFS
6300 test -z "$as_dir" && as_dir=.
6301 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006302 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006303 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006304 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6305 break 2
6306 fi
6307done
6308 done
6309IFS=$as_save_IFS
6310
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006311fi
6312fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006313PYTHON=$ac_cv_prog_PYTHON
6314if test -n "$PYTHON"; then
6315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6316$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006317else
6318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6319$as_echo "no" >&6; }
6320fi
6321
6322
Matthias Klosec4c48422012-10-21 23:05:35 +02006323 test -n "$PYTHON" && break
6324done
6325test -n "$PYTHON" || PYTHON="not-found"
6326
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006327if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006328 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6329else
6330 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006331fi
6332
6333
Kushal Das02d23a22014-04-15 23:50:06 +05306334for ac_prog in python$PACKAGE_VERSION python3 python
6335do
6336 # Extract the first word of "$ac_prog", so it can be a program name with args.
6337set dummy $ac_prog; ac_word=$2
6338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6339$as_echo_n "checking for $ac_word... " >&6; }
6340if ${ac_cv_prog_PYTHON+:} false; then :
6341 $as_echo_n "(cached) " >&6
6342else
6343 if test -n "$PYTHON"; then
6344 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
6345else
6346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6347for as_dir in $PATH
6348do
6349 IFS=$as_save_IFS
6350 test -z "$as_dir" && as_dir=.
6351 for ac_exec_ext in '' $ac_executable_extensions; do
6352 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6353 ac_cv_prog_PYTHON="$ac_prog"
6354 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6355 break 2
6356 fi
6357done
6358 done
6359IFS=$as_save_IFS
6360
6361fi
6362fi
6363PYTHON=$ac_cv_prog_PYTHON
6364if test -n "$PYTHON"; then
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6366$as_echo "$PYTHON" >&6; }
6367else
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6369$as_echo "no" >&6; }
6370fi
6371
6372
6373 test -n "$PYTHON" && break
6374done
6375test -n "$PYTHON" || PYTHON="not-found"
6376
6377if test "$PYTHON" = not-found; then
6378 OPCODEHGEN="@echo python: $PYTHON! cannot run Tools/scripts/generate_opcode_h.py"
6379else
6380 OPCODEHGEN="$PYTHON"
6381fi
6382
6383
6384
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006385case $MACHDEP in
6386bsdos*|hp*|HP*)
6387 # install -d does not work on BSDI or HP-UX
6388 if test -z "$INSTALL"
6389 then
6390 INSTALL="${srcdir}/install-sh -c"
6391 fi
6392esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006393# Find a good install program. We prefer a C program (faster),
6394# so one script is as good as another. But avoid the broken or
6395# incompatible versions:
6396# SysV /etc/install, /usr/sbin/install
6397# SunOS /usr/etc/install
6398# IRIX /sbin/install
6399# AIX /bin/install
6400# AmigaOS /C/install, which installs bootblocks on floppy discs
6401# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6402# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6403# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6404# OS/2's system install, which has a completely different semantic
6405# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006406# Reject install programs that cannot install multiple files.
6407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6408$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006409if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006410if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006411 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412else
6413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6414for as_dir in $PATH
6415do
6416 IFS=$as_save_IFS
6417 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006418 # Account for people who put trailing slashes in PATH elements.
6419case $as_dir/ in #((
6420 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006422 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423 /usr/ucb/* ) ;;
6424 *)
6425 # OSF1 and SCO ODT 3.0 have their own names for install.
6426 # Don't use installbsd from OSF since it installs stuff as root
6427 # by default.
6428 for ac_prog in ginstall scoinst install; do
6429 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006430 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431 if test $ac_prog = install &&
6432 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6433 # AIX install. It has an incompatible calling convention.
6434 :
6435 elif test $ac_prog = install &&
6436 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6437 # program-specific install script used by HP pwplus--don't use.
6438 :
6439 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006440 rm -rf conftest.one conftest.two conftest.dir
6441 echo one > conftest.one
6442 echo two > conftest.two
6443 mkdir conftest.dir
6444 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6445 test -s conftest.one && test -s conftest.two &&
6446 test -s conftest.dir/conftest.one &&
6447 test -s conftest.dir/conftest.two
6448 then
6449 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6450 break 3
6451 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452 fi
6453 fi
6454 done
6455 done
6456 ;;
6457esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006458
6459 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006460IFS=$as_save_IFS
6461
Matthias Kloseb9621712010-04-24 17:59:49 +00006462rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006463
6464fi
6465 if test "${ac_cv_path_install+set}" = set; then
6466 INSTALL=$ac_cv_path_install
6467 else
6468 # As a last resort, use the slow shell script. Don't cache a
6469 # value for INSTALL within a source directory, because that will
6470 # break other packages using the cache if that directory is
6471 # removed, or if the value is a relative name.
6472 INSTALL=$ac_install_sh
6473 fi
6474fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6476$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006477
6478# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6479# It thinks the first close brace ends the variable substitution.
6480test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6481
6482test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6483
6484test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6485
Matthias Klose93a0ef12012-03-15 18:08:34 +01006486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6487$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6488if test -z "$MKDIR_P"; then
6489 if ${ac_cv_path_mkdir+:} false; then :
6490 $as_echo_n "(cached) " >&6
6491else
6492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6493for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6494do
6495 IFS=$as_save_IFS
6496 test -z "$as_dir" && as_dir=.
6497 for ac_prog in mkdir gmkdir; do
6498 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006499 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006500 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6501 'mkdir (GNU coreutils) '* | \
6502 'mkdir (coreutils) '* | \
6503 'mkdir (fileutils) '4.1*)
6504 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6505 break 3;;
6506 esac
6507 done
6508 done
6509 done
6510IFS=$as_save_IFS
6511
6512fi
6513
6514 test -d ./--version && rmdir ./--version
6515 if test "${ac_cv_path_mkdir+set}" = set; then
6516 MKDIR_P="$ac_cv_path_mkdir -p"
6517 else
6518 # As a last resort, use the slow shell script. Don't cache a
6519 # value for MKDIR_P within a source directory, because that will
6520 # break other packages using the cache if that directory is
6521 # removed, or if the value is a relative name.
6522 MKDIR_P="$ac_install_sh -d"
6523 fi
6524fi
6525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6526$as_echo "$MKDIR_P" >&6; }
6527
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006528
6529# Not every filesystem supports hard links
6530
6531if test -z "$LN" ; then
6532 case $ac_sys_system in
6533 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006534 *) LN=ln;;
6535 esac
6536fi
6537
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006538# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006539
6540ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006542# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6544$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006545
6546# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006547if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006548 withval=$with_pydebug;
6549if test "$withval" != no
6550then
6551
Matthias Kloseb9621712010-04-24 17:59:49 +00006552$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553
Matthias Kloseb9621712010-04-24 17:59:49 +00006554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6555$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006557 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006558else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006560fi
6561else
Matthias Kloseb9621712010-04-24 17:59:49 +00006562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6563$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564fi
6565
6566
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006567# Enable LTO flags
6568
6569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6570$as_echo_n "checking for --with-lto... " >&6; }
6571
6572# Check whether --with-lto was given.
6573if test "${with_lto+set}" = set; then :
6574 withval=$with_lto;
6575if test "$withval" != no
6576then
6577 Py_LTO='true'
6578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6579$as_echo "yes" >&6; };
6580else
6581 Py_LTO='false'
6582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6583$as_echo "no" >&6; };
6584fi
6585else
6586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6587$as_echo "no" >&6; }
6588fi
6589
6590if test "$Py_LTO" = 'true' ; then
6591 case $CC in
6592 *clang*)
6593 # Any changes made here should be reflected in the GCC+Darwin case below
6594 LTOFLAGS="-flto"
6595 ;;
6596 *gcc*)
6597 case $ac_sys_system in
6598 Darwin*)
6599 LTOFLAGS="-flto"
6600 ;;
6601 *)
6602 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6603 ;;
6604 esac
6605 ;;
6606 esac
6607fi
6608
Brett Cannon7188a3e2015-09-18 15:13:44 -07006609# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006610
6611
6612
6613
6614
6615
Brett Cannon7188a3e2015-09-18 15:13:44 -07006616# Extract the first word of "llvm-profdata", so it can be a program name with args.
6617set dummy llvm-profdata; ac_word=$2
6618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6619$as_echo_n "checking for $ac_word... " >&6; }
6620if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6621 $as_echo_n "(cached) " >&6
6622else
6623 if test -n "$LLVM_PROF_FOUND"; then
6624 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6625else
6626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6627for as_dir in $PATH
6628do
6629 IFS=$as_save_IFS
6630 test -z "$as_dir" && as_dir=.
6631 for ac_exec_ext in '' $ac_executable_extensions; do
6632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6633 ac_cv_prog_LLVM_PROF_FOUND="found"
6634 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6635 break 2
6636 fi
6637done
6638 done
6639IFS=$as_save_IFS
6640
6641 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6642fi
6643fi
6644LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6645if test -n "$LLVM_PROF_FOUND"; then
6646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6647$as_echo "$LLVM_PROF_FOUND" >&6; }
6648else
6649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6650$as_echo "no" >&6; }
6651fi
6652
6653
6654LLVM_PROF_ERR=no
6655case $CC in
6656 *clang*)
6657 # Any changes made here should be reflected in the GCC+Darwin case below
6658 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6659 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6660 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6661 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6662 if test $LLVM_PROF_FOUND = not-found
6663 then
6664 LLVM_PROF_ERR=yes
6665 fi
6666 ;;
6667 *gcc*)
6668 case $ac_sys_system in
6669 Darwin*)
6670 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6671 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6672 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6673 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6674 if test $LLVM_PROF_FOUND = not-found
6675 then
6676 LLVM_PROF_ERR=yes
6677 fi
6678 ;;
6679 *)
6680 PGO_PROF_GEN_FLAG="-fprofile-generate"
6681 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6682 LLVM_PROF_MERGER="true"
6683 LLVM_PROF_FILE=""
6684 ;;
6685 esac
6686 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006687 *icc*)
6688 PGO_PROF_GEN_FLAG="-prof-gen"
6689 PGO_PROF_USE_FLAG="-prof-use"
6690 LLVM_PROF_MERGER="true"
6691 LLVM_PROF_FILE=""
6692 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006693esac
6694
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006695# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6696# merged with this chunk of code?
6697
6698# Optimizer/debugger flags
6699# ------------------------
6700# (The following bit of code is complicated enough - please keep things
6701# indented properly. Just pretend you're editing Python code. ;-)
6702
6703# There are two parallel sets of case statements below, one that checks to
6704# see if OPT was set and one that does BASECFLAGS setting based upon
6705# compiler and platform. BASECFLAGS tweaks need to be made even if the
6706# user set OPT.
6707
6708# tweak OPT based on compiler and platform, only if the user didn't set
6709# it on the command line
6710
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006711if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006712then
6713 case $GCC in
6714 yes)
6715 if test "$CC" != 'g++' ; then
6716 STRICT_PROTO="-Wstrict-prototypes"
6717 fi
6718 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6719 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6720 WRAP="-fwrapv"
6721 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006722
6723 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006724 case $CC in
6725 *clang*) WRAP="-fwrapv"
6726 ;;
6727 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006729 case $ac_cv_prog_cc_g in
6730 yes)
6731 if test "$Py_DEBUG" = 'true' ; then
6732 # Optimization messes up debuggers, so turn it off for
6733 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006734 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6735 OPT="-g -Og -Wall $STRICT_PROTO"
6736 else
6737 OPT="-g -O0 -Wall $STRICT_PROTO"
6738 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739 else
6740 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6741 fi
6742 ;;
6743 *)
6744 OPT="-O3 -Wall $STRICT_PROTO"
6745 ;;
6746 esac
6747 case $ac_sys_system in
6748 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6749 ;;
6750 esac
6751 ;;
6752
6753 *)
6754 OPT="-O"
6755 ;;
6756 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757fi
6758
6759
6760
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006761
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006762# The -arch flags for universal builds on OSX
6763UNIVERSAL_ARCH_FLAGS=
6764
6765
6766# tweak BASECFLAGS based on compiler and platform
6767case $GCC in
6768yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006769 # Python doesn't violate C99 aliasing rules, but older versions of
6770 # GCC produce warnings for legal Python code. Enable
6771 # -fno-strict-aliasing on versions of GCC that support but produce
6772 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6774$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006775 ac_save_cc="$CC"
6776 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006777 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006778 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006780else
Matthias Kloseb9621712010-04-24 17:59:49 +00006781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006782/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006783
Matthias Kloseb159a552010-04-25 21:00:44 +00006784
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006785int
6786main ()
6787{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006788
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006789 ;
6790 return 0;
6791}
Matthias Kloseb159a552010-04-25 21:00:44 +00006792
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006794if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006795
6796 CC="$ac_save_cc -fstrict-aliasing"
6797 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006799/* end confdefs.h. */
6800
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006801 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006802int
6803main ()
6804{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006805double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006806 ;
6807 return 0;
6808}
Matthias Kloseb159a552010-04-25 21:00:44 +00006809
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006810_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006811if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006812
6813 ac_cv_no_strict_aliasing=no
6814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006815else
Matthias Kloseb159a552010-04-25 21:00:44 +00006816
6817 ac_cv_no_strict_aliasing=yes
6818
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006819fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006821
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006822else
Matthias Kloseb159a552010-04-25 21:00:44 +00006823
6824 ac_cv_no_strict_aliasing=no
6825
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006828fi
6829
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006830 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006831 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6833$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006834 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835 then
6836 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6837 fi
6838
Zachary Ware5af85642015-12-21 12:09:17 -06006839 # ICC doesn't recognize the option, but only emits a warning
6840 ## XXX does it emit an unused result warning and can it be disabled?
6841 case "$CC" in
6842 *icc*)
6843 ac_cv_disable_unused_result_warning=no
6844 ;;
6845 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6847$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6848 ac_save_cc="$CC"
6849 CC="$CC -Wunused-result -Werror"
6850 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006851 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006852 $as_echo_n "(cached) " >&6
6853else
6854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6855/* end confdefs.h. */
6856
6857
6858int
6859main ()
6860{
6861
6862 ;
6863 return 0;
6864}
6865
6866_ACEOF
6867if ac_fn_c_try_compile "$LINENO"; then :
6868
6869 ac_cv_disable_unused_result_warning=yes
6870
6871else
6872
6873 ac_cv_disable_unused_result_warning=no
6874
6875fi
6876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6877fi
6878
6879 CFLAGS="$save_CFLAGS"
6880 CC="$ac_save_cc"
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6882$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006883 ;;
6884 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006885
6886 if test $ac_cv_disable_unused_result_warning = yes
6887 then
6888 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6889 fi
6890
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6892$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6893 ac_save_cc="$CC"
6894 CC="$CC -Werror=declaration-after-statement"
6895 save_CFLAGS="$CFLAGS"
6896 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6897 $as_echo_n "(cached) " >&6
6898else
6899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6900/* end confdefs.h. */
6901
6902
6903int
6904main ()
6905{
6906
6907 ;
6908 return 0;
6909}
6910
6911_ACEOF
6912if ac_fn_c_try_compile "$LINENO"; then :
6913
6914 ac_cv_declaration_after_statement_warning=yes
6915
6916else
6917
6918 ac_cv_declaration_after_statement_warning=no
6919
6920fi
6921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6922fi
6923
6924 CFLAGS="$save_CFLAGS"
6925 CC="$ac_save_cc"
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6927$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6928
6929 if test $ac_cv_declaration_after_statement_warning = yes
6930 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006931 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006932 fi
6933
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6935$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6936 ac_save_cc="$CC"
6937 CC="$CC -Wsign-compare"
6938 save_CFLAGS="$CFLAGS"
6939 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6940 $as_echo_n "(cached) " >&6
6941else
6942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6943/* end confdefs.h. */
6944
6945
6946int
6947main ()
6948{
6949
6950 ;
6951 return 0;
6952}
6953
6954_ACEOF
6955if ac_fn_c_try_compile "$LINENO"; then :
6956
6957 ac_cv_enable_sign_compare_warning=yes
6958
6959else
6960
6961 ac_cv_enable_sign_compare_warning=no
6962
6963fi
6964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6965fi
6966
6967 CFLAGS="$save_CFLAGS"
6968 CC="$ac_save_cc"
6969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6970$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6971
6972 if test $ac_cv_enable_sign_compare_warning = yes
6973 then
6974 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6975 fi
6976
6977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6978$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6979 ac_save_cc="$CC"
6980 CC="$CC -Wunreachable-code"
6981 save_CFLAGS="$CFLAGS"
6982 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6983 $as_echo_n "(cached) " >&6
6984else
6985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6986/* end confdefs.h. */
6987
6988
6989int
6990main ()
6991{
6992
6993 ;
6994 return 0;
6995}
6996
6997_ACEOF
6998if ac_fn_c_try_compile "$LINENO"; then :
6999
7000 ac_cv_enable_unreachable_code_warning=yes
7001
7002else
7003
7004 ac_cv_enable_unreachable_code_warning=no
7005
7006fi
7007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7008fi
7009
7010 CFLAGS="$save_CFLAGS"
7011 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007012
7013 # Don't enable unreachable code warning in debug mode, since it usually
7014 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007015 # Issue #24324: Unfortunately, the unreachable code warning does not work
7016 # correctly on gcc and has been silently removed from the compiler.
7017 # It is supported on clang but on OS X systems gcc may be an alias
7018 # for clang. Try to determine if the compiler is not really gcc and,
7019 # if so, only then enable the warning.
7020 if test $ac_cv_enable_unreachable_code_warning = yes && \
7021 test "$Py_DEBUG" != "true" && \
7022 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007023 then
7024 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007025 else
7026 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007027 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7029$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007030
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007031 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7032 # support. Without this, treatment of subnormals doesn't follow
7033 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007034 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007035 alpha*)
7036 BASECFLAGS="$BASECFLAGS -mieee"
7037 ;;
7038 esac
7039
7040 case $ac_sys_system in
7041 SCO_SV*)
7042 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7043 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007044
7045 # is there any other compiler on Darwin besides gcc?
7046 Darwin*)
7047 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7048 # used to be here, but non-Apple gcc doesn't accept them.
7049 if test "${CC}" = gcc
7050 then
7051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007052$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007053 case "${UNIVERSALSDK}" in
7054 */MacOSX10.4u.sdk)
7055 # Build using 10.4 SDK, force usage of gcc when the
7056 # compiler is gcc, otherwise the user will get very
7057 # confusing error messages when building on OSX 10.6
7058 CC=gcc-4.0
7059 CPP=cpp-4.0
7060 ;;
7061 esac
7062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007063$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007064 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007065
Ned Deily87adb6e2013-10-18 21:09:56 -07007066 if test "${enable_universalsdk}"
7067 then
7068 case "$UNIVERSAL_ARCHS" in
7069 32-bit)
7070 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7071 LIPO_32BIT_FLAGS=""
7072 ARCH_RUN_32BIT=""
7073 ;;
7074 64-bit)
7075 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7076 LIPO_32BIT_FLAGS=""
7077 ARCH_RUN_32BIT="true"
7078 ;;
7079 all)
7080 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7081 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7082 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7083 ;;
7084 intel)
7085 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7086 LIPO_32BIT_FLAGS="-extract i386"
7087 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7088 ;;
7089 intel-32)
7090 UNIVERSAL_ARCH_FLAGS="-arch i386"
7091 LIPO_32BIT_FLAGS=""
7092 ARCH_RUN_32BIT=""
7093 ;;
7094 3-way)
7095 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7096 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7097 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7098 ;;
7099 *)
7100 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7101 ;;
7102 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007103
Ned Deily87adb6e2013-10-18 21:09:56 -07007104 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7105 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7106 if test "${UNIVERSALSDK}" != "/"
7107 then
7108 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7109 fi
7110 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007111
Ned Deily87adb6e2013-10-18 21:09:56 -07007112 # Calculate an appropriate deployment target for this build:
7113 # The deployment target value is used explicitly to enable certain
7114 # features are enabled (such as builtin libedit support for readline)
7115 # through the use of Apple's Availabiliy Macros and is used as a
7116 # component of the string returned by distutils.get_platform().
7117 #
7118 # Use the value from:
7119 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7120 # 2. the operating system version of the build machine if >= 10.6
7121 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7122 # below to pick either 10.3, 10.4, or 10.5 as the target.
7123 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007124
Ned Deily87adb6e2013-10-18 21:09:56 -07007125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7126$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007127 cur_target_major=`sw_vers -productVersion | \
7128 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7129 cur_target_minor=`sw_vers -productVersion | \
7130 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7131 cur_target="${cur_target_major}.${cur_target_minor}"
7132 if test ${cur_target_major} -eq 10 && \
7133 test ${cur_target_minor} -ge 3 && \
7134 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007135 then
Ned Deily36820b62014-06-25 13:44:22 -07007136 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007137 cur_target=10.3
7138 if test ${enable_universalsdk}
7139 then
7140 case "$UNIVERSAL_ARCHS" in
7141 all|3-way|intel|64-bit)
7142 # These configurations were first supported in 10.5
7143 cur_target='10.5'
7144 ;;
7145 esac
7146 else
7147 if test `/usr/bin/arch` = "i386"
7148 then
7149 # 10.4 was the first release to support Intel archs
7150 cur_target="10.4"
7151 fi
7152 fi
7153 fi
7154 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007155
Ned Deily87adb6e2013-10-18 21:09:56 -07007156 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7157 # environment with a value that is the same as what we'll use
7158 # in the Makefile to ensure that we'll get the same compiler
7159 # environment during configure and build time.
7160 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7161 export MACOSX_DEPLOYMENT_TARGET
7162 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7164$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007165
Ned Deily87adb6e2013-10-18 21:09:56 -07007166 # end of Darwin* tests
7167 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007168 esac
7169 ;;
7170
7171*)
7172 case $ac_sys_system in
7173 OpenUNIX*|UnixWare*)
7174 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7175 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007176 SCO_SV*)
7177 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7178 ;;
7179 esac
7180 ;;
7181esac
7182
Zachary Ware5af85642015-12-21 12:09:17 -06007183# ICC needs -fp-model strict or floats behave badly
7184case "$CC" in
7185*icc*)
7186 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7187 ;;
7188esac
7189
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007190if test "$Py_DEBUG" = 'true'; then
7191 :
7192else
7193 OPT="-DNDEBUG $OPT"
7194fi
7195
7196if test "$ac_arch_flags"
7197then
7198 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7199fi
7200
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007201# On some compilers, pthreads are available without further options
7202# (e.g. MacOS X). On some of these systems, the compiler will not
7203# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7204# So we have to see first whether pthreads are available without
7205# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7207$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007208if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007209 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007210else
Matthias Kloseb9621712010-04-24 17:59:49 +00007211 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007212 ac_cv_pthread_is_default=no
7213else
Matthias Kloseb9621712010-04-24 17:59:49 +00007214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215/* end confdefs.h. */
7216
Stefan Krah7dba5942012-11-22 22:49:11 +01007217#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007218#include <pthread.h>
7219
7220void* routine(void* p){return NULL;}
7221
7222int main(){
7223 pthread_t p;
7224 if(pthread_create(&p,NULL,routine,NULL)!=0)
7225 return 1;
7226 (void)pthread_detach(p);
7227 return 0;
7228}
7229
7230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007231if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007232
7233 ac_cv_pthread_is_default=yes
7234 ac_cv_kthread=no
7235 ac_cv_pthread=no
7236
7237else
Matthias Kloseb9621712010-04-24 17:59:49 +00007238 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007239fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007240rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7241 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007242fi
7243
7244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007245fi
7246
Matthias Kloseb9621712010-04-24 17:59:49 +00007247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7248$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007249
7250
7251if test $ac_cv_pthread_is_default = yes
7252then
7253 ac_cv_kpthread=no
7254else
7255# -Kpthread, if available, provides the right #defines
7256# and linker options to make pthread_create available
7257# Some compilers won't report that they do not support -Kpthread,
7258# so we need to run a program to see whether it really made the
7259# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7261$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007262if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007263 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007264else
7265 ac_save_cc="$CC"
7266CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007267if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007268 ac_cv_kpthread=no
7269else
Matthias Kloseb9621712010-04-24 17:59:49 +00007270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007271/* end confdefs.h. */
7272
Stefan Krah7dba5942012-11-22 22:49:11 +01007273#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007274#include <pthread.h>
7275
7276void* routine(void* p){return NULL;}
7277
7278int main(){
7279 pthread_t p;
7280 if(pthread_create(&p,NULL,routine,NULL)!=0)
7281 return 1;
7282 (void)pthread_detach(p);
7283 return 0;
7284}
7285
7286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007287if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007288 ac_cv_kpthread=yes
7289else
Matthias Kloseb9621712010-04-24 17:59:49 +00007290 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7293 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007294fi
7295
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296CC="$ac_save_cc"
7297fi
7298
Matthias Kloseb9621712010-04-24 17:59:49 +00007299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7300$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007301fi
7302
7303if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7304then
7305# -Kthread, if available, provides the right #defines
7306# and linker options to make pthread_create available
7307# Some compilers won't report that they do not support -Kthread,
7308# so we need to run a program to see whether it really made the
7309# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7311$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007312if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007313 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007314else
7315 ac_save_cc="$CC"
7316CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007317if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007318 ac_cv_kthread=no
7319else
Matthias Kloseb9621712010-04-24 17:59:49 +00007320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007321/* end confdefs.h. */
7322
Stefan Krah7dba5942012-11-22 22:49:11 +01007323#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007324#include <pthread.h>
7325
7326void* routine(void* p){return NULL;}
7327
7328int main(){
7329 pthread_t p;
7330 if(pthread_create(&p,NULL,routine,NULL)!=0)
7331 return 1;
7332 (void)pthread_detach(p);
7333 return 0;
7334}
7335
7336_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007337if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007338 ac_cv_kthread=yes
7339else
Matthias Kloseb9621712010-04-24 17:59:49 +00007340 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007341fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7343 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344fi
7345
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007346CC="$ac_save_cc"
7347fi
7348
Matthias Kloseb9621712010-04-24 17:59:49 +00007349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7350$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007351fi
7352
7353if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7354then
7355# -pthread, if available, provides the right #defines
7356# and linker options to make pthread_create available
7357# Some compilers won't report that they do not support -pthread,
7358# so we need to run a program to see whether it really made the
7359# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7361$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007362if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007363 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007364else
7365 ac_save_cc="$CC"
7366CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007367if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007368 ac_cv_pthread=no
7369else
Matthias Kloseb9621712010-04-24 17:59:49 +00007370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007371/* end confdefs.h. */
7372
Stefan Krah7dba5942012-11-22 22:49:11 +01007373#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007374#include <pthread.h>
7375
7376void* routine(void* p){return NULL;}
7377
7378int main(){
7379 pthread_t p;
7380 if(pthread_create(&p,NULL,routine,NULL)!=0)
7381 return 1;
7382 (void)pthread_detach(p);
7383 return 0;
7384}
7385
7386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007387if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007388 ac_cv_pthread=yes
7389else
Matthias Kloseb9621712010-04-24 17:59:49 +00007390 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7393 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394fi
7395
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396CC="$ac_save_cc"
7397fi
7398
Matthias Kloseb9621712010-04-24 17:59:49 +00007399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7400$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007401fi
7402
7403# If we have set a CC compiler flag for thread support then
7404# check if it works for CXX, too.
7405ac_cv_cxx_thread=no
7406if test ! -z "$CXX"
7407then
Matthias Kloseb9621712010-04-24 17:59:49 +00007408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7409$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410ac_save_cxx="$CXX"
7411
7412if test "$ac_cv_kpthread" = "yes"
7413then
7414 CXX="$CXX -Kpthread"
7415 ac_cv_cxx_thread=yes
7416elif test "$ac_cv_kthread" = "yes"
7417then
7418 CXX="$CXX -Kthread"
7419 ac_cv_cxx_thread=yes
7420elif test "$ac_cv_pthread" = "yes"
7421then
7422 CXX="$CXX -pthread"
7423 ac_cv_cxx_thread=yes
7424fi
7425
7426if test $ac_cv_cxx_thread = yes
7427then
7428 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7429 $CXX -c conftest.$ac_ext 2>&5
7430 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7431 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7432 then
7433 ac_cv_cxx_thread=yes
7434 else
7435 ac_cv_cxx_thread=no
7436 fi
7437 rm -fr conftest*
7438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7440$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007441fi
7442CXX="$ac_save_cxx"
7443
7444
7445# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7447$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007448if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450else
Matthias Kloseb9621712010-04-24 17:59:49 +00007451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452/* end confdefs.h. */
7453#include <stdlib.h>
7454#include <stdarg.h>
7455#include <string.h>
7456#include <float.h>
7457
7458int
7459main ()
7460{
7461
7462 ;
7463 return 0;
7464}
7465_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007466if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007467 ac_cv_header_stdc=yes
7468else
Matthias Kloseb9621712010-04-24 17:59:49 +00007469 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007470fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7472
7473if test $ac_cv_header_stdc = yes; then
7474 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007475 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476/* end confdefs.h. */
7477#include <string.h>
7478
7479_ACEOF
7480if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007481 $EGREP "memchr" >/dev/null 2>&1; then :
7482
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483else
7484 ac_cv_header_stdc=no
7485fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007486rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487
7488fi
7489
7490if test $ac_cv_header_stdc = yes; then
7491 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007493/* end confdefs.h. */
7494#include <stdlib.h>
7495
7496_ACEOF
7497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007498 $EGREP "free" >/dev/null 2>&1; then :
7499
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007500else
7501 ac_cv_header_stdc=no
7502fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007503rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504
7505fi
7506
7507if test $ac_cv_header_stdc = yes; then
7508 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007509 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007510 :
7511else
Matthias Kloseb9621712010-04-24 17:59:49 +00007512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007513/* end confdefs.h. */
7514#include <ctype.h>
7515#include <stdlib.h>
7516#if ((' ' & 0x0FF) == 0x020)
7517# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7518# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7519#else
7520# define ISLOWER(c) \
7521 (('a' <= (c) && (c) <= 'i') \
7522 || ('j' <= (c) && (c) <= 'r') \
7523 || ('s' <= (c) && (c) <= 'z'))
7524# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7525#endif
7526
7527#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7528int
7529main ()
7530{
7531 int i;
7532 for (i = 0; i < 256; i++)
7533 if (XOR (islower (i), ISLOWER (i))
7534 || toupper (i) != TOUPPER (i))
7535 return 2;
7536 return 0;
7537}
7538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007539if ac_fn_c_try_run "$LINENO"; then :
7540
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541else
Matthias Kloseb9621712010-04-24 17:59:49 +00007542 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007543fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007544rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7545 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546fi
7547
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548fi
7549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7551$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552if test $ac_cv_header_stdc = yes; then
7553
Matthias Kloseb9621712010-04-24 17:59:49 +00007554$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555
7556fi
7557
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007558for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007559fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007560ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007561sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007562unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007563poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007564sys/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 +01007565sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007566sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007567sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007568sys/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 -07007569libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007570bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h endian.h \
7571sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007572do :
7573 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7574ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007575if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007576 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007577#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007578_ACEOF
7579
7580fi
7581
Guido van Rossum627b2d71993-12-24 10:39:16 +00007582done
7583
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007584ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007585for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007586 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7588$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007589if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007591else
Matthias Kloseb9621712010-04-24 17:59:49 +00007592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007593/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007594#include <sys/types.h>
7595#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007596
Martin v. Löwis11437992002-04-12 09:54:03 +00007597int
7598main ()
7599{
7600if ((DIR *) 0)
7601return 0;
7602 ;
7603 return 0;
7604}
7605_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007606if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007607 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007608else
Matthias Kloseb9621712010-04-24 17:59:49 +00007609 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007613eval ac_res=\$$as_ac_Header
7614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7615$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007616if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007617 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007618#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007619_ACEOF
7620
7621ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007622fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007623
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007624done
7625# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7626if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7628$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007629if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007631else
Martin v. Löwis11437992002-04-12 09:54:03 +00007632 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007633cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007634/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007636/* Override any GCC internal prototype to avoid an error.
7637 Use char because int might match the return type of a GCC
7638 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007639#ifdef __cplusplus
7640extern "C"
7641#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007642char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007643int
7644main ()
7645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007646return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007647 ;
7648 return 0;
7649}
7650_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007651for ac_lib in '' dir; do
7652 if test -z "$ac_lib"; then
7653 ac_res="none required"
7654 else
7655 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007656 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007659 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007660fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007661rm -f core conftest.err conftest.$ac_objext \
7662 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007663 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007666done
Victor Stinnere0be4232011-10-25 13:06:09 +02007667if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007668
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669else
7670 ac_cv_search_opendir=no
7671fi
7672rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007673LIBS=$ac_func_search_save_LIBS
7674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7676$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007678if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007679 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007680
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007681fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007682
Michael W. Hudson54241132001-12-07 15:38:26 +00007683else
Matthias Kloseb9621712010-04-24 17:59:49 +00007684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7685$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007686if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007687 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007688else
7689 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007693/* Override any GCC internal prototype to avoid an error.
7694 Use char because int might match the return type of a GCC
7695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007696#ifdef __cplusplus
7697extern "C"
7698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007699char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007700int
7701main ()
7702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 ;
7705 return 0;
7706}
7707_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007708for ac_lib in '' x; do
7709 if test -z "$ac_lib"; then
7710 ac_res="none required"
7711 else
7712 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007713 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007718rm -f core conftest.err conftest.$ac_objext \
7719 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007720 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007722fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007723done
Victor Stinnere0be4232011-10-25 13:06:09 +02007724if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007726else
7727 ac_cv_search_opendir=no
7728fi
7729rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007730LIBS=$ac_func_search_save_LIBS
7731fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7733$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007735if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007737
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007738fi
7739
7740fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007741
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7743$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007744if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007746else
Matthias Kloseb9621712010-04-24 17:59:49 +00007747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007748/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007749#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007750int
7751main ()
7752{
7753return makedev(0, 0);
7754 ;
7755 return 0;
7756}
7757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007758if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007759 ac_cv_header_sys_types_h_makedev=yes
7760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007763rm -f core conftest.err conftest.$ac_objext \
7764 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007765
7766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7768$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007769
7770if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007771ac_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 +02007772if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007773
Matthias Kloseb9621712010-04-24 17:59:49 +00007774$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007775
7776fi
7777
7778
7779
7780 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 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 +02007782if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007783
Matthias Kloseb9621712010-04-24 17:59:49 +00007784$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007785
7786fi
7787
7788
7789 fi
7790fi
7791
Michael W. Hudson54241132001-12-07 15:38:26 +00007792
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007793# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7794for ac_header in net/if.h
7795do :
7796 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7797#ifdef STDC_HEADERS
7798# include <stdlib.h>
7799# include <stddef.h>
7800#else
7801# ifdef HAVE_STDLIB_H
7802# include <stdlib.h>
7803# endif
7804#endif
7805#ifdef HAVE_SYS_SOCKET_H
7806# include <sys/socket.h>
7807#endif
7808
7809"
Victor Stinnere0be4232011-10-25 13:06:09 +02007810if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007811 cat >>confdefs.h <<_ACEOF
7812#define HAVE_NET_IF_H 1
7813_ACEOF
7814
7815fi
7816
7817done
7818
7819
Martin v. Löwis11017b12006-01-14 18:12:57 +00007820# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007821for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007822do :
7823 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 +00007824#ifdef HAVE_ASM_TYPES_H
7825#include <asm/types.h>
7826#endif
7827#ifdef HAVE_SYS_SOCKET_H
7828#include <sys/socket.h>
7829#endif
7830
Matthias Kloseb9621712010-04-24 17:59:49 +00007831"
Victor Stinnere0be4232011-10-25 13:06:09 +02007832if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007833 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007834#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007835_ACEOF
7836
7837fi
7838
7839done
7840
7841
Charles-François Natali47413c12011-10-06 19:47:44 +02007842# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007843for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007844do :
7845 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7846ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7847#ifdef HAVE_SYS_SOCKET_H
7848#include <sys/socket.h>
7849#endif
7850
7851"
7852if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7853 cat >>confdefs.h <<_ACEOF
7854#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7855_ACEOF
7856
7857fi
7858
7859done
7860
7861
Guido van Rossum627b2d71993-12-24 10:39:16 +00007862# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007863was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7865$as_echo_n "checking for clock_t in time.h... " >&6; }
7866cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007867/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007869
7870_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007871if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007872 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007873 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007874else
Martin v. Löwis11437992002-04-12 09:54:03 +00007875
7876
Matthias Kloseb9621712010-04-24 17:59:49 +00007877$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007878
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007879
Guido van Rossum627b2d71993-12-24 10:39:16 +00007880fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007881rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007882
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7884$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007885
Matthias Kloseb9621712010-04-24 17:59:49 +00007886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7887$as_echo_n "checking for makedev... " >&6; }
7888cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007889/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007890
Jesus Cea740f53a2010-04-28 11:35:30 +00007891#if defined(MAJOR_IN_MKDEV)
7892#include <sys/mkdev.h>
7893#elif defined(MAJOR_IN_SYSMACROS)
7894#include <sys/sysmacros.h>
7895#else
7896#include <sys/types.h>
7897#endif
7898
Neal Norwitz11690112002-07-30 01:08:28 +00007899int
7900main ()
7901{
Jesus Cea740f53a2010-04-28 11:35:30 +00007902
7903 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007904 ;
7905 return 0;
7906}
Matthias Kloseb159a552010-04-25 21:00:44 +00007907
Neal Norwitz11690112002-07-30 01:08:28 +00007908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007909if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007910 ac_cv_has_makedev=yes
7911else
Matthias Kloseb9621712010-04-24 17:59:49 +00007912 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007913fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007914rm -f core conftest.err conftest.$ac_objext \
7915 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7917$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007918if test "$ac_cv_has_makedev" = "yes"; then
7919
Matthias Kloseb9621712010-04-24 17:59:49 +00007920$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007921
7922fi
7923
Christian Heimes985ecdc2013-11-20 11:46:18 +01007924# byte swapping
7925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7926$as_echo_n "checking for le64toh... " >&6; }
7927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7928/* end confdefs.h. */
7929
7930#ifdef HAVE_ENDIAN_H
7931#include <endian.h>
7932#elif defined(HAVE_SYS_ENDIAN_H)
7933#include <sys/endian.h>
7934#endif
7935
7936int
7937main ()
7938{
7939
7940 le64toh(1)
7941 ;
7942 return 0;
7943}
7944
7945_ACEOF
7946if ac_fn_c_try_link "$LINENO"; then :
7947 ac_cv_has_le64toh=yes
7948else
7949 ac_cv_has_le64toh=no
7950fi
7951rm -f core conftest.err conftest.$ac_objext \
7952 conftest$ac_exeext conftest.$ac_ext
7953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7954$as_echo "$ac_cv_has_le64toh" >&6; }
7955if test "$ac_cv_has_le64toh" = "yes"; then
7956
7957$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7958
7959fi
7960
Martin v. Löwis399a6892002-10-04 10:22:02 +00007961# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7962# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7963# defined, but the compiler does not support pragma redefine_extname,
7964# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7965# structures (such as rlimit64) without declaring them. As a
7966# work-around, disable LFS on such configurations
7967
7968use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7970$as_echo_n "checking Solaris LFS bug... " >&6; }
7971cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007973
7974#define _LARGEFILE_SOURCE 1
7975#define _FILE_OFFSET_BITS 64
7976#include <sys/resource.h>
7977
Martin v. Löwis399a6892002-10-04 10:22:02 +00007978int
7979main ()
7980{
7981struct rlimit foo;
7982 ;
7983 return 0;
7984}
7985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007986if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007987 sol_lfs_bug=no
7988else
Matthias Kloseb9621712010-04-24 17:59:49 +00007989 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7993$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007994if test "$sol_lfs_bug" = "yes"; then
7995 use_lfs=no
7996fi
7997
7998if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007999# Two defines needed to enable largefile support on various platforms
8000# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008001case $ac_sys_system/$ac_sys_release in
8002AIX*)
8003
8004$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8005
8006 ;;
8007esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008008
Matthias Kloseb9621712010-04-24 17:59:49 +00008009$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008010
8011
Matthias Kloseb9621712010-04-24 17:59:49 +00008012$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008013
Martin v. Löwis399a6892002-10-04 10:22:02 +00008014fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008015
Guido van Rossum84e7b241996-08-19 21:59:00 +00008016# Add some code to confdefs.h so that the test for off_t works on SCO
8017cat >> confdefs.h <<\EOF
8018#if defined(SCO_DS)
8019#undef _OFF_T
8020#endif
8021EOF
8022
Guido van Rossumef2255b2000-03-10 22:30:29 +00008023# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008024ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008025if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008026
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008027else
Martin v. Löwis11437992002-04-12 09:54:03 +00008028
8029cat >>confdefs.h <<_ACEOF
8030#define mode_t int
8031_ACEOF
8032
8033fi
8034
Matthias Kloseb9621712010-04-24 17:59:49 +00008035ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008036if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008037
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008038else
Martin v. Löwis11437992002-04-12 09:54:03 +00008039
8040cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008041#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008042_ACEOF
8043
8044fi
8045
Matthias Kloseb9621712010-04-24 17:59:49 +00008046ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008047if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008048
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008049else
Martin v. Löwis11437992002-04-12 09:54:03 +00008050
8051cat >>confdefs.h <<_ACEOF
8052#define pid_t int
8053_ACEOF
8054
8055fi
8056
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008057
Martin v. Löwis11437992002-04-12 09:54:03 +00008058cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008059#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008060_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008061
Matthias Kloseb9621712010-04-24 17:59:49 +00008062ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008063if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008064
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008065else
Martin v. Löwis11437992002-04-12 09:54:03 +00008066
8067cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008069_ACEOF
8070
8071fi
8072
Matthias Kloseb9621712010-04-24 17:59:49 +00008073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8074$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008075if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008076 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008077else
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008079/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008080#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008081
8082_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008085 ac_cv_type_uid_t=yes
8086else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008087 ac_cv_type_uid_t=no
8088fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008089rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008090
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008091fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8093$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008094if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008095
Matthias Kloseb9621712010-04-24 17:59:49 +00008096$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008097
8098
Matthias Kloseb9621712010-04-24 17:59:49 +00008099$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008100
8101fi
8102
Mark Dickinson983bc162012-12-02 12:11:38 +00008103
8104# There are two separate checks for each of the exact-width integer types we
8105# need. First we check whether the type is available using the usual
8106# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8107# and <stdint.h> where available). We then also use the special type checks of
8108# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8109# directly, #define's uint32_t to be a suitable type.
8110
8111ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8112if test "x$ac_cv_type_uint32_t" = xyes; then :
8113
8114$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8115
8116fi
8117
Matthias Kloseb9621712010-04-24 17:59:49 +00008118ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8119case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008120 no|yes) ;; #(
8121 *)
8122
Matthias Kloseb9621712010-04-24 17:59:49 +00008123$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008124
8125
8126cat >>confdefs.h <<_ACEOF
8127#define uint32_t $ac_cv_c_uint32_t
8128_ACEOF
8129;;
8130 esac
8131
Mark Dickinson983bc162012-12-02 12:11:38 +00008132
8133ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8134if test "x$ac_cv_type_uint64_t" = xyes; then :
8135
8136$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8137
8138fi
8139
Matthias Kloseb9621712010-04-24 17:59:49 +00008140ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8141case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008142 no|yes) ;; #(
8143 *)
8144
Matthias Kloseb9621712010-04-24 17:59:49 +00008145$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008146
8147
8148cat >>confdefs.h <<_ACEOF
8149#define uint64_t $ac_cv_c_uint64_t
8150_ACEOF
8151;;
8152 esac
8153
Mark Dickinson983bc162012-12-02 12:11:38 +00008154
8155ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8156if test "x$ac_cv_type_int32_t" = xyes; then :
8157
8158$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8159
8160fi
8161
Matthias Kloseb9621712010-04-24 17:59:49 +00008162ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8163case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008164 no|yes) ;; #(
8165 *)
8166
8167cat >>confdefs.h <<_ACEOF
8168#define int32_t $ac_cv_c_int32_t
8169_ACEOF
8170;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008171esac
8172
Mark Dickinson983bc162012-12-02 12:11:38 +00008173
8174ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8175if test "x$ac_cv_type_int64_t" = xyes; then :
8176
8177$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8178
8179fi
8180
Matthias Kloseb9621712010-04-24 17:59:49 +00008181ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8182case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008183 no|yes) ;; #(
8184 *)
8185
8186cat >>confdefs.h <<_ACEOF
8187#define int64_t $ac_cv_c_int64_t
8188_ACEOF
8189;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008190esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008191
Mark Dickinson983bc162012-12-02 12:11:38 +00008192
Matthias Kloseb9621712010-04-24 17:59:49 +00008193ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008194if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008195
Matthias Kloseb9621712010-04-24 17:59:49 +00008196$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008197
8198fi
8199
Stefan Krah1919b7e2012-03-21 18:25:23 +01008200ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8201if test "x$ac_cv_type___uint128_t" = xyes; then :
8202
8203$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8204
8205fi
8206
Jack Jansendd19cf82001-12-06 22:36:17 +00008207
Michael W. Hudson54241132001-12-07 15:38:26 +00008208# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008209# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008210# The cast to long int works around a bug in the HP C Compiler
8211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8213# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8215$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008216if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008217 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008218else
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 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 +00008220
Martin v. Löwis11437992002-04-12 09:54:03 +00008221else
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 if test "$ac_cv_type_int" = yes; then
8223 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8224$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008225as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008226See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008227 else
8228 ac_cv_sizeof_int=0
8229 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008230fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008231
Martin v. Löwis11437992002-04-12 09:54:03 +00008232fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8234$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008235
8236
8237
Martin v. Löwis11437992002-04-12 09:54:03 +00008238cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008239#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008240_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008241
8242
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243# The cast to long int works around a bug in the HP C Compiler
8244# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8245# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8246# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8248$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008249if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008250 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008251else
Matthias Kloseb9621712010-04-24 17:59:49 +00008252 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 +00008253
Martin v. Löwis11437992002-04-12 09:54:03 +00008254else
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 if test "$ac_cv_type_long" = yes; then
8256 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8257$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008258as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008259See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008260 else
8261 ac_cv_sizeof_long=0
8262 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008264
Martin v. Löwis11437992002-04-12 09:54:03 +00008265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8267$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008268
8269
8270
Martin v. Löwis11437992002-04-12 09:54:03 +00008271cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008272#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008273_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008274
8275
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008276# The cast to long int works around a bug in the HP C Compiler
8277# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8278# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8279# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8281$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008282if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008283 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008284else
Matthias Kloseb9621712010-04-24 17:59:49 +00008285 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 +00008286
Martin v. Löwis11437992002-04-12 09:54:03 +00008287else
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 if test "$ac_cv_type_void_p" = yes; then
8289 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8290$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008291as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008292See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008293 else
8294 ac_cv_sizeof_void_p=0
8295 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8300$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008301
8302
8303
Martin v. Löwis11437992002-04-12 09:54:03 +00008304cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008305#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008306_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008307
8308
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008309# The cast to long int works around a bug in the HP C Compiler
8310# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8311# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8312# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8314$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008315if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008316 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008317else
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 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 +00008319
Martin v. Löwis11437992002-04-12 09:54:03 +00008320else
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 if test "$ac_cv_type_short" = yes; then
8322 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8323$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008324as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008325See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008326 else
8327 ac_cv_sizeof_short=0
8328 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008330
Martin v. Löwis11437992002-04-12 09:54:03 +00008331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8333$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334
8335
8336
Martin v. Löwis11437992002-04-12 09:54:03 +00008337cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008338#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008339_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008340
8341
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008342# The cast to long int works around a bug in the HP C Compiler
8343# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8344# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8345# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8347$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008348if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008349 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008350else
Matthias Kloseb9621712010-04-24 17:59:49 +00008351 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 +00008352
Martin v. Löwis11437992002-04-12 09:54:03 +00008353else
Matthias Kloseb9621712010-04-24 17:59:49 +00008354 if test "$ac_cv_type_float" = yes; then
8355 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8356$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008357as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008358See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008359 else
8360 ac_cv_sizeof_float=0
8361 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008362fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008363
Martin v. Löwis11437992002-04-12 09:54:03 +00008364fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8366$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008367
8368
8369
Martin v. Löwis11437992002-04-12 09:54:03 +00008370cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008371#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008372_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008373
8374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375# The cast to long int works around a bug in the HP C Compiler
8376# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8377# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8378# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8380$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008381if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008382 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008383else
Matthias Kloseb9621712010-04-24 17:59:49 +00008384 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 +00008385
Martin v. Löwis11437992002-04-12 09:54:03 +00008386else
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 if test "$ac_cv_type_double" = yes; then
8388 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8389$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008390as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008391See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008392 else
8393 ac_cv_sizeof_double=0
8394 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008396
Martin v. Löwis11437992002-04-12 09:54:03 +00008397fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8399$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008400
8401
8402
Martin v. Löwis11437992002-04-12 09:54:03 +00008403cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008404#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008405_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008406
8407
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008408# The cast to long int works around a bug in the HP C Compiler
8409# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8410# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8411# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8413$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008414if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008415 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008416else
Matthias Kloseb9621712010-04-24 17:59:49 +00008417 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 +00008418
Martin v. Löwis11437992002-04-12 09:54:03 +00008419else
Matthias Kloseb9621712010-04-24 17:59:49 +00008420 if test "$ac_cv_type_fpos_t" = yes; then
8421 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8422$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008423as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008424See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425 else
8426 ac_cv_sizeof_fpos_t=0
8427 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008429
Martin v. Löwis11437992002-04-12 09:54:03 +00008430fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8432$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433
8434
8435
Martin v. Löwis11437992002-04-12 09:54:03 +00008436cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008437#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008438_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008439
Michael W. Hudson54241132001-12-07 15:38:26 +00008440
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008441# The cast to long int works around a bug in the HP C Compiler
8442# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8443# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8444# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8446$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008447if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008448 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008449else
Matthias Kloseb9621712010-04-24 17:59:49 +00008450 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 +00008451
Martin v. Löwis18e16552006-02-15 17:27:45 +00008452else
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 if test "$ac_cv_type_size_t" = yes; then
8454 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008456as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008457See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458 else
8459 ac_cv_sizeof_size_t=0
8460 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008462
Martin v. Löwis18e16552006-02-15 17:27:45 +00008463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8465$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008466
8467
8468
Martin v. Löwis18e16552006-02-15 17:27:45 +00008469cat >>confdefs.h <<_ACEOF
8470#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8471_ACEOF
8472
8473
Christian Heimes400adb02008-02-01 08:12:03 +00008474# The cast to long int works around a bug in the HP C Compiler
8475# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8476# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8477# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8479$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008480if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008481 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008482else
Matthias Kloseb9621712010-04-24 17:59:49 +00008483 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 +00008484
Christian Heimes400adb02008-02-01 08:12:03 +00008485else
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 if test "$ac_cv_type_pid_t" = yes; then
8487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8488$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008489as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008490See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008491 else
8492 ac_cv_sizeof_pid_t=0
8493 fi
8494fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008495
Christian Heimes400adb02008-02-01 08:12:03 +00008496fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8498$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008499
8500
8501
8502cat >>confdefs.h <<_ACEOF
8503#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8504_ACEOF
8505
8506
Michael W. Hudson54241132001-12-07 15:38:26 +00008507
Matthias Kloseb9621712010-04-24 17:59:49 +00008508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8509$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008510have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008512/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008513
Martin v. Löwis11437992002-04-12 09:54:03 +00008514int
8515main ()
8516{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008517long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 ;
8519 return 0;
8520}
8521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008522if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008523
8524
Matthias Kloseb9621712010-04-24 17:59:49 +00008525$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008526
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008527 have_long_long=yes
8528
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8532$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008533if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534# The cast to long int works around a bug in the HP C Compiler
8535# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8536# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8537# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8539$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008540if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008541 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008542else
Matthias Kloseb9621712010-04-24 17:59:49 +00008543 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 +00008544
Martin v. Löwis11437992002-04-12 09:54:03 +00008545else
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 if test "$ac_cv_type_long_long" = yes; then
8547 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8548$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008549as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008550See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551 else
8552 ac_cv_sizeof_long_long=0
8553 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008554fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008555
Martin v. Löwis11437992002-04-12 09:54:03 +00008556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8558$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008559
8560
8561
Martin v. Löwis11437992002-04-12 09:54:03 +00008562cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008563#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008564_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008565
Michael W. Hudson54241132001-12-07 15:38:26 +00008566
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008567fi
8568
Matthias Kloseb9621712010-04-24 17:59:49 +00008569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8570$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008571have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008573/* end confdefs.h. */
8574
8575int
8576main ()
8577{
8578long double x; x = (long double)0;
8579 ;
8580 return 0;
8581}
8582_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008583if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008584
8585
Matthias Kloseb9621712010-04-24 17:59:49 +00008586$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008587
8588 have_long_double=yes
8589
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008590fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8593$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008594if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008595# The cast to long int works around a bug in the HP C Compiler
8596# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8597# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8598# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8600$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008601if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008602 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008603else
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 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 +00008605
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008606else
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 if test "$ac_cv_type_long_double" = yes; then
8608 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008610as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008611See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008612 else
8613 ac_cv_sizeof_long_double=0
8614 fi
8615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008616
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8619$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008620
8621
8622
8623cat >>confdefs.h <<_ACEOF
8624#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8625_ACEOF
8626
8627
8628fi
8629
8630
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8632$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008633have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008635/* end confdefs.h. */
8636
8637int
8638main ()
8639{
8640_Bool x; x = (_Bool)0;
8641 ;
8642 return 0;
8643}
8644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008645if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008646
8647
Matthias Kloseb9621712010-04-24 17:59:49 +00008648$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008649
8650 have_c99_bool=yes
8651
Thomas Woutersb2137042007-02-01 18:02:27 +00008652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8655$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008656if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008657# The cast to long int works around a bug in the HP C Compiler
8658# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8659# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8660# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8662$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008663if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008664 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008665else
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 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 +00008667
Thomas Woutersb2137042007-02-01 18:02:27 +00008668else
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 if test "$ac_cv_type__Bool" = yes; then
8670 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008672as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008673See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674 else
8675 ac_cv_sizeof__Bool=0
8676 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008678
Thomas Woutersb2137042007-02-01 18:02:27 +00008679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8681$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008682
8683
8684
Thomas Woutersb2137042007-02-01 18:02:27 +00008685cat >>confdefs.h <<_ACEOF
8686#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8687_ACEOF
8688
8689
8690fi
8691
Matthias Kloseb9621712010-04-24 17:59:49 +00008692ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008693 #include <stdint.h>
8694 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008695 #ifdef HAVE_INTTYPES_H
8696 #include <inttypes.h>
8697 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008698"
Victor Stinnere0be4232011-10-25 13:06:09 +02008699if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008700
8701cat >>confdefs.h <<_ACEOF
8702#define HAVE_UINTPTR_T 1
8703_ACEOF
8704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008705# The cast to long int works around a bug in the HP C Compiler
8706# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8707# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8708# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8710$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008711if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008712 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008713else
Matthias Kloseb9621712010-04-24 17:59:49 +00008714 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 +00008715
Martin v. Löwis11437992002-04-12 09:54:03 +00008716else
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 if test "$ac_cv_type_uintptr_t" = yes; then
8718 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8719$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008720as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008721See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722 else
8723 ac_cv_sizeof_uintptr_t=0
8724 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008726
Martin v. Löwis11437992002-04-12 09:54:03 +00008727fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8729$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008730
8731
8732
Martin v. Löwis11437992002-04-12 09:54:03 +00008733cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008734#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008735_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008736
Michael W. Hudson54241132001-12-07 15:38:26 +00008737
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008738fi
8739
Thomas Wouters89f507f2006-12-13 04:49:30 +00008740
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008741# The cast to long int works around a bug in the HP C Compiler
8742# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8743# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8744# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8746$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008747if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008748 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008749else
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008751#ifdef HAVE_SYS_TYPES_H
8752#include <sys/types.h>
8753#endif
8754
Matthias Kloseb9621712010-04-24 17:59:49 +00008755"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008756
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008757else
Matthias Kloseb9621712010-04-24 17:59:49 +00008758 if test "$ac_cv_type_off_t" = yes; then
8759 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8760$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008761as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008762See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008763 else
8764 ac_cv_sizeof_off_t=0
8765 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008766fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008767
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008768fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8770$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008771
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008772
8773
Martin v. Löwis11437992002-04-12 09:54:03 +00008774cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008775#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008776_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008777
Michael W. Hudson54241132001-12-07 15:38:26 +00008778
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008779
Matthias Kloseb9621712010-04-24 17:59:49 +00008780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8781$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008782if test "$have_long_long" = yes
8783then
8784if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008785 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008786
Matthias Kloseb9621712010-04-24 17:59:49 +00008787$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008788
Matthias Kloseb9621712010-04-24 17:59:49 +00008789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8790$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008791else
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8793$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008794fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008795else
Matthias Kloseb9621712010-04-24 17:59:49 +00008796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8797$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008798fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008799
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008800# The cast to long int works around a bug in the HP C Compiler
8801# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8802# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8803# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8805$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008806if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008807 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008810#ifdef HAVE_SYS_TYPES_H
8811#include <sys/types.h>
8812#endif
8813#ifdef HAVE_TIME_H
8814#include <time.h>
8815#endif
8816
Matthias Kloseb9621712010-04-24 17:59:49 +00008817"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008819else
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 if test "$ac_cv_type_time_t" = yes; then
8821 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008823as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008824See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008825 else
8826 ac_cv_sizeof_time_t=0
8827 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008829
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8832$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008833
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008834
8835
Martin v. Löwis11437992002-04-12 09:54:03 +00008836cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008837#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008838_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008839
Michael W. Hudson54241132001-12-07 15:38:26 +00008840
8841
Trent Mick635f6fb2000-08-23 21:33:05 +00008842# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008843ac_save_cc="$CC"
8844if test "$ac_cv_kpthread" = "yes"
8845then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008846elif test "$ac_cv_kthread" = "yes"
8847then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008848elif test "$ac_cv_pthread" = "yes"
8849then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008850fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008851
Matthias Kloseb9621712010-04-24 17:59:49 +00008852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8853$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008854have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008856/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008857
8858 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008859int
8860main ()
8861{
Guido van Rossum12580492000-09-24 16:47:19 +00008862pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 ;
8864 return 0;
8865}
Matthias Kloseb159a552010-04-25 21:00:44 +00008866
Martin v. Löwis11437992002-04-12 09:54:03 +00008867_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008868if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008869 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8873$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008874if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008876# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8877# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8878# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8880$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008881if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008882 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008883else
Matthias Kloseb9621712010-04-24 17:59:49 +00008884 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008885#ifdef HAVE_PTHREAD_H
8886#include <pthread.h>
8887#endif
8888
Matthias Kloseb9621712010-04-24 17:59:49 +00008889"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008890
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008891else
Matthias Kloseb9621712010-04-24 17:59:49 +00008892 if test "$ac_cv_type_pthread_t" = yes; then
8893 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008895as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008896See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008897 else
8898 ac_cv_sizeof_pthread_t=0
8899 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008901
Trent Mick635f6fb2000-08-23 21:33:05 +00008902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8904$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008905
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008906
8907
Martin v. Löwis11437992002-04-12 09:54:03 +00008908cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008909#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008910_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008911
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008912
Trent Mick635f6fb2000-08-23 21:33:05 +00008913fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008914CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008915
Michael W. Hudson54241132001-12-07 15:38:26 +00008916
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008917case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008918 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008919 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8920 ;;
8921 Darwin/*)
8922 OTHER_LIBTOOL_OPT=""
8923 ;;
8924esac
8925
8926
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008927
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008928case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008929 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008930 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8931 if test "${enable_universalsdk}"; then
8932 :
8933 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008934 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008935 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008936 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008937 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008938 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008939 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008940 if test ${gcc_version} '<' 4.0
8941 then
8942 LIBTOOL_CRUFT="-lcc_dynamic"
8943 else
8944 LIBTOOL_CRUFT=""
8945 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008946 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008947 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008948else
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008950/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008951
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008952 #include <unistd.h>
8953 int main(int argc, char*argv[])
8954 {
8955 if (sizeof(long) == 4) {
8956 return 0;
8957 } else {
8958 return 1;
8959 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008960 }
8961
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008963if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008964 ac_osx_32bit=yes
8965else
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8969 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008970fi
8971
8972
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008973 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008974 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008975 i386)
8976 MACOSX_DEFAULT_ARCH="i386"
8977 ;;
8978 ppc)
8979 MACOSX_DEFAULT_ARCH="ppc"
8980 ;;
8981 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008982 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008983 ;;
8984 esac
8985 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008986 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008987 i386)
8988 MACOSX_DEFAULT_ARCH="x86_64"
8989 ;;
8990 ppc)
8991 MACOSX_DEFAULT_ARCH="ppc64"
8992 ;;
8993 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008994 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008995 ;;
8996 esac
8997
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008998 fi
8999
9000 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009001 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009002 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009003esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9005$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009006if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009007then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009008 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009010 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009011
Matthias Kloseb9621712010-04-24 17:59:49 +00009012$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009013
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9015$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009016 if test $enable_shared = "yes"
9017 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009018 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 +00009019 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009020else
Matthias Kloseb9621712010-04-24 17:59:49 +00009021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9022$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009023fi
9024
Matthias Kloseb9621712010-04-24 17:59:49 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9026$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009027case $ac_sys_system/$ac_sys_release in
9028 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009029
Matthias Kloseb9621712010-04-24 17:59:49 +00009030$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009031
Matthias Kloseb9621712010-04-24 17:59:49 +00009032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9033$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009034 ;;
9035 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9037$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009038 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009039esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009040
Guido van Rossum0a516c91994-09-12 10:58:40 +00009041# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009042
Michael W. Hudson54241132001-12-07 15:38:26 +00009043
9044
9045
9046
Benjamin Peterson99f03762010-04-11 22:15:28 +00009047
Thomas Wouters477c8d52006-05-27 19:21:47 +00009048
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009049# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9050# -- usually .so, .sl on HP-UX, .dll on Cygwin
9051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9052$as_echo_n "checking the extension of shared libraries... " >&6; }
9053if test -z "$SHLIB_SUFFIX"; then
9054 case $ac_sys_system in
9055 hp*|HP*)
9056 case `uname -m` in
9057 ia64) SHLIB_SUFFIX=.so;;
9058 *) SHLIB_SUFFIX=.sl;;
9059 esac
9060 ;;
9061 CYGWIN*) SHLIB_SUFFIX=.dll;;
9062 *) SHLIB_SUFFIX=.so;;
9063 esac
9064fi
9065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9066$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009067
Guido van Rossum0a516c91994-09-12 10:58:40 +00009068# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009069# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009070# (Shared libraries in this instance are shared modules to be loaded into
9071# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9073$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009074if test -z "$LDSHARED"
9075then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009076 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009077 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009078 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009079 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009080 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009081 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009082 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 SunOS/5*)
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='$(CC) -G'
9089 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009090 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009091 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009092 if test "$GCC" = "yes" ; then
9093 LDSHARED='$(CC) -shared'
9094 LDCXXSHARED='$(CXX) -shared'
9095 else
9096 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009097 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009098 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009099 LDSHARED='$(CC) -bundle'
9100 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009101 if test "$enable_framework" ; then
9102 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009103 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9104 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009105 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009106 else
9107 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009108 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009109 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009110 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009111 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009112 LDSHARED='$(CC) -bundle'
9113 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009114 if test "$enable_framework" ; then
9115 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009116 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9117 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009118 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009119 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009120 # No framework, use the Python app as bundle-loader
9121 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009122 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009123 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009124 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009125 Darwin/*)
9126 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9127 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009128
Ned Deily36820b62014-06-25 13:44:22 -07009129 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9130 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9131 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9132 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9133 if test ${dep_target_major} -eq 10 && \
9134 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009135 then
Ned Deily36820b62014-06-25 13:44:22 -07009136 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009137 LDSHARED='$(CC) -bundle'
9138 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009139 if test "$enable_framework" ; then
9140 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009141 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9142 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009143 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009144 else
9145 # No framework, use the Python app as bundle-loader
9146 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9147 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009148 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009149 fi
Ned Deily36820b62014-06-25 13:44:22 -07009150 else
9151 # building for OS X 10.3 and later
9152 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9153 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9154 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009155 fi
9156 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009157 Linux*|GNU*|QNX*)
9158 LDSHARED='$(CC) -shared'
9159 LDCXXSHARED='$(CXX) -shared';;
9160 BSD/OS*/4*)
9161 LDSHARED="gcc -shared"
9162 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009163 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009164 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009165 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009166 LDSHARED='$(CC) -shared'
9167 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009168 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009169 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009170 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009171 OpenBSD*)
9172 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9173 then
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 else
9177 case `uname -r` in
9178 [01].* | 2.[0-7] | 2.[0-7].*)
9179 LDSHARED="ld -Bshareable ${LDFLAGS}"
9180 ;;
9181 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009182 LDSHARED='$(CC) -shared $(CCSHARED)'
9183 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009184 ;;
9185 esac
9186 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009187 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009188 LDSHARED='$(CC) -shared'
9189 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009190 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009191 if test "$GCC" = "yes" ; then
9192 LDSHARED='$(CC) -shared'
9193 LDCXXSHARED='$(CXX) -shared'
9194 else
9195 LDSHARED='$(CC) -G'
9196 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009197 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009198 SCO_SV*)
9199 LDSHARED='$(CC) -Wl,-G,-Bexport'
9200 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9201 CYGWIN*)
9202 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9203 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009204 *) LDSHARED="ld";;
9205 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009206fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9208$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009209LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009210BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009211# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009212# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9214$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009215if test -z "$CCSHARED"
9216then
Guido van Rossum07397971997-04-29 21:49:50 +00009217 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009218 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009219 then CCSHARED="-fPIC";
9220 elif test `uname -p` = sparc;
9221 then CCSHARED="-xcode=pic32";
9222 else CCSHARED="-Kpic";
9223 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009224 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009225 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009226 else CCSHARED="+z";
9227 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009228 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009229 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009230 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009231 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009232 if test "$GCC" = "yes"
9233 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009234 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009235 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009236 SCO_SV*)
9237 if test "$GCC" = "yes"
9238 then CCSHARED="-fPIC"
9239 else CCSHARED="-Kpic -belf"
9240 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009241 IRIX*/6*) case $CC in
9242 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009243 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009244 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009245 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9248$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009249# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009250# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9252$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009253if test -z "$LINKFORSHARED"
9254then
Guido van Rossum07397971997-04-29 21:49:50 +00009255 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009256 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009257 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009258 LINKFORSHARED="-Wl,-E -Wl,+s";;
9259# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009260 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009261 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009262 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009264 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009265
9266 # Issue #18075: the default maximum stack size (8MBytes) is too
9267 # small for the default recursion limit. Increase the stack size
9268 # to ensure that tests don't crash
9269 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9270
Jack Jansene578a632001-08-15 01:27:14 +00009271 if test "$enable_framework"
9272 then
Jack Jansenda49e192005-01-07 13:08:22 +00009273 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009274 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009275 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009276 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009277 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009278 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009279 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009280 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9281 then
9282 LINKFORSHARED="-Wl,--export-dynamic"
9283 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009284 SunOS/5*) case $CC in
9285 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009286 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009287 then
9288 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009289 fi;;
9290 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009291 CYGWIN*)
9292 if test $enable_shared = "no"
9293 then
9294 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9295 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009296 QNX*)
9297 # -Wl,-E causes the symbols to be added to the dynamic
9298 # symbol table so that they can be found when a module
9299 # is loaded. -N 2048K causes the stack size to be set
9300 # to 2048 kilobytes so that the stack doesn't overflow
9301 # when running test_compile.py.
9302 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009303 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9306$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009307
Michael W. Hudson54241132001-12-07 15:38:26 +00009308
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009309
Matthias Kloseb9621712010-04-24 17:59:49 +00009310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9311$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009312if test ! "$LIBRARY" = "$LDLIBRARY"
9313then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009314 case $ac_sys_system in
9315 CYGWIN*)
9316 # Cygwin needs CCSHARED when building extension DLLs
9317 # but not when building the interpreter DLL.
9318 CFLAGSFORSHARED='';;
9319 *)
9320 CFLAGSFORSHARED='$(CCSHARED)'
9321 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9324$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009325
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009326# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9327# library (with --enable-shared).
9328# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009329# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9330# if it is not required, since it creates a dependency of the shared library
9331# to LIBS. This, in turn, means that applications linking the shared libpython
9332# don't need to link LIBS explicitly. The default should be only changed
9333# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009334
Matthias Kloseb9621712010-04-24 17:59:49 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9336$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009337case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009338 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009339 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009340esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9342$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009343
9344
Guido van Rossum627b2d71993-12-24 10:39:16 +00009345# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9347$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009348if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009349 $as_echo_n "(cached) " >&6
9350else
9351 ac_check_lib_save_LIBS=$LIBS
9352LIBS="-lsendfile $LIBS"
9353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9354/* end confdefs.h. */
9355
9356/* Override any GCC internal prototype to avoid an error.
9357 Use char because int might match the return type of a GCC
9358 builtin and then its argument prototype would still apply. */
9359#ifdef __cplusplus
9360extern "C"
9361#endif
9362char sendfile ();
9363int
9364main ()
9365{
9366return sendfile ();
9367 ;
9368 return 0;
9369}
9370_ACEOF
9371if ac_fn_c_try_link "$LINENO"; then :
9372 ac_cv_lib_sendfile_sendfile=yes
9373else
9374 ac_cv_lib_sendfile_sendfile=no
9375fi
9376rm -f core conftest.err conftest.$ac_objext \
9377 conftest$ac_exeext conftest.$ac_ext
9378LIBS=$ac_check_lib_save_LIBS
9379fi
9380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9381$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009382if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009383 cat >>confdefs.h <<_ACEOF
9384#define HAVE_LIBSENDFILE 1
9385_ACEOF
9386
9387 LIBS="-lsendfile $LIBS"
9388
9389fi
9390
Matthias Kloseb9621712010-04-24 17:59:49 +00009391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9392$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009393if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009394 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009395else
Martin v. Löwis11437992002-04-12 09:54:03 +00009396 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009397LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009401/* Override any GCC internal prototype to avoid an error.
9402 Use char because int might match the return type of a GCC
9403 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009404#ifdef __cplusplus
9405extern "C"
9406#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009407char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009408int
9409main ()
9410{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009412 ;
9413 return 0;
9414}
9415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009416if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009417 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009418else
Matthias Kloseb9621712010-04-24 17:59:49 +00009419 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009420fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009421rm -f core conftest.err conftest.$ac_objext \
9422 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009423LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009424fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9426$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009427if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 cat >>confdefs.h <<_ACEOF
9429#define HAVE_LIBDL 1
9430_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009431
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009432 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009434fi
9435 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9437$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009438if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009439 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009440else
Martin v. Löwis11437992002-04-12 09:54:03 +00009441 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009442LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009445
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446/* Override any GCC internal prototype to avoid an error.
9447 Use char because int might match the return type of a GCC
9448 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009449#ifdef __cplusplus
9450extern "C"
9451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009452char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009453int
9454main ()
9455{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009456return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 ;
9458 return 0;
9459}
9460_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009461if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009462 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009463else
Matthias Kloseb9621712010-04-24 17:59:49 +00009464 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009465fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009466rm -f core conftest.err conftest.$ac_objext \
9467 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009468LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009469fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9471$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009472if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 cat >>confdefs.h <<_ACEOF
9474#define HAVE_LIBDLD 1
9475_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009476
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009477 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009478
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009479fi
9480 # Dynamic linking for HP-UX
Victor Stinnerbeeb5122014-11-28 13:28:25 +01009481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
9482$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
9483if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
9484 $as_echo_n "(cached) " >&6
9485else
9486 ac_check_lib_save_LIBS=$LIBS
9487LIBS="-lcrypto $LIBS"
9488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9489/* end confdefs.h. */
9490
9491/* Override any GCC internal prototype to avoid an error.
9492 Use char because int might match the return type of a GCC
9493 builtin and then its argument prototype would still apply. */
9494#ifdef __cplusplus
9495extern "C"
9496#endif
9497char RAND_egd ();
9498int
9499main ()
9500{
9501return RAND_egd ();
9502 ;
9503 return 0;
9504}
9505_ACEOF
9506if ac_fn_c_try_link "$LINENO"; then :
9507 ac_cv_lib_crypto_RAND_egd=yes
9508else
9509 ac_cv_lib_crypto_RAND_egd=no
9510fi
9511rm -f core conftest.err conftest.$ac_objext \
9512 conftest$ac_exeext conftest.$ac_ext
9513LIBS=$ac_check_lib_save_LIBS
9514fi
9515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
9516$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
9517if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
9518
9519$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
9520
9521fi
9522
Martin v. Löwis519adae2003-09-20 10:47:47 +00009523
Georg Brandlb1441c72009-01-03 22:33:39 +00009524# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009525if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9527$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009528if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009529 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009530else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009531 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009535/* Override any GCC internal prototype to avoid an error.
9536 Use char because int might match the return type of a GCC
9537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009538#ifdef __cplusplus
9539extern "C"
9540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009541char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009542int
9543main ()
9544{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009545return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ;
9547 return 0;
9548}
9549_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550for ac_lib in '' pthread rt posix4; do
9551 if test -z "$ac_lib"; then
9552 ac_res="none required"
9553 else
9554 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009555 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009556 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009557 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009560rm -f core conftest.err conftest.$ac_objext \
9561 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009562 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009563 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565done
Victor Stinnere0be4232011-10-25 13:06:09 +02009566if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009567
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568else
9569 ac_cv_search_sem_init=no
9570fi
9571rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009572LIBS=$ac_func_search_save_LIBS
9573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9575$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009577if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009578 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009579
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009580fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009581 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009582 # posix4 on Solaris 2.6
9583 # pthread (first!) on Linux
9584fi
9585
Martin v. Löwis19d17342003-06-14 21:03:05 +00009586# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9588$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009589if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009590 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009591else
9592 ac_check_lib_save_LIBS=$LIBS
9593LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009596
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009597/* Override any GCC internal prototype to avoid an error.
9598 Use char because int might match the return type of a GCC
9599 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009600#ifdef __cplusplus
9601extern "C"
9602#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009603char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009604int
9605main ()
9606{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009607return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009608 ;
9609 return 0;
9610}
9611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009612if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009613 ac_cv_lib_intl_textdomain=yes
9614else
Matthias Kloseb9621712010-04-24 17:59:49 +00009615 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009617rm -f core conftest.err conftest.$ac_objext \
9618 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009619LIBS=$ac_check_lib_save_LIBS
9620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9622$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009623if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009624
Matthias Kloseb9621712010-04-24 17:59:49 +00009625$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009626
Brett Cannonc6d936e2009-06-07 20:09:53 +00009627 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009628fi
9629
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009630
9631# checks for system dependent C++ extensions support
9632case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009633 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9634$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009636/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009637
Georg Brandl59e87bd2011-02-15 19:48:59 +00009638 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009639int
9640main ()
9641{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009642loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 ;
9644 return 0;
9645}
Matthias Kloseb159a552010-04-25 21:00:44 +00009646
Martin v. Löwis11437992002-04-12 09:54:03 +00009647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009648if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009649
Matthias Kloseb159a552010-04-25 21:00:44 +00009650
Matthias Kloseb9621712010-04-24 17:59:49 +00009651$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009652
Matthias Kloseb159a552010-04-25 21:00:44 +00009653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009654$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009655
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009656else
Matthias Kloseb159a552010-04-25 21:00:44 +00009657
9658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009659$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009660
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009662rm -f core conftest.err conftest.$ac_objext \
9663 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009664 *) ;;
9665esac
9666
Christian Heimes985ecdc2013-11-20 11:46:18 +01009667# check for systems that require aligned memory access
9668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9669$as_echo_n "checking aligned memory access is required... " >&6; }
9670if test "$cross_compiling" = yes; then :
9671 aligned_required=yes
9672else
9673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9674/* end confdefs.h. */
9675
9676int main()
9677{
9678 char s[16];
9679 int i, *p1, *p2;
9680 for (i=0; i < 16; i++)
9681 s[i] = i;
9682 p1 = (int*)(s+1);
9683 p2 = (int*)(s+2);
9684 if (*p1 == *p2)
9685 return 1;
9686 return 0;
9687}
9688
9689_ACEOF
9690if ac_fn_c_try_run "$LINENO"; then :
9691 aligned_required=no
9692else
9693 aligned_required=yes
9694fi
9695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9696 conftest.$ac_objext conftest.beam conftest.$ac_ext
9697fi
9698
9699
9700if test "$aligned_required" = yes ; then
9701
9702$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9703
9704fi
9705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9706$as_echo "$aligned_required" >&6; }
9707
9708
9709# str, bytes and memoryview hash algorithm
9710
9711
9712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9713$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9714
9715# Check whether --with-hash_algorithm was given.
9716if test "${with_hash_algorithm+set}" = set; then :
9717 withval=$with_hash_algorithm;
9718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9719$as_echo "$withval" >&6; }
9720case "$withval" in
9721 siphash24)
9722 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9723
9724 ;;
9725 fnv)
9726 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9727
9728 ;;
9729 *)
9730 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9731 ;;
9732esac
9733
9734else
9735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9736$as_echo "default" >&6; }
9737fi
9738
9739
Charles-François Natalid30b0222014-05-08 23:08:51 +01009740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9741$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9742
9743# Check whether --with-address_sanitizer was given.
9744if test "${with_address_sanitizer+set}" = set; then :
9745 withval=$with_address_sanitizer;
9746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9747$as_echo "$withval" >&6; }
9748BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9749LDFLAGS="-fsanitize=address $LDFLAGS"
9750
9751else
9752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9753$as_echo "no" >&6; }
9754fi
9755
9756
Guido van Rossum70c7f481998-03-26 18:44:10 +00009757# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9759$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009760if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009761 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009762else
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009764LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009765cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009768/* Override any GCC internal prototype to avoid an error.
9769 Use char because int might match the return type of a GCC
9770 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009771#ifdef __cplusplus
9772extern "C"
9773#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009774char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009775int
9776main ()
9777{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ;
9780 return 0;
9781}
9782_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009783if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009784 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009785else
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009787fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009788rm -f core conftest.err conftest.$ac_objext \
9789 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009790LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9793$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009794if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009795 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009796fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009797 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9799$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009800if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009801 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009802else
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009804LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808/* Override any GCC internal prototype to avoid an error.
9809 Use char because int might match the return type of a GCC
9810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009811#ifdef __cplusplus
9812extern "C"
9813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009814char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009815int
9816main ()
9817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 ;
9820 return 0;
9821}
9822_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009823if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009825else
Matthias Kloseb9621712010-04-24 17:59:49 +00009826 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009827fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009828rm -f core conftest.err conftest.$ac_objext \
9829 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009830LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009832{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9833$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009834if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009835 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009836fi
9837 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009838
Matthias Kloseb9621712010-04-24 17:59:49 +00009839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9840$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009841
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009843if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009844 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9846$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009847LIBS="$withval $LIBS"
9848
9849else
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9851$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009852fi
9853
Guido van Rossum7f43da71994-08-01 12:15:30 +00009854
Victor Stinner8291b5e2015-03-20 16:03:14 +01009855
9856
9857
9858
9859
9860
9861
9862if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9863 if test -n "$ac_tool_prefix"; then
9864 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9865set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9867$as_echo_n "checking for $ac_word... " >&6; }
9868if ${ac_cv_path_PKG_CONFIG+:} false; then :
9869 $as_echo_n "(cached) " >&6
9870else
9871 case $PKG_CONFIG in
9872 [\\/]* | ?:[\\/]*)
9873 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9874 ;;
9875 *)
9876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9877for as_dir in $PATH
9878do
9879 IFS=$as_save_IFS
9880 test -z "$as_dir" && as_dir=.
9881 for ac_exec_ext in '' $ac_executable_extensions; do
9882 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9883 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9884 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9885 break 2
9886 fi
9887done
9888 done
9889IFS=$as_save_IFS
9890
9891 ;;
9892esac
9893fi
9894PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9895if test -n "$PKG_CONFIG"; then
9896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9897$as_echo "$PKG_CONFIG" >&6; }
9898else
9899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9900$as_echo "no" >&6; }
9901fi
9902
9903
9904fi
9905if test -z "$ac_cv_path_PKG_CONFIG"; then
9906 ac_pt_PKG_CONFIG=$PKG_CONFIG
9907 # Extract the first word of "pkg-config", so it can be a program name with args.
9908set dummy pkg-config; ac_word=$2
9909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9910$as_echo_n "checking for $ac_word... " >&6; }
9911if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9912 $as_echo_n "(cached) " >&6
9913else
9914 case $ac_pt_PKG_CONFIG in
9915 [\\/]* | ?:[\\/]*)
9916 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9917 ;;
9918 *)
9919 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9920for as_dir in $PATH
9921do
9922 IFS=$as_save_IFS
9923 test -z "$as_dir" && as_dir=.
9924 for ac_exec_ext in '' $ac_executable_extensions; do
9925 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9926 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9927 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9928 break 2
9929 fi
9930done
9931 done
9932IFS=$as_save_IFS
9933
9934 ;;
9935esac
9936fi
9937ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9938if test -n "$ac_pt_PKG_CONFIG"; then
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9940$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9941else
9942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9943$as_echo "no" >&6; }
9944fi
9945
9946 if test "x$ac_pt_PKG_CONFIG" = x; then
9947 PKG_CONFIG=""
9948 else
9949 case $cross_compiling:$ac_tool_warned in
9950yes:)
9951{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9952$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9953ac_tool_warned=yes ;;
9954esac
9955 PKG_CONFIG=$ac_pt_PKG_CONFIG
9956 fi
9957else
9958 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9959fi
9960
9961fi
9962if test -n "$PKG_CONFIG"; then
9963 _pkg_min_version=0.9.0
9964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9965$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9966 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9968$as_echo "yes" >&6; }
9969 else
9970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971$as_echo "no" >&6; }
9972 PKG_CONFIG=""
9973 fi
9974fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009975
9976# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9978$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009979
9980# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009981if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009982 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009983else
9984 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009985fi
9986
9987
Matthias Kloseb9621712010-04-24 17:59:49 +00009988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9989$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009990
9991# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9993$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009994
9995# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009996if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009997 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009998else
9999 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010000fi
10001
10002
10003if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010004 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10005else
10006 LIBFFI_INCLUDEDIR=""
10007fi
10008
10009
Matthias Kloseb9621712010-04-24 17:59:49 +000010010{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10011$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010012
Stefan Krah60187b52012-03-23 19:06:27 +010010013# Check for use of the system libmpdec library
10014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10015$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10016
10017# Check whether --with-system_libmpdec was given.
10018if test "${with_system_libmpdec+set}" = set; then :
10019 withval=$with_system_libmpdec;
10020else
10021 with_system_libmpdec="no"
10022fi
10023
10024
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10026$as_echo "$with_system_libmpdec" >&6; }
10027
Benjamin Peterson076ed002010-10-31 17:11:02 +000010028# Check for support for loadable sqlite extensions
10029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10030$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10031# Check whether --enable-loadable-sqlite-extensions was given.
10032if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10033 enableval=$enable_loadable_sqlite_extensions;
10034else
10035 enable_loadable_sqlite_extensions="no"
10036fi
10037
10038
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10040$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10041
Ned Deilyd819b932013-09-06 01:07:05 -070010042# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10043
10044
10045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10046$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10047
10048# Check whether --with-tcltk-includes was given.
10049if test "${with_tcltk_includes+set}" = set; then :
10050 withval=$with_tcltk_includes;
10051else
10052 with_tcltk_includes="default"
10053fi
10054
10055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10056$as_echo "$with_tcltk_includes" >&6; }
10057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10058$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10059
10060# Check whether --with-tcltk-libs was given.
10061if test "${with_tcltk_libs+set}" = set; then :
10062 withval=$with_tcltk_libs;
10063else
10064 with_tcltk_libs="default"
10065fi
10066
10067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10068$as_echo "$with_tcltk_libs" >&6; }
10069if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10070then
10071 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10072 then
10073 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10074 fi
10075 TCLTK_INCLUDES=""
10076 TCLTK_LIBS=""
10077else
10078 TCLTK_INCLUDES="$with_tcltk_includes"
10079 TCLTK_LIBS="$with_tcltk_libs"
10080fi
10081
Matthias Klose55708cc2009-04-30 08:06:49 +000010082# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10084$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010085
10086# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010087if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010088 withval=$with_dbmliborder;
10089if test x$with_dbmliborder = xyes
10090then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010091as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010092else
10093 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10094 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10095 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010096 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010097 fi
10098 done
10099fi
10100fi
10101
Matthias Kloseb9621712010-04-24 17:59:49 +000010102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10103$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010104
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010105# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010106
10107
Matthias Kloseb9621712010-04-24 17:59:49 +000010108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10109$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010112if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010113 withval=$with_signal_module;
10114fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010115
10116
10117if test -z "$with_signal_module"
10118then with_signal_module="yes"
10119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10121$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010122
10123if test "${with_signal_module}" = "yes"; then
10124 USE_SIGNAL_MODULE=""
10125 SIGNAL_OBJS=""
10126else
10127 USE_SIGNAL_MODULE="#"
10128 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10129fi
10130
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010131# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010132
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010133USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010134
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135
Martin v. Löwis11437992002-04-12 09:54:03 +000010136
10137# Templates for things AC_DEFINEd more than once.
10138# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010139
10140
Martin v. Löwis11437992002-04-12 09:54:03 +000010141
Matthias Kloseb9621712010-04-24 17:59:49 +000010142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10143$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010145# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010146if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010147 withval=$with_threads;
10148fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010149
10150
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010151# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010154if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010155 withval=$with_thread; with_threads=$with_thread
10156fi
10157
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010158
10159if test -z "$with_threads"
10160then with_threads="yes"
10161fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10163$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010164
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010165
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010166if test "$with_threads" = "no"
10167then
10168 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010169elif test "$ac_cv_pthread_is_default" = yes
10170then
Matthias Kloseb9621712010-04-24 17:59:49 +000010171 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010172
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010173 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010174 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010175
10176 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010178elif test "$ac_cv_kpthread" = "yes"
10179then
10180 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010181 if test "$ac_cv_cxx_thread" = "yes"; then
10182 CXX="$CXX -Kpthread"
10183 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010184 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010185
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010186 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010187 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010188elif test "$ac_cv_kthread" = "yes"
10189then
10190 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010191 if test "$ac_cv_cxx_thread" = "yes"; then
10192 CXX="$CXX -Kthread"
10193 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010195
10196 posix_threads=yes
10197 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010198elif test "$ac_cv_pthread" = "yes"
10199then
10200 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010201 if test "$ac_cv_cxx_thread" = "yes"; then
10202 CXX="$CXX -pthread"
10203 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010204 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010205
10206 posix_threads=yes
10207 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010208else
10209 if test ! -z "$with_threads" -a -d "$with_threads"
10210 then LDFLAGS="$LDFLAGS -L$with_threads"
10211 fi
10212 if test ! -z "$withval" -a -d "$withval"
10213 then LDFLAGS="$LDFLAGS -L$withval"
10214 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010215
10216 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010217 # define _POSIX_THREADS in unistd.h. Some apparently don't
10218 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10220$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010222/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010223
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010224#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010225#ifdef _POSIX_THREADS
10226yes
10227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010228
10229_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010232 unistd_defines_pthreads=yes
10233else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010234 unistd_defines_pthreads=no
10235fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010236rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010237
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10239$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010240
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010242
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010243 # Just looking for pthread_create in libpthread is not enough:
10244 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10245 # So we really have to include pthread.h, and then link.
10246 _libs=$LIBS
10247 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10249$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010251/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010252
10253#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010254#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010255
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010256void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010257int
10258main ()
10259{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010260
10261pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 ;
10263 return 0;
10264}
10265_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010266if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010267
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10269$as_echo "yes" >&6; }
10270 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010271
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010272 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010273 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010274else
Martin v. Löwis11437992002-04-12 09:54:03 +000010275
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010276 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010277 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010278if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010279 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010280
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010281 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010282 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010283else
Guido van Rossumad678af1998-10-02 14:42:15 +000010284
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10286$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010287if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010289else
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010291LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010293/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295/* Override any GCC internal prototype to avoid an error.
10296 Use char because int might match the return type of a GCC
10297 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010298#ifdef __cplusplus
10299extern "C"
10300#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010301char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010302int
10303main ()
10304{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010305return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010306 ;
10307 return 0;
10308}
10309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010310if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010312else
Matthias Kloseb9621712010-04-24 17:59:49 +000010313 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010315rm -f core conftest.err conftest.$ac_objext \
10316 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010317LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010318fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10320$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010321if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010322 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010323
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010324 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010325 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010326 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010327else
Greg Steinadf63d62000-07-05 10:38:09 +000010328
Matthias Kloseb9621712010-04-24 17:59:49 +000010329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10330$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010331if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010333else
Martin v. Löwis11437992002-04-12 09:54:03 +000010334 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010335LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010339/* Override any GCC internal prototype to avoid an error.
10340 Use char because int might match the return type of a GCC
10341 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010342#ifdef __cplusplus
10343extern "C"
10344#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010345char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010346int
10347main ()
10348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010349return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010350 ;
10351 return 0;
10352}
10353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010354if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010356else
Matthias Kloseb9621712010-04-24 17:59:49 +000010357 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010358fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010359rm -f core conftest.err conftest.$ac_objext \
10360 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010361LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10364$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010365if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010366 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010367
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010368 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010369 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010370 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010371else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010372
Matthias Kloseb9621712010-04-24 17:59:49 +000010373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10374$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010375if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010377else
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010379LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010380cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010381/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010382
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383/* Override any GCC internal prototype to avoid an error.
10384 Use char because int might match the return type of a GCC
10385 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010386#ifdef __cplusplus
10387extern "C"
10388#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010389char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010390int
10391main ()
10392{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010393return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 ;
10395 return 0;
10396}
10397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010398if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010400else
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010402fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010403rm -f core conftest.err conftest.$ac_objext \
10404 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010405LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010406fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10408$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010409if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010410 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010411
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010412 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010413 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010414 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010415else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010416
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10418$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010419if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010421else
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010423LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010425/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010427/* Override any GCC internal prototype to avoid an error.
10428 Use char because int might match the return type of a GCC
10429 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010430#ifdef __cplusplus
10431extern "C"
10432#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010433char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010434int
10435main ()
10436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010438 ;
10439 return 0;
10440}
10441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010442if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010444else
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010447rm -f core conftest.err conftest.$ac_objext \
10448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010449LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10452$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010453if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010454 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010455
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010456 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010457 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010458 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010459else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010460
Martin v. Löwis130fb172001-07-19 11:00:41 +000010461 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010462fi
10463
Guido van Rossum627b2d71993-12-24 10:39:16 +000010464
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010465fi
10466
Guido van Rossum0be3e491997-05-22 20:33:33 +000010467fi
10468
Guido van Rossum49545951997-12-02 19:28:29 +000010469fi
10470
Guido van Rossumb93a8621998-05-07 13:27:32 +000010471fi
10472
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010473fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010474rm -f core conftest.err conftest.$ac_objext \
10475 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010476
Matthias Kloseb9621712010-04-24 17:59:49 +000010477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10478$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010479if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010480 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010481else
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010483LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010485/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010487/* Override any GCC internal prototype to avoid an error.
10488 Use char because int might match the return type of a GCC
10489 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010490#ifdef __cplusplus
10491extern "C"
10492#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010493char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010494int
10495main ()
10496{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010497return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010498 ;
10499 return 0;
10500}
10501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010502if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010503 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010504else
Matthias Kloseb9621712010-04-24 17:59:49 +000010505 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010506fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010507rm -f core conftest.err conftest.$ac_objext \
10508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010509LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010510fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10512$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010513if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010514 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010515
Martin v. Löwis130fb172001-07-19 11:00:41 +000010516 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010517 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010518 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010519fi
10520
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010521
Neal Norwitza978ab02002-11-02 16:58:05 +000010522 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10524$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010525if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010527else
Martin v. Löwis11437992002-04-12 09:54:03 +000010528 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010529LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010533/* Override any GCC internal prototype to avoid an error.
10534 Use char because int might match the return type of a GCC
10535 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010536#ifdef __cplusplus
10537extern "C"
10538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010539char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010540int
10541main ()
10542{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010543return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010544 ;
10545 return 0;
10546}
10547_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010548if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010549 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010550else
Matthias Kloseb9621712010-04-24 17:59:49 +000010551 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010552fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010553rm -f core conftest.err conftest.$ac_objext \
10554 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010555LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010556fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10558$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010559if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010560 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010561
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010562 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010563 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010564 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010565fi
10566
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010567 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010568fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010569
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010570if test "$posix_threads" = "yes"; then
10571 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010572
Matthias Kloseb9621712010-04-24 17:59:49 +000010573$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010574
10575 fi
10576
10577 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10578 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010579 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010580$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010581
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010582 ;;
10583 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010584$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010585
10586 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010587 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010588$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010589
10590 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010591 esac
10592
Matthias Kloseb9621712010-04-24 17:59:49 +000010593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10594$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010595 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010597else
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010599 ac_cv_pthread_system_supported=no
10600else
Matthias Kloseb9621712010-04-24 17:59:49 +000010601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010602/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010603
10604 #include <stdio.h>
10605 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010606 void *foo(void *parm) {
10607 return NULL;
10608 }
10609 main() {
10610 pthread_attr_t attr;
10611 pthread_t id;
10612 if (pthread_attr_init(&attr)) exit(-1);
10613 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10614 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10615 exit(0);
10616 }
10617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010618if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010619 ac_cv_pthread_system_supported=yes
10620else
Matthias Kloseb9621712010-04-24 17:59:49 +000010621 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010622fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010623rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10624 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010625fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010626
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010627
Guido van Rossum627b2d71993-12-24 10:39:16 +000010628fi
10629
Matthias Kloseb9621712010-04-24 17:59:49 +000010630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10631$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010632 if test "$ac_cv_pthread_system_supported" = "yes"; then
10633
Matthias Kloseb9621712010-04-24 17:59:49 +000010634$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010635
10636 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 for ac_func in pthread_sigmask
10638do :
10639 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010640if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010641 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010642#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010643_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010644 case $ac_sys_system in
10645 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010646
Matthias Kloseb9621712010-04-24 17:59:49 +000010647$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010648
10649 ;;
10650 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010651fi
10652done
10653
Christian Heimesf77b4b22013-08-21 13:26:05 +020010654 for ac_func in pthread_atfork
10655do :
10656 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10657if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10658 cat >>confdefs.h <<_ACEOF
10659#define HAVE_PTHREAD_ATFORK 1
10660_ACEOF
10661
10662fi
10663done
10664
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010665fi
10666
10667
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010668# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010669
Matthias Kloseb9621712010-04-24 17:59:49 +000010670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10671$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010672# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010673if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010675 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10677$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010678 ipv6=no
10679 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010680 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10681$as_echo "yes" >&6; }
10682 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010683
10684 ipv6=yes
10685 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010686 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010687else
Martin v. Löwis11437992002-04-12 09:54:03 +000010688
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010690/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010691 /* AF_INET6 available check */
10692#include <sys/types.h>
10693#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010694int
10695main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010696{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010697int domain = AF_INET6;
10698 ;
10699 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010700}
Martin v. Löwis11437992002-04-12 09:54:03 +000010701_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010702if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010703
Matthias Kloseb9621712010-04-24 17:59:49 +000010704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10705$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010706 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010707
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010708else
Matthias Kloseb159a552010-04-25 21:00:44 +000010709
Matthias Kloseb9621712010-04-24 17:59:49 +000010710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10711$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010712 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010713
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010714fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010716
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010717if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10719$as_echo_n "checking if RFC2553 API is available... " >&6; }
10720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010721/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010722
10723 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010724#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010725int
10726main ()
10727{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010728struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010729 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010730 ;
10731 return 0;
10732}
Matthias Kloseb159a552010-04-25 21:00:44 +000010733
Martin v. Löwis11437992002-04-12 09:54:03 +000010734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010735if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010736
10737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010738$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010739 ipv6=yes
10740
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010741else
Matthias Kloseb159a552010-04-25 21:00:44 +000010742
10743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010745 ipv6=no
10746
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010749fi
10750
10751if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010752 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010753
10754fi
10755
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010756fi
10757
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010758
10759ipv6type=unknown
10760ipv6lib=none
10761ipv6trylibc=no
10762
10763if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010764 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10765$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010766 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10767 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010768 case $i in
10769 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010771/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010772
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010773#include <netinet/in.h>
10774#ifdef IPV6_INRIA_VERSION
10775yes
10776#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010777_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010779 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010780 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010781fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010782rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010783
10784 ;;
10785 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010787/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010788
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010789#include <netinet/in.h>
10790#ifdef __KAME__
10791yes
10792#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010793_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010794if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010796 ipv6type=$i;
10797 ipv6lib=inet6
10798 ipv6libdir=/usr/local/v6/lib
10799 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010800fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010801rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802
10803 ;;
10804 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010806/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010807
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010808#include <features.h>
10809#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10810yes
10811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010812_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010815 ipv6type=$i;
10816 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010817fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010818rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010819
10820 ;;
10821 linux-inet6)
10822 if test -d /usr/inet6; then
10823 ipv6type=$i
10824 ipv6lib=inet6
10825 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010826 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827 fi
10828 ;;
10829 solaris)
10830 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010831 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010832 ipv6type=$i
10833 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010834 fi
10835 fi
10836 ;;
10837 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010839/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010840
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841#include <sys/param.h>
10842#ifdef _TOSHIBA_INET6
10843yes
10844#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010845_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010847 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010848 ipv6type=$i;
10849 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010850 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010852rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010853
10854 ;;
10855 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010857/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010858
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010859#include </usr/local/v6/include/sys/v6config.h>
10860#ifdef __V6D__
10861yes
10862#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010863_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010864if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010865 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010866 ipv6type=$i;
10867 ipv6lib=v6;
10868 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010869 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010870fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010871rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010872
10873 ;;
10874 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010876/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010877
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010878#include <sys/param.h>
10879#ifdef _ZETA_MINAMI_INET6
10880yes
10881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010882_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010883if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010884 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010885 ipv6type=$i;
10886 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010887 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010889rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010890
10891 ;;
10892 esac
10893 if test "$ipv6type" != "unknown"; then
10894 break
10895 fi
10896 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10898$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010899fi
10900
10901if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10902 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10903 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10904 echo "using lib$ipv6lib"
10905 else
10906 if test $ipv6trylibc = "yes"; then
10907 echo "using libc"
10908 else
10909 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10910 echo "You need to fetch lib$ipv6lib.a from appropriate"
10911 echo 'ipv6 kit and compile beforehand.'
10912 exit 1
10913 fi
10914 fi
10915fi
10916
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10918$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10920/* end confdefs.h. */
10921 /* CAN_RAW_FD_FRAMES available check */
10922#include <linux/can/raw.h>
10923int
10924main ()
10925{
10926int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10927 ;
10928 return 0;
10929}
10930_ACEOF
10931if ac_fn_c_try_compile "$LINENO"; then :
10932
10933
10934$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10935
10936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10937$as_echo "yes" >&6; }
10938
10939else
10940
10941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10942$as_echo "no" >&6; }
10943
10944fi
10945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10946
Matthias Kloseb9621712010-04-24 17:59:49 +000010947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10948$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010950/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010951
10952 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010953int
10954main ()
10955{
10956FSIORefNum fRef = 0
10957 ;
10958 return 0;
10959}
Matthias Kloseb159a552010-04-25 21:00:44 +000010960
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010962if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010963
Matthias Kloseb159a552010-04-25 21:00:44 +000010964
Matthias Kloseb9621712010-04-24 17:59:49 +000010965$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010966
Matthias Kloseb9621712010-04-24 17:59:49 +000010967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10968$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010969
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010970else
Matthias Kloseb159a552010-04-25 21:00:44 +000010971
Matthias Kloseb9621712010-04-24 17:59:49 +000010972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10973$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010974
10975fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10977
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010978# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10980$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010982# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010983if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010984 withval=$with_doc_strings;
10985fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010986
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010987
10988if test -z "$with_doc_strings"
10989then with_doc_strings="yes"
10990fi
10991if test "$with_doc_strings" != "no"
10992then
10993
Matthias Kloseb9621712010-04-24 17:59:49 +000010994$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010995
10996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10998$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010999
Antoine Pitrou042b1282010-08-13 21:15:58 +000011000# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
11002$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011005if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011006 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011007if test "$withval" != no
11008then
11009
Matthias Kloseb9621712010-04-24 17:59:49 +000011010$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011011
Matthias Kloseb9621712010-04-24 17:59:49 +000011012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11013$as_echo "yes" >&6; }
11014else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11015$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011016fi
11017else
Matthias Kloseb9621712010-04-24 17:59:49 +000011018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11019$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011020fi
11021
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011022
11023# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11025$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011027# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011028if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029 withval=$with_pymalloc;
11030fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011031
Neil Schemenauera35c6882001-02-27 04:45:05 +000011032
Neil Schemenauer16c22972002-03-22 15:34:49 +000011033if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011034then
11035 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011036fi
11037if test "$with_pymalloc" != "no"
11038then
Martin v. Löwis11437992002-04-12 09:54:03 +000011039
Matthias Kloseb9621712010-04-24 17:59:49 +000011040$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011041
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011042 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011043fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11045$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011046
Benjamin Peterson05159c42009-12-03 03:01:27 +000011047# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11049$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011050
11051# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011053 withval=$with_valgrind;
11054else
11055 with_valgrind=no
11056fi
11057
Matthias Kloseb9621712010-04-24 17:59:49 +000011058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11059$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011060if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011061 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 +020011062if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011063
Matthias Kloseb9621712010-04-24 17:59:49 +000011064$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011065
11066else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011067 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011068
11069fi
11070
11071
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011072 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011073fi
11074
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011075# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011076
Guido van Rossum98935bf2001-09-05 19:13:16 +000011077DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011078
Guido van Rossume97ee181999-12-20 21:27:22 +000011079# the dlopen() function means we might want to use dynload_shlib.o. some
11080# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011081for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011082do :
11083 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011084if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011085 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011086#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011087_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011088
Guido van Rossume97ee181999-12-20 21:27:22 +000011089fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011090done
Guido van Rossume97ee181999-12-20 21:27:22 +000011091
Michael W. Hudson54241132001-12-07 15:38:26 +000011092
Guido van Rossume97ee181999-12-20 21:27:22 +000011093# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11094# loading of modules.
11095
Matthias Kloseb9621712010-04-24 17:59:49 +000011096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11097$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011098if test -z "$DYNLOADFILE"
11099then
11100 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011101 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11102 if test "$ac_cv_func_dlopen" = yes
11103 then DYNLOADFILE="dynload_shlib.o"
11104 else DYNLOADFILE="dynload_aix.o"
11105 fi
11106 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011107 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011108 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11109 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011110 *)
11111 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11112 # out any dynamic loading
11113 if test "$ac_cv_func_dlopen" = yes
11114 then DYNLOADFILE="dynload_shlib.o"
11115 else DYNLOADFILE="dynload_stub.o"
11116 fi
11117 ;;
11118 esac
11119fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11121$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011122if test "$DYNLOADFILE" != "dynload_stub.o"
11123then
Martin v. Löwis11437992002-04-12 09:54:03 +000011124
Matthias Kloseb9621712010-04-24 17:59:49 +000011125$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011126
11127fi
11128
Neil Schemenauer4e425612001-06-19 15:44:15 +000011129# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11130
Michael W. Hudson54241132001-12-07 15:38:26 +000011131
Matthias Kloseb9621712010-04-24 17:59:49 +000011132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11133$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011134if test -z "$MACHDEP_OBJS"
11135then
Jack Jansene578a632001-08-15 01:27:14 +000011136 MACHDEP_OBJS=$extra_machdep_objs
11137else
11138 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011139fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011140if test -z "$MACHDEP_OBJS"; then
11141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11142$as_echo "none" >&6; }
11143else
11144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11145$as_echo "$MACHDEP_OBJS" >&6; }
11146fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011147
Guido van Rossum627b2d71993-12-24 10:39:16 +000011148# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011149for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011150 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011151 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011152 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011153 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011154 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011155 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011156 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11157 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011158 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011159 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011160 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011161 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011162 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011163 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011164 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11165 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011166 sigaction sigaltstack siginterrupt sigpending sigrelse \
11167 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011168 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011169 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011170 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011171do :
11172 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11173ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011174if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011175 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011176#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011177_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011178
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011179fi
11180done
11181
Michael W. Hudson54241132001-12-07 15:38:26 +000011182
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011183ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11184 #include <dirent.h>
11185"
11186if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11187
11188$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11189
11190fi
11191
11192
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011193# For some functions, having a definition is not sufficient, since
11194# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11196$as_echo_n "checking for chroot... " >&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=chroot
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_CHROOT 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 link" >&5
11221$as_echo_n "checking for link... " >&6; }
11222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011223/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011224#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011225int
11226main ()
11227{
11228void *x=link
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öwisc8ad7cc2002-11-11 13:23:45 +000011234
Matthias Kloseb9621712010-04-24 17:59:49 +000011235$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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 symlink" >&5
11246$as_echo_n "checking for symlink... " >&6; }
11247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011248/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011249#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011250int
11251main ()
11252{
11253void *x=symlink
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öwisc8ad7cc2002-11-11 13:23:45 +000011259
Matthias Kloseb9621712010-04-24 17:59:49 +000011260$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +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 fchdir" >&5
11271$as_echo_n "checking for fchdir... " >&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=fchdir
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_FCHDIR 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 fsync" >&5
11296$as_echo_n "checking for fsync... " >&6; }
11297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011298/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011299#include <unistd.h>
11300int
11301main ()
11302{
11303void *x=fsync
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öwisa64988c2003-09-20 15:30:20 +000011309
Matthias Kloseb9621712010-04-24 17:59:49 +000011310$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +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; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011314else
Matthias Kloseb9621712010-04-24 17:59:49 +000011315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11316$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011317
11318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11321$as_echo_n "checking for fdatasync... " >&6; }
11322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011323/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011324#include <unistd.h>
11325int
11326main ()
11327{
11328void *x=fdatasync
11329 ;
11330 return 0;
11331}
11332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011334
Matthias Kloseb9621712010-04-24 17:59:49 +000011335$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011336
Matthias Kloseb159a552010-04-25 21:00:44 +000011337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011338$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011339else
Matthias Kloseb9621712010-04-24 17:59:49 +000011340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11341$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011342
11343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011344rm -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 epoll" >&5
11346$as_echo_n "checking for epoll... " >&6; }
11347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011348/* end confdefs.h. */
11349#include <sys/epoll.h>
11350int
11351main ()
11352{
11353void *x=epoll_create
11354 ;
11355 return 0;
11356}
11357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011359
Matthias Kloseb9621712010-04-24 17:59:49 +000011360$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011361
Matthias Kloseb159a552010-04-25 21:00:44 +000011362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011363$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011364else
Matthias Kloseb9621712010-04-24 17:59:49 +000011365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11366$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011367
11368fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11371$as_echo_n "checking for epoll_create1... " >&6; }
11372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11373/* end confdefs.h. */
11374#include <sys/epoll.h>
11375int
11376main ()
11377{
11378void *x=epoll_create1
11379 ;
11380 return 0;
11381}
11382_ACEOF
11383if ac_fn_c_try_compile "$LINENO"; then :
11384
11385$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11386
11387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11388$as_echo "yes" >&6; }
11389else
11390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
11392
11393fi
11394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11396$as_echo_n "checking for kqueue... " >&6; }
11397cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011398/* end confdefs.h. */
11399
11400#include <sys/types.h>
11401#include <sys/event.h>
11402
11403int
11404main ()
11405{
11406int x=kqueue()
11407 ;
11408 return 0;
11409}
11410_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011411if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011412
Matthias Kloseb9621712010-04-24 17:59:49 +000011413$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011414
Matthias Kloseb159a552010-04-25 21:00:44 +000011415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011416$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011417else
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11419$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011420
11421fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11424$as_echo_n "checking for prlimit... " >&6; }
11425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11426/* end confdefs.h. */
11427
11428#include <sys/time.h>
11429#include <sys/resource.h>
11430
11431int
11432main ()
11433{
11434void *x=prlimit
11435 ;
11436 return 0;
11437}
11438_ACEOF
11439if ac_fn_c_try_compile "$LINENO"; then :
11440
11441$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11442
11443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11444$as_echo "yes" >&6; }
11445else
11446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11447$as_echo "no" >&6; }
11448
11449fi
11450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11451
Martin v. Löwisd5843682002-11-21 20:41:28 +000011452# On some systems (eg. FreeBSD 5), we would find a definition of the
11453# functions ctermid_r, setgroups in the library, but no prototype
11454# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11455# address to avoid compiler warnings and potential miscompilations
11456# because of the missing prototypes.
11457
Matthias Kloseb9621712010-04-24 17:59:49 +000011458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11459$as_echo_n "checking for ctermid_r... " >&6; }
11460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011461/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011462
Martin v. Löwisd5843682002-11-21 20:41:28 +000011463#include <stdio.h>
11464
Martin v. Löwisd5843682002-11-21 20:41:28 +000011465int
11466main ()
11467{
11468void* p = ctermid_r
11469 ;
11470 return 0;
11471}
11472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011473if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011474
Matthias Kloseb9621712010-04-24 17:59:49 +000011475$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011476
Matthias Kloseb159a552010-04-25 21:00:44 +000011477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011478$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011479else
Matthias Kloseb9621712010-04-24 17:59:49 +000011480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11481$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011482
11483fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011484rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11485
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11487$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011488if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011489 $as_echo_n "(cached) " >&6
11490else
11491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011492/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011493#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011494int
11495main ()
11496{
11497void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011498
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011499 ;
11500 return 0;
11501}
11502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011503if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011504 ac_cv_flock_decl=yes
11505else
11506 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011507
11508fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011510
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011511fi
11512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11513$as_echo "$ac_cv_flock_decl" >&6; }
11514if test "x${ac_cv_flock_decl}" = xyes; then
11515 for ac_func in flock
11516do :
11517 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011518if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011519 cat >>confdefs.h <<_ACEOF
11520#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011521_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011522
Antoine Pitroua3000072010-09-07 14:52:42 +000011523else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011525$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011526if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011527 $as_echo_n "(cached) " >&6
11528else
11529 ac_check_lib_save_LIBS=$LIBS
11530LIBS="-lbsd $LIBS"
11531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11532/* end confdefs.h. */
11533
11534/* Override any GCC internal prototype to avoid an error.
11535 Use char because int might match the return type of a GCC
11536 builtin and then its argument prototype would still apply. */
11537#ifdef __cplusplus
11538extern "C"
11539#endif
11540char flock ();
11541int
11542main ()
11543{
11544return flock ();
11545 ;
11546 return 0;
11547}
11548_ACEOF
11549if ac_fn_c_try_link "$LINENO"; then :
11550 ac_cv_lib_bsd_flock=yes
11551else
11552 ac_cv_lib_bsd_flock=no
11553fi
11554rm -f core conftest.err conftest.$ac_objext \
11555 conftest$ac_exeext conftest.$ac_ext
11556LIBS=$ac_check_lib_save_LIBS
11557fi
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11559$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011560if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011561 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011562
11563
11564$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11565
11566
11567fi
11568
11569
11570fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011571done
11572
Antoine Pitroua3000072010-09-07 14:52:42 +000011573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011574
Matthias Kloseb9621712010-04-24 17:59:49 +000011575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11576$as_echo_n "checking for getpagesize... " >&6; }
11577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011578/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011579
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011580#include <unistd.h>
11581
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011582int
11583main ()
11584{
11585void* p = getpagesize
11586 ;
11587 return 0;
11588}
11589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011590if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011591
Matthias Kloseb9621712010-04-24 17:59:49 +000011592$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011593
Matthias Kloseb159a552010-04-25 21:00:44 +000011594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011595$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011596else
Matthias Kloseb9621712010-04-24 17:59:49 +000011597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11598$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011599
11600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011602
Victor Stinner984890f2011-11-24 13:53:38 +010011603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11604$as_echo_n "checking for broken unsetenv... " >&6; }
11605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11606/* end confdefs.h. */
11607
11608#include <stdlib.h>
11609
11610int
11611main ()
11612{
11613int res = unsetenv("DUMMY")
11614 ;
11615 return 0;
11616}
11617_ACEOF
11618if ac_fn_c_try_compile "$LINENO"; then :
11619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11620$as_echo "no" >&6; }
11621else
11622
11623$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11624
11625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11626$as_echo "yes" >&6; }
11627
11628fi
11629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11630
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011631for ac_prog in true
11632do
11633 # Extract the first word of "$ac_prog", so it can be a program name with args.
11634set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11636$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011637if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011638 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011639else
11640 if test -n "$TRUE"; then
11641 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11642else
11643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11644for as_dir in $PATH
11645do
11646 IFS=$as_save_IFS
11647 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011648 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011649 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011650 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011651 $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 +000011652 break 2
11653 fi
11654done
Matthias Kloseb9621712010-04-24 17:59:49 +000011655 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011657
11658fi
11659fi
11660TRUE=$ac_cv_prog_TRUE
11661if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11663$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011664else
Matthias Kloseb9621712010-04-24 17:59:49 +000011665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11666$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011667fi
11668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011669
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011670 test -n "$TRUE" && break
11671done
11672test -n "$TRUE" || TRUE="/bin/true"
11673
11674
Matthias Kloseb9621712010-04-24 17:59:49 +000011675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11676$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011677if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011678 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011679else
11680 ac_check_lib_save_LIBS=$LIBS
11681LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011683/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011685/* Override any GCC internal prototype to avoid an error.
11686 Use char because int might match the return type of a GCC
11687 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011688#ifdef __cplusplus
11689extern "C"
11690#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011691char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011692int
11693main ()
11694{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011695return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011696 ;
11697 return 0;
11698}
11699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011700if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011701 ac_cv_lib_c_inet_aton=yes
11702else
Matthias Kloseb9621712010-04-24 17:59:49 +000011703 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011704fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011705rm -f core conftest.err conftest.$ac_objext \
11706 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011707LIBS=$ac_check_lib_save_LIBS
11708fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11710$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011711if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011712 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011713else
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11715$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011716if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011717 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011718else
11719 ac_check_lib_save_LIBS=$LIBS
11720LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011722/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011724/* Override any GCC internal prototype to avoid an error.
11725 Use char because int might match the return type of a GCC
11726 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011727#ifdef __cplusplus
11728extern "C"
11729#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011730char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011731int
11732main ()
11733{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011734return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011735 ;
11736 return 0;
11737}
11738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011739if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011740 ac_cv_lib_resolv_inet_aton=yes
11741else
Matthias Kloseb9621712010-04-24 17:59:49 +000011742 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011744rm -f core conftest.err conftest.$ac_objext \
11745 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011746LIBS=$ac_check_lib_save_LIBS
11747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11749$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011750if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011751 cat >>confdefs.h <<_ACEOF
11752#define HAVE_LIBRESOLV 1
11753_ACEOF
11754
11755 LIBS="-lresolv $LIBS"
11756
11757fi
11758
11759
11760fi
11761
11762
Christian Heimesd0764e22007-12-04 15:00:33 +000011763# On Tru64, chflags seems to be present, but calling it will
11764# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11766$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011767if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011769else
Matthias Kloseb9621712010-04-24 17:59:49 +000011770 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011771 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011772else
Matthias Kloseb9621712010-04-24 17:59:49 +000011773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011774/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011775
Christian Heimesd0764e22007-12-04 15:00:33 +000011776#include <sys/stat.h>
11777#include <unistd.h>
11778int main(int argc, char*argv[])
11779{
11780 if(chflags(argv[0], 0) != 0)
11781 return 1;
11782 return 0;
11783}
Ned Deily3eb67d52011-06-28 00:00:28 -070011784
Christian Heimesd0764e22007-12-04 15:00:33 +000011785_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011786if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011787 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011788else
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011790fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11792 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011793fi
11794
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011795
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11798$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011799if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011800 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011801if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011802 ac_cv_have_chflags="yes"
11803else
11804 ac_cv_have_chflags="no"
11805fi
11806
11807fi
11808if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011809
Matthias Kloseb9621712010-04-24 17:59:49 +000011810$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011811
11812fi
11813
Matthias Kloseb9621712010-04-24 17:59:49 +000011814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11815$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011816if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011817 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011818else
Matthias Kloseb9621712010-04-24 17:59:49 +000011819 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011820 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011821else
Matthias Kloseb9621712010-04-24 17:59:49 +000011822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011823/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011824
Christian Heimesd0764e22007-12-04 15:00:33 +000011825#include <sys/stat.h>
11826#include <unistd.h>
11827int main(int argc, char*argv[])
11828{
11829 if(lchflags(argv[0], 0) != 0)
11830 return 1;
11831 return 0;
11832}
Ned Deily3eb67d52011-06-28 00:00:28 -070011833
Christian Heimesd0764e22007-12-04 15:00:33 +000011834_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011835if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011836 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011837else
Matthias Kloseb9621712010-04-24 17:59:49 +000011838 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011839fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11841 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011842fi
11843
11844
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011845fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11847$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011848if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011849 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011850if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011851 ac_cv_have_lchflags="yes"
11852else
11853 ac_cv_have_lchflags="no"
11854fi
11855
11856fi
11857if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011860
11861fi
11862
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011863case $ac_sys_system/$ac_sys_release in
11864Darwin/*)
11865 _CUR_CFLAGS="${CFLAGS}"
11866 _CUR_LDFLAGS="${LDFLAGS}"
11867 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11868 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11869 ;;
11870esac
11871
Matthias Kloseb9621712010-04-24 17:59:49 +000011872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11873$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011874if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011875 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011876else
11877 ac_check_lib_save_LIBS=$LIBS
11878LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011879cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011880/* end confdefs.h. */
11881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011882/* Override any GCC internal prototype to avoid an error.
11883 Use char because int might match the return type of a GCC
11884 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011885#ifdef __cplusplus
11886extern "C"
11887#endif
11888char inflateCopy ();
11889int
11890main ()
11891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011892return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011893 ;
11894 return 0;
11895}
11896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011897if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011898 ac_cv_lib_z_inflateCopy=yes
11899else
Matthias Kloseb9621712010-04-24 17:59:49 +000011900 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011901fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011902rm -f core conftest.err conftest.$ac_objext \
11903 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011904LIBS=$ac_check_lib_save_LIBS
11905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11907$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011908if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011909
Matthias Kloseb9621712010-04-24 17:59:49 +000011910$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011911
11912fi
11913
11914
11915case $ac_sys_system/$ac_sys_release in
11916Darwin/*)
11917 CFLAGS="${_CUR_CFLAGS}"
11918 LDFLAGS="${_CUR_LDFLAGS}"
11919 ;;
11920esac
11921
Matthias Kloseb9621712010-04-24 17:59:49 +000011922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11923$as_echo_n "checking for hstrerror... " >&6; }
11924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011925/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011926
Martin v. Löwise9416172003-05-03 10:12:45 +000011927#include <netdb.h>
11928
Martin v. Löwise9416172003-05-03 10:12:45 +000011929int
11930main ()
11931{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011932void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011933 ;
11934 return 0;
11935}
11936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011937if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011938
Matthias Kloseb9621712010-04-24 17:59:49 +000011939$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011940
Matthias Kloseb159a552010-04-25 21:00:44 +000011941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011942$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011943else
Matthias Kloseb9621712010-04-24 17:59:49 +000011944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11945$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011946
11947fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011948rm -f core conftest.err conftest.$ac_objext \
11949 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011950
Matthias Kloseb9621712010-04-24 17:59:49 +000011951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11952$as_echo_n "checking for inet_aton... " >&6; }
11953cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011954/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011955
Martin v. Löwis86d66262006-02-17 08:40:11 +000011956#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011957#include <sys/socket.h>
11958#include <netinet/in.h>
11959#include <arpa/inet.h>
11960
Martin v. Löwise9416172003-05-03 10:12:45 +000011961int
11962main ()
11963{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011964void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011965 ;
11966 return 0;
11967}
11968_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011969if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011970
Matthias Kloseb9621712010-04-24 17:59:49 +000011971$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011972
Matthias Kloseb159a552010-04-25 21:00:44 +000011973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011974$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011975else
Matthias Kloseb9621712010-04-24 17:59:49 +000011976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11977$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011978
11979fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011980rm -f core conftest.err conftest.$ac_objext \
11981 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982
Matthias Kloseb9621712010-04-24 17:59:49 +000011983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11984$as_echo_n "checking for inet_pton... " >&6; }
11985cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011986/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011987
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011988#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011989#include <sys/socket.h>
11990#include <netinet/in.h>
11991#include <arpa/inet.h>
11992
Martin v. Löwise9416172003-05-03 10:12:45 +000011993int
11994main ()
11995{
11996void* p = inet_pton
11997 ;
11998 return 0;
11999}
12000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012001if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012004
Matthias Kloseb159a552010-04-25 21:00:44 +000012005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012006$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012007else
Matthias Kloseb9621712010-04-24 17:59:49 +000012008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12009$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012010
12011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012013
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012014# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12016$as_echo_n "checking for setgroups... " >&6; }
12017cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012018/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012019
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012020#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012021#ifdef HAVE_GRP_H
12022#include <grp.h>
12023#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012024
Martin v. Löwisd5843682002-11-21 20:41:28 +000012025int
12026main ()
12027{
12028void* p = setgroups
12029 ;
12030 return 0;
12031}
12032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012033if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012034
Matthias Kloseb9621712010-04-24 17:59:49 +000012035$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012036
Matthias Kloseb159a552010-04-25 21:00:44 +000012037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012038$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012039else
Matthias Kloseb9621712010-04-24 17:59:49 +000012040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12041$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012042
12043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012045
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012046# check for openpty and forkpty
12047
12048for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012049do :
12050 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012051if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012052 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012053#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012054_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012055
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012056else
Matthias Kloseb9621712010-04-24 17:59:49 +000012057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12058$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012059if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012060 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012061else
Martin v. Löwis11437992002-04-12 09:54:03 +000012062 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012063LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067/* Override any GCC internal prototype to avoid an error.
12068 Use char because int might match the return type of a GCC
12069 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012070#ifdef __cplusplus
12071extern "C"
12072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012073char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012074int
12075main ()
12076{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012077return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 ;
12079 return 0;
12080}
12081_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012082if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012083 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012086fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012087rm -f core conftest.err conftest.$ac_objext \
12088 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012089LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12092$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012093if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012094 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012095 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012096else
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12098$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012099if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012100 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012101else
12102 ac_check_lib_save_LIBS=$LIBS
12103LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012104cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012105/* end confdefs.h. */
12106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012107/* Override any GCC internal prototype to avoid an error.
12108 Use char because int might match the return type of a GCC
12109 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012110#ifdef __cplusplus
12111extern "C"
12112#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012113char openpty ();
12114int
12115main ()
12116{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012118 ;
12119 return 0;
12120}
12121_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012122if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012123 ac_cv_lib_bsd_openpty=yes
12124else
Matthias Kloseb9621712010-04-24 17:59:49 +000012125 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012127rm -f core conftest.err conftest.$ac_objext \
12128 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012129LIBS=$ac_check_lib_save_LIBS
12130fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12132$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012133if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012134 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012135 LIBS="$LIBS -lbsd"
12136fi
12137
12138
12139fi
12140
Fred Drake8cef4cf2000-06-28 16:40:38 +000012141
12142fi
12143done
12144
12145for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012146do :
12147 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012148if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012150#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012151_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012152
Fred Drake8cef4cf2000-06-28 16:40:38 +000012153else
Matthias Kloseb9621712010-04-24 17:59:49 +000012154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12155$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012156if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012157 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012158else
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012160LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012162/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012164/* Override any GCC internal prototype to avoid an error.
12165 Use char because int might match the return type of a GCC
12166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012167#ifdef __cplusplus
12168extern "C"
12169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012170char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012171int
12172main ()
12173{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012174return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 ;
12176 return 0;
12177}
12178_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012179if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012181else
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012184rm -f core conftest.err conftest.$ac_objext \
12185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012186LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012187fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12189$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012190if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012191 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012192 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12195$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012196if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012197 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012198else
12199 ac_check_lib_save_LIBS=$LIBS
12200LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012202/* end confdefs.h. */
12203
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012204/* Override any GCC internal prototype to avoid an error.
12205 Use char because int might match the return type of a GCC
12206 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012207#ifdef __cplusplus
12208extern "C"
12209#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012210char forkpty ();
12211int
12212main ()
12213{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012214return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012215 ;
12216 return 0;
12217}
12218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012219if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012220 ac_cv_lib_bsd_forkpty=yes
12221else
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012223fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012224rm -f core conftest.err conftest.$ac_objext \
12225 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012226LIBS=$ac_check_lib_save_LIBS
12227fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12229$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012230if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012232 LIBS="$LIBS -lbsd"
12233fi
12234
12235
12236fi
12237
Fred Drake8cef4cf2000-06-28 16:40:38 +000012238
12239fi
12240done
12241
Jack Jansendd19cf82001-12-06 22:36:17 +000012242
Christian Heimesb186d002008-03-18 15:15:01 +000012243# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012244for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012245do :
12246 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012247if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012248 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012249#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012250_ACEOF
12251
12252fi
12253done
12254
12255
Michael W. Hudson54241132001-12-07 15:38:26 +000012256# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012257for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012258do :
12259 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12260ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012261if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012262 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012263#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012264_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012265
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012266fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012267done
12268
Michael W. Hudson54241132001-12-07 15:38:26 +000012269
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012270ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012271if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012272 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012273
Martin v. Löwis1142de32002-03-29 16:28:31 +000012274else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012275 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012276 *" dup2.$ac_objext "* ) ;;
12277 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012279esac
12280
Martin v. Löwis1142de32002-03-29 16:28:31 +000012281fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012282
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012283ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012284if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012285 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12286
12287else
12288 case " $LIBOBJS " in
12289 *" strdup.$ac_objext "* ) ;;
12290 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12291 ;;
12292esac
12293
12294fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012295
12296
12297for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012298do :
12299 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012300if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012302#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012305/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012306#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012307int
12308main ()
12309{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012310getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012311 ;
12312 return 0;
12313}
12314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012315if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012318
Guido van Rossum627b2d71993-12-24 10:39:16 +000012319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012321
Guido van Rossum627b2d71993-12-24 10:39:16 +000012322fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012323done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012324
Jack Jansen150753c2003-03-29 22:07:47 +000012325for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012326do :
12327 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012328if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012329 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012330#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012333/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012334#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012335int
12336main ()
12337{
12338setpgrp(0,0);
12339 ;
12340 return 0;
12341}
12342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012344
Matthias Kloseb9621712010-04-24 17:59:49 +000012345$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012346
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012347fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012349
12350fi
12351done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012352
Thomas Wouters3a584202000-08-05 23:28:51 +000012353for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012354do :
12355 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012356if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012358#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012361/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012362#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012363int
12364main ()
12365{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012366gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012367 ;
12368 return 0;
12369}
12370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012371if ac_fn_c_try_compile "$LINENO"; then :
12372
Guido van Rossum627b2d71993-12-24 10:39:16 +000012373else
Skip Montanaro6dead952003-09-25 14:50:04 +000012374
Matthias Kloseb9621712010-04-24 17:59:49 +000012375$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012376
Martin v. Löwis11437992002-04-12 09:54:03 +000012377
Guido van Rossum627b2d71993-12-24 10:39:16 +000012378fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012380
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012381fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012382done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012383
Michael W. Hudson54241132001-12-07 15:38:26 +000012384
Victor Stinnere0be4232011-10-25 13:06:09 +020012385for ac_func in clock_gettime
12386do :
12387 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12388if test "x$ac_cv_func_clock_gettime" = xyes; then :
12389 cat >>confdefs.h <<_ACEOF
12390#define HAVE_CLOCK_GETTIME 1
12391_ACEOF
12392
12393else
12394
12395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12396$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12397if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12398 $as_echo_n "(cached) " >&6
12399else
12400 ac_check_lib_save_LIBS=$LIBS
12401LIBS="-lrt $LIBS"
12402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12403/* end confdefs.h. */
12404
12405/* Override any GCC internal prototype to avoid an error.
12406 Use char because int might match the return type of a GCC
12407 builtin and then its argument prototype would still apply. */
12408#ifdef __cplusplus
12409extern "C"
12410#endif
12411char clock_gettime ();
12412int
12413main ()
12414{
12415return clock_gettime ();
12416 ;
12417 return 0;
12418}
12419_ACEOF
12420if ac_fn_c_try_link "$LINENO"; then :
12421 ac_cv_lib_rt_clock_gettime=yes
12422else
12423 ac_cv_lib_rt_clock_gettime=no
12424fi
12425rm -f core conftest.err conftest.$ac_objext \
12426 conftest$ac_exeext conftest.$ac_ext
12427LIBS=$ac_check_lib_save_LIBS
12428fi
12429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12430$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12431if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12432
Victor Stinner7efb8332014-08-29 15:41:08 +020012433 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012434 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12435
12436
12437$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12438
12439
12440fi
12441
12442
12443fi
12444done
12445
12446
12447for ac_func in clock_getres
12448do :
12449 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12450if test "x$ac_cv_func_clock_getres" = xyes; then :
12451 cat >>confdefs.h <<_ACEOF
12452#define HAVE_CLOCK_GETRES 1
12453_ACEOF
12454
12455else
12456
12457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12458$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12459if ${ac_cv_lib_rt_clock_getres+:} false; then :
12460 $as_echo_n "(cached) " >&6
12461else
12462 ac_check_lib_save_LIBS=$LIBS
12463LIBS="-lrt $LIBS"
12464cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12465/* end confdefs.h. */
12466
12467/* Override any GCC internal prototype to avoid an error.
12468 Use char because int might match the return type of a GCC
12469 builtin and then its argument prototype would still apply. */
12470#ifdef __cplusplus
12471extern "C"
12472#endif
12473char clock_getres ();
12474int
12475main ()
12476{
12477return clock_getres ();
12478 ;
12479 return 0;
12480}
12481_ACEOF
12482if ac_fn_c_try_link "$LINENO"; then :
12483 ac_cv_lib_rt_clock_getres=yes
12484else
12485 ac_cv_lib_rt_clock_getres=no
12486fi
12487rm -f core conftest.err conftest.$ac_objext \
12488 conftest$ac_exeext conftest.$ac_ext
12489LIBS=$ac_check_lib_save_LIBS
12490fi
12491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12492$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12493if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12494
12495 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12496
12497
12498fi
12499
12500
12501fi
12502done
12503
12504
Matthias Kloseb9621712010-04-24 17:59:49 +000012505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12506$as_echo_n "checking for major... " >&6; }
12507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012508/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012509
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012510#if defined(MAJOR_IN_MKDEV)
12511#include <sys/mkdev.h>
12512#elif defined(MAJOR_IN_SYSMACROS)
12513#include <sys/sysmacros.h>
12514#else
12515#include <sys/types.h>
12516#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012517
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012518int
12519main ()
12520{
12521
12522 makedev(major(0),minor(0));
12523
12524 ;
12525 return 0;
12526}
12527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012529
12530
Matthias Kloseb9621712010-04-24 17:59:49 +000012531$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012532
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12534$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012535
12536else
Skip Montanaro6dead952003-09-25 14:50:04 +000012537
Matthias Kloseb9621712010-04-24 17:59:49 +000012538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12539$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012540
12541fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012542rm -f core conftest.err conftest.$ac_objext \
12543 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012544
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012545# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012546# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12548$as_echo_n "checking for getaddrinfo... " >&6; }
12549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012550/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012551
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012552#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012553#include <sys/socket.h>
12554#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012555#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012556
Martin v. Löwis11437992002-04-12 09:54:03 +000012557int
12558main ()
12559{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012560getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012561 ;
12562 return 0;
12563}
12564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012565if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012566 have_getaddrinfo=yes
12567else
Matthias Kloseb9621712010-04-24 17:59:49 +000012568 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012569fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012570rm -f core conftest.err conftest.$ac_objext \
12571 conftest$ac_exeext conftest.$ac_ext
12572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12573$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012574if test $have_getaddrinfo = yes
12575then
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12577$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012578 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012580else
Matthias Kloseb9621712010-04-24 17:59:49 +000012581 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012582
12583if test "${enable_ipv6+set}" = set; then
12584 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12585else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012586 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012587fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012588else
Matthias Kloseb9621712010-04-24 17:59:49 +000012589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012590/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012591
Stefan Krah19c21392012-11-22 23:47:32 +010012592#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012593#include <sys/types.h>
12594#include <netdb.h>
12595#include <string.h>
12596#include <sys/socket.h>
12597#include <netinet/in.h>
12598
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012599int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012600{
12601 int passive, gaierr, inet4 = 0, inet6 = 0;
12602 struct addrinfo hints, *ai, *aitop;
12603 char straddr[INET6_ADDRSTRLEN], strport[16];
12604
12605 for (passive = 0; passive <= 1; passive++) {
12606 memset(&hints, 0, sizeof(hints));
12607 hints.ai_family = AF_UNSPEC;
12608 hints.ai_flags = passive ? AI_PASSIVE : 0;
12609 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012610 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012611 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12612 (void)gai_strerror(gaierr);
12613 goto bad;
12614 }
12615 for (ai = aitop; ai; ai = ai->ai_next) {
12616 if (ai->ai_addr == NULL ||
12617 ai->ai_addrlen == 0 ||
12618 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12619 straddr, sizeof(straddr), strport, sizeof(strport),
12620 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12621 goto bad;
12622 }
12623 switch (ai->ai_family) {
12624 case AF_INET:
12625 if (strcmp(strport, "54321") != 0) {
12626 goto bad;
12627 }
12628 if (passive) {
12629 if (strcmp(straddr, "0.0.0.0") != 0) {
12630 goto bad;
12631 }
12632 } else {
12633 if (strcmp(straddr, "127.0.0.1") != 0) {
12634 goto bad;
12635 }
12636 }
12637 inet4++;
12638 break;
12639 case AF_INET6:
12640 if (strcmp(strport, "54321") != 0) {
12641 goto bad;
12642 }
12643 if (passive) {
12644 if (strcmp(straddr, "::") != 0) {
12645 goto bad;
12646 }
12647 } else {
12648 if (strcmp(straddr, "::1") != 0) {
12649 goto bad;
12650 }
12651 }
12652 inet6++;
12653 break;
12654 case AF_UNSPEC:
12655 goto bad;
12656 break;
12657 default:
12658 /* another family support? */
12659 break;
12660 }
12661 }
12662 }
12663
12664 if (!(inet4 == 0 || inet4 == 2))
12665 goto bad;
12666 if (!(inet6 == 0 || inet6 == 2))
12667 goto bad;
12668
12669 if (aitop)
12670 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012671 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012672
12673 bad:
12674 if (aitop)
12675 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012676 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012677}
12678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012680if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012681 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012682else
Matthias Kloseb9621712010-04-24 17:59:49 +000012683 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012684fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12686 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012687fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012689fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012690
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012692
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12694$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12695
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012696if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012697then
12698 if test $ipv6 = yes
12699 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012700 echo 'Fatal: You must get working getaddrinfo() function.'
12701 echo ' or you can specify "--disable-ipv6"'.
12702 exit 1
12703 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012704else
Martin v. Löwis11437992002-04-12 09:54:03 +000012705
Matthias Kloseb9621712010-04-24 17:59:49 +000012706$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012707
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012708fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012709
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012710for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012711do :
12712 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012713if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012714 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012715#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012716_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012717
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012718fi
12719done
12720
Michael W. Hudson54241132001-12-07 15:38:26 +000012721
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12724$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012725if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012726 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727else
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012729/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012730#include <sys/types.h>
12731#include <sys/time.h>
12732#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012733
Martin v. Löwis11437992002-04-12 09:54:03 +000012734int
12735main ()
12736{
12737if ((struct tm *) 0)
12738return 0;
12739 ;
12740 return 0;
12741}
12742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012743if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012744 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012745else
Matthias Kloseb9621712010-04-24 17:59:49 +000012746 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012749fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12751$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012752if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012755
12756fi
12757
Matthias Kloseb9621712010-04-24 17:59:49 +000012758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12759$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012760if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012762else
Matthias Kloseb9621712010-04-24 17:59:49 +000012763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012764/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012765#include <sys/types.h>
12766#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012767
Martin v. Löwis11437992002-04-12 09:54:03 +000012768int
12769main ()
12770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771struct tm tm;
12772 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012774 ;
12775 return 0;
12776}
12777_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012778if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012779 ac_cv_struct_tm=time.h
12780else
Matthias Kloseb9621712010-04-24 17:59:49 +000012781 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012782fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12786$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012787if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012788
Matthias Kloseb9621712010-04-24 17:59:49 +000012789$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012790
12791fi
12792
Matthias Kloseb9621712010-04-24 17:59:49 +000012793ac_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 +000012794#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Matthias Kloseb9621712010-04-24 17:59:49 +000012796"
Victor Stinnere0be4232011-10-25 13:06:09 +020012797if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
12799cat >>confdefs.h <<_ACEOF
12800#define HAVE_STRUCT_TM_TM_ZONE 1
12801_ACEOF
12802
12803
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012804fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012805
Martin v. Löwis11437992002-04-12 09:54:03 +000012806if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12807
Matthias Kloseb9621712010-04-24 17:59:49 +000012808$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012809
12810else
Matthias Kloseb9621712010-04-24 17:59:49 +000012811 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12812"
Victor Stinnere0be4232011-10-25 13:06:09 +020012813if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012814 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815else
Matthias Kloseb9621712010-04-24 17:59:49 +000012816 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012817fi
12818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012819cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012820#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012821_ACEOF
12822
Matthias Kloseb9621712010-04-24 17:59:49 +000012823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12824$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012825if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012826 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827else
Matthias Kloseb9621712010-04-24 17:59:49 +000012828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012829/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012830#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012831#if !HAVE_DECL_TZNAME
12832extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012833#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012834
Martin v. Löwis11437992002-04-12 09:54:03 +000012835int
12836main ()
12837{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012838return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012839 ;
12840 return 0;
12841}
12842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012843if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012844 ac_cv_var_tzname=yes
12845else
Matthias Kloseb9621712010-04-24 17:59:49 +000012846 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012848rm -f core conftest.err conftest.$ac_objext \
12849 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012850fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12852$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012853 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012854
Matthias Kloseb9621712010-04-24 17:59:49 +000012855$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012856
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012857 fi
12858fi
12859
Matthias Kloseb9621712010-04-24 17:59:49 +000012860ac_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 +020012861if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012862
12863cat >>confdefs.h <<_ACEOF
12864#define HAVE_STRUCT_STAT_ST_RDEV 1
12865_ACEOF
12866
12867
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012868fi
12869
Matthias Kloseb9621712010-04-24 17:59:49 +000012870ac_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 +020012871if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012872
Martin v. Löwis11437992002-04-12 09:54:03 +000012873cat >>confdefs.h <<_ACEOF
12874#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12875_ACEOF
12876
12877
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012878fi
12879
Matthias Kloseb9621712010-04-24 17:59:49 +000012880ac_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 +020012881if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012882
12883cat >>confdefs.h <<_ACEOF
12884#define HAVE_STRUCT_STAT_ST_FLAGS 1
12885_ACEOF
12886
12887
12888fi
12889
Matthias Kloseb9621712010-04-24 17:59:49 +000012890ac_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 +020012891if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012892
12893cat >>confdefs.h <<_ACEOF
12894#define HAVE_STRUCT_STAT_ST_GEN 1
12895_ACEOF
12896
12897
12898fi
12899
Matthias Kloseb9621712010-04-24 17:59:49 +000012900ac_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 +020012901if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012902
12903cat >>confdefs.h <<_ACEOF
12904#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12905_ACEOF
12906
12907
12908fi
12909
Matthias Kloseb9621712010-04-24 17:59:49 +000012910ac_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 +020012911if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012912
Martin v. Löwis11437992002-04-12 09:54:03 +000012913cat >>confdefs.h <<_ACEOF
12914#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12915_ACEOF
12916
12917
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012918fi
12919
Michael W. Hudson54241132001-12-07 15:38:26 +000012920
Matthias Kloseb9621712010-04-24 17:59:49 +000012921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12922$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012923if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012924 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012925else
Matthias Kloseb159a552010-04-25 21:00:44 +000012926
Matthias Kloseb9621712010-04-24 17:59:49 +000012927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012928/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012929#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012930int
12931main ()
12932{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012933return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012934 ;
12935 return 0;
12936}
12937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012938if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012939 ac_cv_header_time_altzone=yes
12940else
Matthias Kloseb9621712010-04-24 17:59:49 +000012941 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012942fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945fi
12946
Matthias Kloseb9621712010-04-24 17:59:49 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12948$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012949if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012950
Matthias Kloseb9621712010-04-24 17:59:49 +000012951$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012952
12953fi
12954
Guido van Rossumda88dad1995-01-26 00:46:29 +000012955was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12957$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12958cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012959/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012960
12961#include <sys/types.h>
12962#include <sys/select.h>
12963#include <sys/time.h>
12964
Martin v. Löwis11437992002-04-12 09:54:03 +000012965int
12966main ()
12967{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012968;
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ;
12970 return 0;
12971}
12972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012973if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012974
12975
Matthias Kloseb9621712010-04-24 17:59:49 +000012976$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012977
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012978 was_it_defined=yes
12979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12983$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012984
Matthias Kloseb9621712010-04-24 17:59:49 +000012985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12986$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012987if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012988 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012989else
Matthias Kloseb9621712010-04-24 17:59:49 +000012990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012991/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012992#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012993int
12994main ()
12995{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012996struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012997 ;
12998 return 0;
12999}
13000_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013001if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013002 ac_cv_struct_addrinfo=yes
13003else
Matthias Kloseb9621712010-04-24 17:59:49 +000013004 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13007fi
13008
Matthias Kloseb9621712010-04-24 17:59:49 +000013009{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13010$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013011if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013014
13015fi
13016
Matthias Kloseb9621712010-04-24 17:59:49 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13018$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013019if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013020 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013021else
Matthias Kloseb9621712010-04-24 17:59:49 +000013022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013023/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013024
13025# include <sys/types.h>
13026# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013027int
13028main ()
13029{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013030struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 ;
13032 return 0;
13033}
13034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013035if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013036 ac_cv_struct_sockaddr_storage=yes
13037else
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13041fi
13042
Matthias Kloseb9621712010-04-24 17:59:49 +000013043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13044$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013045if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013046
Matthias Kloseb9621712010-04-24 17:59:49 +000013047$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013048
13049fi
13050
Guido van Rossum627b2d71993-12-24 10:39:16 +000013051# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013052
Matthias Kloseb9621712010-04-24 17:59:49 +000013053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13054$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013055if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013056 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013057else
Matthias Kloseb9621712010-04-24 17:59:49 +000013058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013059/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013060$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013061int
13062main ()
13063{
13064static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013065test_array [0] = 0;
13066return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013067
13068 ;
13069 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013070}
Martin v. Löwis11437992002-04-12 09:54:03 +000013071_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013072if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013073 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013074else
Matthias Kloseb9621712010-04-24 17:59:49 +000013075 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013078fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13080$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013081if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013082 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013083
13084fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013085
Matthias Kloseb9621712010-04-24 17:59:49 +000013086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13087$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013088if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013089 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013090else
Matthias Kloseb9621712010-04-24 17:59:49 +000013091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013092/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013093
Martin v. Löwis11437992002-04-12 09:54:03 +000013094int
13095main ()
13096{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013097
Martin v. Löwis11437992002-04-12 09:54:03 +000013098#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013099 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013101 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013103 char const *const *pcpcc;
13104 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 /* NEC SVR4.0.2 mips cc rejects this. */
13106 struct point {int x, y;};
13107 static struct point const zero = {0,0};
13108 /* AIX XL C 1.02.0.0 rejects this.
13109 It does not let you subtract one const X* pointer from another in
13110 an arm of an if-expression whose if-part is not a constant
13111 expression */
13112 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013113 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013114 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115 ++pcpcc;
13116 ppc = (char**) pcpcc;
13117 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013118 { /* SCO 3.2v4 cc rejects this sort of thing. */
13119 char tx;
13120 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013121 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013122
Martin v. Löwis11437992002-04-12 09:54:03 +000013123 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013124 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 }
13126 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13127 int x[] = {25, 17};
13128 const int *foo = &x[0];
13129 ++foo;
13130 }
13131 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13132 typedef const int *iptr;
13133 iptr p = 0;
13134 ++p;
13135 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013136 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013138 struct s { int j; const int *ap[3]; } bx;
13139 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013140 }
13141 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13142 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013143 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013146#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013147
Martin v. Löwis11437992002-04-12 09:54:03 +000013148 ;
13149 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013150}
Martin v. Löwis11437992002-04-12 09:54:03 +000013151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013152if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013153 ac_cv_c_const=yes
13154else
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013156fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13160$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013161if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013162
Matthias Kloseb9621712010-04-24 17:59:49 +000013163$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013164
13165fi
13166
Michael W. Hudson54241132001-12-07 15:38:26 +000013167
Guido van Rossumda88dad1995-01-26 00:46:29 +000013168works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13170$as_echo_n "checking for working volatile... " >&6; }
13171cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013172/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013173
Martin v. Löwis11437992002-04-12 09:54:03 +000013174int
13175main ()
13176{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013177volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013178 ;
13179 return 0;
13180}
13181_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013182if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013183 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013184else
Skip Montanaro6dead952003-09-25 14:50:04 +000013185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013187
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013188
Guido van Rossum627b2d71993-12-24 10:39:16 +000013189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13192$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013193
Guido van Rossumda88dad1995-01-26 00:46:29 +000013194works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13196$as_echo_n "checking for working signed char... " >&6; }
13197cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013198/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013199
Martin v. Löwis11437992002-04-12 09:54:03 +000013200int
13201main ()
13202{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013203signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013204 ;
13205 return 0;
13206}
13207_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013208if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013209 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013210else
Skip Montanaro6dead952003-09-25 14:50:04 +000013211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013213
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013214
Guido van Rossum7f43da71994-08-01 12:15:30 +000013215fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13218$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013219
Guido van Rossumda88dad1995-01-26 00:46:29 +000013220have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13222$as_echo_n "checking for prototypes... " >&6; }
13223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013224/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013225int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013226int
13227main ()
13228{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013229return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 ;
13231 return 0;
13232}
13233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013235
Matthias Kloseb9621712010-04-24 17:59:49 +000013236$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
Matthias Kloseb159a552010-04-25 21:00:44 +000013238 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013239fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13242$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013243
Guido van Rossumda88dad1995-01-26 00:46:29 +000013244works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13246$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013248/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013249
13250#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013251int foo(int x, ...) {
13252 va_list va;
13253 va_start(va, x);
13254 va_arg(va, int);
13255 va_arg(va, char *);
13256 va_arg(va, double);
13257 return 0;
13258}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013259
Martin v. Löwis11437992002-04-12 09:54:03 +000013260int
13261main ()
13262{
Guido van Rossum90eea071996-08-30 20:58:57 +000013263return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013264 ;
13265 return 0;
13266}
13267_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013268if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013269
13270
Matthias Kloseb9621712010-04-24 17:59:49 +000013271$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013272
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013273 works=yes
13274
Guido van Rossum627b2d71993-12-24 10:39:16 +000013275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13278$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013279
Martin v. Löwisd6320502004-08-12 13:45:08 +000013280# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13282$as_echo_n "checking for socketpair... " >&6; }
13283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013284/* end confdefs.h. */
13285
13286#include <sys/types.h>
13287#include <sys/socket.h>
13288
13289int
13290main ()
13291{
13292void *x=socketpair
13293 ;
13294 return 0;
13295}
13296_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013297if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013298
Matthias Kloseb9621712010-04-24 17:59:49 +000013299$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013300
Matthias Kloseb159a552010-04-25 21:00:44 +000013301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013302$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013303else
Matthias Kloseb9621712010-04-24 17:59:49 +000013304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13305$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013306
13307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013309
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013310# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13312$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013314/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013315#include <sys/types.h>
13316#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013317int
13318main ()
13319{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013320struct sockaddr x;
13321x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 ;
13323 return 0;
13324}
13325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013326if ac_fn_c_try_compile "$LINENO"; then :
13327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13328$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013329
Matthias Kloseb9621712010-04-24 17:59:49 +000013330$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013331
13332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13334$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013335
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013338
Guido van Rossumda88dad1995-01-26 00:46:29 +000013339va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13341$as_echo_n "checking whether va_list is an array... " >&6; }
13342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013343/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013344
13345#ifdef HAVE_STDARG_PROTOTYPES
13346#include <stdarg.h>
13347#else
13348#include <varargs.h>
13349#endif
13350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351int
13352main ()
13353{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013354va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013355 ;
13356 return 0;
13357}
13358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013359if ac_fn_c_try_compile "$LINENO"; then :
13360
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013361else
Skip Montanaro6dead952003-09-25 14:50:04 +000013362
Martin v. Löwis11437992002-04-12 09:54:03 +000013363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013365
Guido van Rossumda88dad1995-01-26 00:46:29 +000013366 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013367
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13371$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013372
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013373# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013374
13375
Matthias Kloseb9621712010-04-24 17:59:49 +000013376ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013377if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013378
Matthias Kloseb9621712010-04-24 17:59:49 +000013379 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013380
Matthias Kloseb9621712010-04-24 17:59:49 +000013381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13382$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013383 OLD_CFLAGS=$CFLAGS
13384 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013386/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013387
13388# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
Martin v. Löwis11437992002-04-12 09:54:03 +000013390int
13391main ()
13392{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013393
13394 char *name;
13395 struct hostent *he, *res;
13396 char buffer[2048];
13397 int buflen = 2048;
13398 int h_errnop;
13399
13400 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013401
13402 ;
13403 return 0;
13404}
13405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013406if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013407
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013409
Martin v. Löwis11437992002-04-12 09:54:03 +000013410
Matthias Kloseb9621712010-04-24 17:59:49 +000013411$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013412
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13414$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013416else
Skip Montanaro6dead952003-09-25 14:50:04 +000013417
Matthias Kloseb9621712010-04-24 17:59:49 +000013418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13419$as_echo "no" >&6; }
13420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13421$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013423/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013424
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013425# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
Martin v. Löwis11437992002-04-12 09:54:03 +000013427int
13428main ()
13429{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013430
13431 char *name;
13432 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013433 char buffer[2048];
13434 int buflen = 2048;
13435 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013436
Matthias Kloseb159a552010-04-25 21:00:44 +000013437 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013438
13439 ;
13440 return 0;
13441}
13442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013443if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013444
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013446
Martin v. Löwis11437992002-04-12 09:54:03 +000013447
Matthias Kloseb159a552010-04-25 21:00:44 +000013448$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013449
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13451$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013452
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013453else
Skip Montanaro6dead952003-09-25 14:50:04 +000013454
Matthias Kloseb9621712010-04-24 17:59:49 +000013455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13456$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13458$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13460/* end confdefs.h. */
13461
13462# include <netdb.h>
13463
13464int
13465main ()
13466{
13467
13468 char *name;
13469 struct hostent *he;
13470 struct hostent_data data;
13471
13472 (void) gethostbyname_r(name, he, &data);
13473
13474 ;
13475 return 0;
13476}
13477_ACEOF
13478if ac_fn_c_try_compile "$LINENO"; then :
13479
13480 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13481
13482
13483$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13484
13485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13486$as_echo "yes" >&6; }
13487
13488else
13489
13490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13491$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013492
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013498
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013501 CFLAGS=$OLD_CFLAGS
13502
13503else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 for ac_func in gethostbyname
13506do :
13507 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013508if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013509 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013510#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013511_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013512
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013513fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013514done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013515
Michael W. Hudson54241132001-12-07 15:38:26 +000013516
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013517fi
13518
Michael W. Hudson54241132001-12-07 15:38:26 +000013519
13520
13521
13522
13523
13524
Guido van Rossum627b2d71993-12-24 10:39:16 +000013525# checks for system services
13526# (none yet)
13527
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013528# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013529ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013530if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013531
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013532else
Matthias Kloseb9621712010-04-24 17:59:49 +000013533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13534$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013535if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013536 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013537else
Martin v. Löwis11437992002-04-12 09:54:03 +000013538 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013539LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013543/* Override any GCC internal prototype to avoid an error.
13544 Use char because int might match the return type of a GCC
13545 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013546#ifdef __cplusplus
13547extern "C"
13548#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013549char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013550int
13551main ()
13552{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 ;
13555 return 0;
13556}
13557_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013558if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013559 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013560else
Matthias Kloseb9621712010-04-24 17:59:49 +000013561 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013562fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013563rm -f core conftest.err conftest.$ac_objext \
13564 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013565LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013566fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13568$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013569if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013570 cat >>confdefs.h <<_ACEOF
13571#define HAVE_LIBIEEE 1
13572_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013573
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013574 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575
Guido van Rossum627b2d71993-12-24 10:39:16 +000013576fi
13577
Michael W. Hudson54241132001-12-07 15:38:26 +000013578
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013579fi
13580
Michael W. Hudson54241132001-12-07 15:38:26 +000013581
Guido van Rossum7f253911997-05-09 02:42:48 +000013582# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13584$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013586# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013587if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013588 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013589if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013590then
13591
Matthias Kloseb9621712010-04-24 17:59:49 +000013592$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013593
Matthias Kloseb9621712010-04-24 17:59:49 +000013594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13595$as_echo "yes" >&6; }
13596else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13597$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013598fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013599else
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13601$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013602fi
13603
Guido van Rossum7f253911997-05-09 02:42:48 +000013604
Guido van Rossum7f43da71994-08-01 12:15:30 +000013605# check for --with-libm=...
13606
Guido van Rossum563e7081996-09-10 18:20:48 +000013607case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013608Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013609*) LIBM=-lm
13610esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13612$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013614# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013615if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013616 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013617if test "$withval" = no
13618then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13620$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013621elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013622then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13624$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013625else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013626fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013627else
Matthias Kloseb9621712010-04-24 17:59:49 +000013628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13629$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013630fi
13631
Guido van Rossum7f43da71994-08-01 12:15:30 +000013632
13633# check for --with-libc=...
13634
Matthias Kloseb9621712010-04-24 17:59:49 +000013635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13636$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013638# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013639if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013640 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013641if test "$withval" = no
13642then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13644$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013645elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013646then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13648$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013649else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013650fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013651else
Matthias Kloseb9621712010-04-24 17:59:49 +000013652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13653$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013654fi
13655
Guido van Rossum7f43da71994-08-01 12:15:30 +000013656
Stefan Krah1919b7e2012-03-21 18:25:23 +010013657# **************************************
13658# * Check for gcc x64 inline assembler *
13659# **************************************
13660
13661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13662$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13664/* end confdefs.h. */
13665
13666int
13667main ()
13668{
13669
13670 __asm__ __volatile__ ("movq %rcx, %rax");
13671
13672 ;
13673 return 0;
13674}
13675_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013676if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013677 have_gcc_asm_for_x64=yes
13678else
13679 have_gcc_asm_for_x64=no
13680fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013681rm -f core conftest.err conftest.$ac_objext \
13682 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13684$as_echo "$have_gcc_asm_for_x64" >&6; }
13685if test "$have_gcc_asm_for_x64" = yes
13686then
13687
13688$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13689
13690fi
13691
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013692# **************************************************
13693# * Check for various properties of floating point *
13694# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013695
Matthias Kloseb9621712010-04-24 17:59:49 +000013696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13697$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013698if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013700else
13701
Matthias Kloseb9621712010-04-24 17:59:49 +000013702if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013703 ac_cv_little_endian_double=no
13704else
Matthias Kloseb9621712010-04-24 17:59:49 +000013705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013706/* end confdefs.h. */
13707
13708#include <string.h>
13709int main() {
13710 double x = 9006104071832581.0;
13711 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13712 return 0;
13713 else
13714 return 1;
13715}
13716
13717_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013718if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013719 ac_cv_little_endian_double=yes
13720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13724 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013725fi
13726
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013727fi
13728
Matthias Kloseb9621712010-04-24 17:59:49 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13730$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013731if test "$ac_cv_little_endian_double" = yes
13732then
13733
Matthias Kloseb9621712010-04-24 17:59:49 +000013734$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013735
13736fi
13737
Matthias Kloseb9621712010-04-24 17:59:49 +000013738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13739$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013740if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013742else
13743
Matthias Kloseb9621712010-04-24 17:59:49 +000013744if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013745 ac_cv_big_endian_double=no
13746else
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013748/* end confdefs.h. */
13749
13750#include <string.h>
13751int main() {
13752 double x = 9006104071832581.0;
13753 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13754 return 0;
13755 else
13756 return 1;
13757}
13758
13759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013760if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013761 ac_cv_big_endian_double=yes
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013767fi
13768
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013769fi
13770
Matthias Kloseb9621712010-04-24 17:59:49 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13772$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013773if test "$ac_cv_big_endian_double" = yes
13774then
13775
Matthias Kloseb9621712010-04-24 17:59:49 +000013776$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013777
13778fi
13779
13780# Some ARM platforms use a mixed-endian representation for doubles.
13781# While Python doesn't currently have full support for these platforms
13782# (see e.g., issue 1762561), we can at least make sure that float <-> string
13783# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13785$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013786if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013787 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013788else
13789
Matthias Kloseb9621712010-04-24 17:59:49 +000013790if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013791 ac_cv_mixed_endian_double=no
13792else
Matthias Kloseb9621712010-04-24 17:59:49 +000013793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013794/* end confdefs.h. */
13795
13796#include <string.h>
13797int main() {
13798 double x = 9006104071832581.0;
13799 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13800 return 0;
13801 else
13802 return 1;
13803}
13804
13805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013806if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013807 ac_cv_mixed_endian_double=yes
13808else
Matthias Kloseb9621712010-04-24 17:59:49 +000013809 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013810fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013811rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13812 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013813fi
13814
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013815fi
13816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13818$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013819if test "$ac_cv_mixed_endian_double" = yes
13820then
13821
Matthias Kloseb9621712010-04-24 17:59:49 +000013822$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013823
13824fi
13825
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013826# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013827# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013828# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013829# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013830# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013831# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013832
13833# This inline assembler syntax may also work for suncc and icc,
13834# so we try it on all platforms.
13835
Matthias Kloseb9621712010-04-24 17:59:49 +000013836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13837$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013839/* end confdefs.h. */
13840
13841int
13842main ()
13843{
13844
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013845 unsigned short cw;
13846 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13847 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013848
13849 ;
13850 return 0;
13851}
13852_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013853if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854 have_gcc_asm_for_x87=yes
13855else
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013857fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013858rm -f core conftest.err conftest.$ac_objext \
13859 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13861$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013862if test "$have_gcc_asm_for_x87" = yes
13863then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013864
Matthias Kloseb9621712010-04-24 17:59:49 +000013865$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013866
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013867fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13870$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13872/* end confdefs.h. */
13873
13874int
13875main ()
13876{
13877
13878 unsigned int fpcr;
13879 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13880 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13881
13882 ;
13883 return 0;
13884}
13885_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013886if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013887 have_gcc_asm_for_mc68881=yes
13888else
13889 have_gcc_asm_for_mc68881=no
13890fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013891rm -f core conftest.err conftest.$ac_objext \
13892 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13894$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13895if test "$have_gcc_asm_for_mc68881" = yes
13896then
13897
13898$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13899
13900fi
13901
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013902# Detect whether system arithmetic is subject to x87-style double
13903# rounding issues. The result of this test has little meaning on non
13904# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13905# mode is round-to-nearest and double rounding issues are present, and
13906# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13908$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013909# $BASECFLAGS may affect the result
13910ac_save_cc="$CC"
13911CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013912if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013913 ac_cv_x87_double_rounding=no
13914else
Matthias Kloseb9621712010-04-24 17:59:49 +000013915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013916/* end confdefs.h. */
13917
13918#include <stdlib.h>
13919#include <math.h>
13920int main() {
13921 volatile double x, y, z;
13922 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13923 x = 0.99999999999999989; /* 1-2**-53 */
13924 y = 1./x;
13925 if (y != 1.)
13926 exit(0);
13927 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13928 x = 1e16;
13929 y = 2.99999;
13930 z = x + y;
13931 if (z != 1e16+4.)
13932 exit(0);
13933 /* both tests show evidence of double rounding */
13934 exit(1);
13935}
13936
13937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013938if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013939 ac_cv_x87_double_rounding=no
13940else
Matthias Kloseb9621712010-04-24 17:59:49 +000013941 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013945fi
13946
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013947CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13949$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013950if test "$ac_cv_x87_double_rounding" = yes
13951then
13952
Matthias Kloseb9621712010-04-24 17:59:49 +000013953$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013954
13955fi
13956
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013957# ************************************
13958# * Check for mathematical functions *
13959# ************************************
13960
13961LIBS_SAVE=$LIBS
13962LIBS="$LIBS $LIBM"
13963
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013964for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13965do :
13966 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13967ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013968if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013969 cat >>confdefs.h <<_ACEOF
13970#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13971_ACEOF
13972
13973fi
13974done
13975
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013976for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013977do :
13978 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13979ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013980if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013981 cat >>confdefs.h <<_ACEOF
13982#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13983_ACEOF
13984
13985fi
13986done
13987
13988ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13989"
Victor Stinnere0be4232011-10-25 13:06:09 +020013990if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013991 ac_have_decl=1
13992else
13993 ac_have_decl=0
13994fi
13995
13996cat >>confdefs.h <<_ACEOF
13997#define HAVE_DECL_ISINF $ac_have_decl
13998_ACEOF
13999ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14000"
Victor Stinnere0be4232011-10-25 13:06:09 +020014001if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014002 ac_have_decl=1
14003else
14004 ac_have_decl=0
14005fi
14006
14007cat >>confdefs.h <<_ACEOF
14008#define HAVE_DECL_ISNAN $ac_have_decl
14009_ACEOF
14010ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14011"
Victor Stinnere0be4232011-10-25 13:06:09 +020014012if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014013 ac_have_decl=1
14014else
14015 ac_have_decl=0
14016fi
14017
14018cat >>confdefs.h <<_ACEOF
14019#define HAVE_DECL_ISFINITE $ac_have_decl
14020_ACEOF
14021
14022
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014023# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14024# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14026$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014027if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014028 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014029else
14030
Matthias Kloseb9621712010-04-24 17:59:49 +000014031if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014032 ac_cv_tanh_preserves_zero_sign=no
14033else
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014035/* end confdefs.h. */
14036
14037#include <math.h>
14038#include <stdlib.h>
14039int main() {
14040 /* return 0 if either negative zeros don't exist
14041 on this platform or if negative zeros exist
14042 and tanh(-0.) == -0. */
14043 if (atan2(0., -1.) == atan2(-0., -1.) ||
14044 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14045 else exit(1);
14046}
14047
14048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014049if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014050 ac_cv_tanh_preserves_zero_sign=yes
14051else
Matthias Kloseb9621712010-04-24 17:59:49 +000014052 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014054rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14055 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014056fi
14057
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014058fi
14059
Matthias Kloseb9621712010-04-24 17:59:49 +000014060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14061$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014062if test "$ac_cv_tanh_preserves_zero_sign" = yes
14063then
14064
Matthias Kloseb9621712010-04-24 17:59:49 +000014065$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014066
14067fi
14068
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014069if test "$ac_cv_func_log1p" = yes
14070then
14071 # On some versions of AIX, log1p(-0.) returns 0. instead of
14072 # -0. See issue #9920.
14073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14074$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014075 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014076 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014077else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014078
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014079 if test "$cross_compiling" = yes; then :
14080 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014081else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14083/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014084
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014085 #include <math.h>
14086 #include <stdlib.h>
14087 int main() {
14088 /* Fail if the signs of log1p(-0.) and -0. can be
14089 distinguished. */
14090 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14091 return 0;
14092 else
14093 return 1;
14094 }
14095
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014096_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014097if ac_fn_c_try_run "$LINENO"; then :
14098 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014099else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014100 ac_cv_log1p_drops_zero_sign=yes
14101fi
14102rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14103 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014104fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014105
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014106fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014107
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14109$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14110fi
14111if test "$ac_cv_log1p_drops_zero_sign" = yes
14112then
14113
14114$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14115
14116fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014117
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014118LIBS=$LIBS_SAVE
14119
Mark Dickinsona614f042009-11-28 12:48:43 +000014120# For multiprocessing module, check that sem_open
14121# actually works. For FreeBSD versions <= 7.2,
14122# the kernel module that provides POSIX semaphores
14123# isn't loaded by default, so an attempt to call
14124# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14126$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014127if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014129else
Matthias Kloseb9621712010-04-24 17:59:49 +000014130 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014131 ac_cv_posix_semaphores_enabled=yes
14132else
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014134/* end confdefs.h. */
14135
14136#include <unistd.h>
14137#include <fcntl.h>
14138#include <stdio.h>
14139#include <semaphore.h>
14140#include <sys/stat.h>
14141
14142int main(void) {
14143 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14144 if (a == SEM_FAILED) {
14145 perror("sem_open");
14146 return 1;
14147 }
14148 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014149 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014150 return 0;
14151}
14152
14153_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014154if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014155 ac_cv_posix_semaphores_enabled=yes
14156else
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014158fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14160 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014161fi
14162
14163
Mark Dickinsona614f042009-11-28 12:48:43 +000014164fi
14165
Matthias Kloseb9621712010-04-24 17:59:49 +000014166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14167$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014168if test $ac_cv_posix_semaphores_enabled = no
14169then
14170
Matthias Kloseb9621712010-04-24 17:59:49 +000014171$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014172
14173fi
14174
Mark Dickinson10683072009-04-18 21:18:19 +000014175# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14177$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014178if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014179 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014180else
Matthias Kloseb9621712010-04-24 17:59:49 +000014181 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014183else
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014185/* end confdefs.h. */
14186
14187#include <unistd.h>
14188#include <fcntl.h>
14189#include <stdio.h>
14190#include <semaphore.h>
14191#include <sys/stat.h>
14192
14193int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014194 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014195 int count;
14196 int res;
14197 if(a==SEM_FAILED){
14198 perror("sem_open");
14199 return 1;
14200
14201 }
14202 res = sem_getvalue(a, &count);
14203 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014204 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014205 return res==-1 ? 1 : 0;
14206}
14207
Mark Dickinson10683072009-04-18 21:18:19 +000014208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014209if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014210 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014211else
Matthias Kloseb9621712010-04-24 17:59:49 +000014212 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014213fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014214rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14215 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014216fi
14217
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014218
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014219fi
14220
Matthias Kloseb9621712010-04-24 17:59:49 +000014221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14222$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014223if test $ac_cv_broken_sem_getvalue = yes
14224then
14225
Matthias Kloseb9621712010-04-24 17:59:49 +000014226$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014227
14228fi
14229
Mark Dickinsonbd792642009-03-18 20:06:12 +000014230# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14232$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014233# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014234if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014235 enableval=$enable_big_digits; case $enable_big_digits in
14236yes)
14237 enable_big_digits=30 ;;
14238no)
14239 enable_big_digits=15 ;;
1424015|30)
14241 ;;
14242*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014243 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 +000014244esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14246$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014247
14248cat >>confdefs.h <<_ACEOF
14249#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14250_ACEOF
14251
14252
14253else
Matthias Kloseb9621712010-04-24 17:59:49 +000014254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14255$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014256fi
14257
14258
Guido van Rossumef2255b2000-03-10 22:30:29 +000014259# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014260ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014261if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014262
14263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014265
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014266 wchar_h="yes"
14267
Guido van Rossumef2255b2000-03-10 22:30:29 +000014268else
Martin v. Löwis11437992002-04-12 09:54:03 +000014269 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014270
14271fi
14272
Michael W. Hudson54241132001-12-07 15:38:26 +000014273
Martin v. Löwis11437992002-04-12 09:54:03 +000014274
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014275# determine wchar_t size
14276if test "$wchar_h" = yes
14277then
Matthias Kloseb9621712010-04-24 17:59:49 +000014278 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014279# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14280# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14281# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14283$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014284if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014286else
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14288"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014289
Martin v. Löwis11437992002-04-12 09:54:03 +000014290else
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 if test "$ac_cv_type_wchar_t" = yes; then
14292 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014294as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014295See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296 else
14297 ac_cv_sizeof_wchar_t=0
14298 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014300
Martin v. Löwis11437992002-04-12 09:54:03 +000014301fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14303$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014304
14305
14306
Martin v. Löwis11437992002-04-12 09:54:03 +000014307cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014308#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014309_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014310
Michael W. Hudson54241132001-12-07 15:38:26 +000014311
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014312fi
14313
Matthias Kloseb9621712010-04-24 17:59:49 +000014314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14315$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014316have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014318/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014319
14320#include <tcl.h>
14321#if TCL_UTF_MAX != 6
14322# error "NOT UCS4_TCL"
14323#endif
14324int
14325main ()
14326{
14327
14328 ;
14329 return 0;
14330}
14331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014333
14334
Matthias Kloseb9621712010-04-24 17:59:49 +000014335$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014336
14337 have_ucs4_tcl=yes
14338
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14342$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014343
Skip Montanaro6dead952003-09-25 14:50:04 +000014344# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014345if test "$wchar_h" = yes
14346then
14347 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14349$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014350 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014351 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014352else
14353
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014355 ac_cv_wchar_t_signed=yes
14356else
Matthias Kloseb9621712010-04-24 17:59:49 +000014357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014358/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014359
14360 #include <wchar.h>
14361 int main()
14362 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014363 /* Success: exit code 0 */
14364 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014365 }
14366
14367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014368if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014369 ac_cv_wchar_t_signed=yes
14370else
Matthias Kloseb9621712010-04-24 17:59:49 +000014371 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14374 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014375fi
14376
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014377fi
14378
Matthias Kloseb9621712010-04-24 17:59:49 +000014379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14380$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381fi
14382
Georg Brandl52d168a2008-01-07 18:10:24 +000014383# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014384if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014385 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014386then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014387 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014388
Matthias Kloseb9621712010-04-24 17:59:49 +000014389$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014390
Georg Brandl52d168a2008-01-07 18:10:24 +000014391else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014392 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014393fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14395$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014396
14397# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14399$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014400if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014402else
Matthias Kloseb9621712010-04-24 17:59:49 +000014403 ac_cv_c_bigendian=unknown
14404 # See if we're dealing with a universal compiler.
14405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14406/* end confdefs.h. */
14407#ifndef __APPLE_CC__
14408 not a universal capable compiler
14409 #endif
14410 typedef int dummy;
14411
Skip Montanaro6dead952003-09-25 14:50:04 +000014412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014413if ac_fn_c_try_compile "$LINENO"; then :
14414
14415 # Check for potential -arch flags. It is not universal unless
14416 # there are at least two -arch flags with different values.
14417 ac_arch=
14418 ac_prev=
14419 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14420 if test -n "$ac_prev"; then
14421 case $ac_word in
14422 i?86 | x86_64 | ppc | ppc64)
14423 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14424 ac_arch=$ac_word
14425 else
14426 ac_cv_c_bigendian=universal
14427 break
14428 fi
14429 ;;
14430 esac
14431 ac_prev=
14432 elif test "x$ac_word" = "x-arch"; then
14433 ac_prev=arch
14434 fi
14435 done
14436fi
14437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14438 if test $ac_cv_c_bigendian = unknown; then
14439 # See if sys/param.h defines the BYTE_ORDER macro.
14440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014441/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014442#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014444
Martin v. Löwis11437992002-04-12 09:54:03 +000014445int
14446main ()
14447{
Matthias Kloseb9621712010-04-24 17:59:49 +000014448#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14449 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14450 && LITTLE_ENDIAN)
14451 bogus endian macros
14452 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014453
14454 ;
14455 return 0;
14456}
14457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014458if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014459 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014461/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014462#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014463 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014464
Martin v. Löwis11437992002-04-12 09:54:03 +000014465int
14466main ()
14467{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014468#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 not big endian
14470 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014471
14472 ;
14473 return 0;
14474}
14475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014476if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014477 ac_cv_c_bigendian=yes
14478else
Matthias Kloseb9621712010-04-24 17:59:49 +000014479 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014480fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014482fi
14483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14484 fi
14485 if test $ac_cv_c_bigendian = unknown; then
14486 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014488/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014489#include <limits.h>
14490
Martin v. Löwis11437992002-04-12 09:54:03 +000014491int
14492main ()
14493{
Matthias Kloseb9621712010-04-24 17:59:49 +000014494#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14495 bogus endian macros
14496 #endif
14497
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 ;
14499 return 0;
14500}
14501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014502if ac_fn_c_try_compile "$LINENO"; then :
14503 # It does; now see whether it defined to _BIG_ENDIAN or not.
14504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14505/* end confdefs.h. */
14506#include <limits.h>
14507
14508int
14509main ()
14510{
14511#ifndef _BIG_ENDIAN
14512 not big endian
14513 #endif
14514
14515 ;
14516 return 0;
14517}
14518_ACEOF
14519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014521else
Matthias Kloseb9621712010-04-24 17:59:49 +000014522 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014523fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14525fi
14526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14527 fi
14528 if test $ac_cv_c_bigendian = unknown; then
14529 # Compile a test program.
14530 if test "$cross_compiling" = yes; then :
14531 # Try to guess by grepping values from an object file.
14532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14533/* end confdefs.h. */
14534short int ascii_mm[] =
14535 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14536 short int ascii_ii[] =
14537 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14538 int use_ascii (int i) {
14539 return ascii_mm[i] + ascii_ii[i];
14540 }
14541 short int ebcdic_ii[] =
14542 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14543 short int ebcdic_mm[] =
14544 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14545 int use_ebcdic (int i) {
14546 return ebcdic_mm[i] + ebcdic_ii[i];
14547 }
14548 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014549
Matthias Kloseb9621712010-04-24 17:59:49 +000014550int
14551main ()
14552{
14553return use_ascii (foo) == use_ebcdic (foo);
14554 ;
14555 return 0;
14556}
14557_ACEOF
14558if ac_fn_c_try_compile "$LINENO"; then :
14559 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14560 ac_cv_c_bigendian=yes
14561 fi
14562 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14563 if test "$ac_cv_c_bigendian" = unknown; then
14564 ac_cv_c_bigendian=no
14565 else
14566 # finding both strings is unlikely to happen, but who knows?
14567 ac_cv_c_bigendian=unknown
14568 fi
14569 fi
14570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014572else
Matthias Kloseb9621712010-04-24 17:59:49 +000014573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014574/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014575$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014576int
14577main ()
14578{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014579
Matthias Kloseb9621712010-04-24 17:59:49 +000014580 /* Are we little or big endian? From Harbison&Steele. */
14581 union
14582 {
14583 long int l;
14584 char c[sizeof (long int)];
14585 } u;
14586 u.l = 1;
14587 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014588
14589 ;
14590 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014591}
Martin v. Löwis11437992002-04-12 09:54:03 +000014592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014594 ac_cv_c_bigendian=no
14595else
Matthias Kloseb9621712010-04-24 17:59:49 +000014596 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14599 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014601
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14605$as_echo "$ac_cv_c_bigendian" >&6; }
14606 case $ac_cv_c_bigendian in #(
14607 yes)
14608 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14609;; #(
14610 no)
14611 ;; #(
14612 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014613
Matthias Kloseb9621712010-04-24 17:59:49 +000014614$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014615
Matthias Kloseb9621712010-04-24 17:59:49 +000014616 ;; #(
14617 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014618 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014619 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014620 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014621
Michael W. Hudson54241132001-12-07 15:38:26 +000014622
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014623# ABI version string for Python extension modules. This appears between the
14624# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14625# from the following attributes which affect the ABI of this Python build (in
14626# this order):
14627#
14628# * The Python implementation (always 'cpython-' for us)
14629# * The major and minor version numbers
14630# * --with-pydebug (adds a 'd')
14631# * --with-pymalloc (adds a 'm')
14632# * --with-wide-unicode (adds a 'u')
14633#
14634# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014635# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14636# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014637
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14639$as_echo_n "checking ABIFLAGS... " >&6; }
14640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14641$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14643$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014644SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14646$as_echo "$SOABI" >&6; }
14647
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014648
14649case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014650 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014651 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14652 *)
14653 EXT_SUFFIX=${SHLIB_SUFFIX};;
14654esac
14655
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14657$as_echo_n "checking LDVERSION... " >&6; }
14658LDVERSION='$(VERSION)$(ABIFLAGS)'
14659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14660$as_echo "$LDVERSION" >&6; }
14661
doko@python.org87421192013-01-26 11:39:31 +010014662
doko@ubuntu.come8042e52015-05-06 01:13:02 +020014663LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
doko@python.org87421192013-01-26 11:39:31 +010014664
14665
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014666# Check whether right shifting a negative integer extends the sign bit
14667# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14669$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014670if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014671 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014672else
Martin v. Löwis11437992002-04-12 09:54:03 +000014673
Matthias Kloseb9621712010-04-24 17:59:49 +000014674if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014675 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014676else
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014678/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014679
14680int main()
14681{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014682 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014683}
14684
Martin v. Löwis11437992002-04-12 09:54:03 +000014685_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014686if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014687 ac_cv_rshift_extends_sign=yes
14688else
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014690fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014691rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14692 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014693fi
14694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014695fi
14696
Matthias Kloseb9621712010-04-24 17:59:49 +000014697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14698$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014699if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014700then
Martin v. Löwis11437992002-04-12 09:54:03 +000014701
Matthias Kloseb9621712010-04-24 17:59:49 +000014702$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014703
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014704fi
14705
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014706# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14708$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014709if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014710 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014711else
Martin v. Löwis11437992002-04-12 09:54:03 +000014712
Matthias Kloseb9621712010-04-24 17:59:49 +000014713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014714/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014715#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014716int
14717main ()
14718{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014719
14720 FILE *f = fopen("/dev/null", "r");
14721 flockfile(f);
14722 getc_unlocked(f);
14723 funlockfile(f);
14724
Martin v. Löwis11437992002-04-12 09:54:03 +000014725 ;
14726 return 0;
14727}
14728_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014729if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014730 ac_cv_have_getc_unlocked=yes
14731else
Matthias Kloseb9621712010-04-24 17:59:49 +000014732 ac_cv_have_getc_unlocked=no
14733fi
14734rm -f core conftest.err conftest.$ac_objext \
14735 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014736fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014737
Matthias Kloseb9621712010-04-24 17:59:49 +000014738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14739$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014740if test "$ac_cv_have_getc_unlocked" = yes
14741then
Martin v. Löwis11437992002-04-12 09:54:03 +000014742
Matthias Kloseb9621712010-04-24 17:59:49 +000014743$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014744
14745fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014746
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014747# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014748# save the value of LIBS so we don't actually link Python with readline
14749LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014750
Gregory P. Smith18820942008-09-07 06:24:49 +000014751# On some systems we need to link readline to a termcap compatible
14752# library. NOTE: Keep the precedence of listed libraries synchronised
14753# with setup.py.
14754py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14756$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014757for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014758 if test -z "$py_libtermcap"; then
14759 READLINE_LIBS="-lreadline"
14760 else
14761 READLINE_LIBS="-lreadline -l$py_libtermcap"
14762 fi
14763 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014765/* end confdefs.h. */
14766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014767/* Override any GCC internal prototype to avoid an error.
14768 Use char because int might match the return type of a GCC
14769 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014770#ifdef __cplusplus
14771extern "C"
14772#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014773char readline ();
14774int
14775main ()
14776{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014777return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014778 ;
14779 return 0;
14780}
14781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014782if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014783 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014784fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014785rm -f core conftest.err conftest.$ac_objext \
14786 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014787 if test $py_cv_lib_readline = yes; then
14788 break
14789 fi
14790done
14791# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14792#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014793if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14795$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014796else
Matthias Kloseb9621712010-04-24 17:59:49 +000014797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14798$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014799
Matthias Kloseb9621712010-04-24 17:59:49 +000014800$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014801
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014802fi
14803
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014804# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14806$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014807if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014809else
14810 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014811LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014813/* end confdefs.h. */
14814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014815/* Override any GCC internal prototype to avoid an error.
14816 Use char because int might match the return type of a GCC
14817 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014818#ifdef __cplusplus
14819extern "C"
14820#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014821char rl_callback_handler_install ();
14822int
14823main ()
14824{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014826 ;
14827 return 0;
14828}
14829_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014830if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014831 ac_cv_lib_readline_rl_callback_handler_install=yes
14832else
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014835rm -f core conftest.err conftest.$ac_objext \
14836 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014837LIBS=$ac_check_lib_save_LIBS
14838fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14840$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014841if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014842
Matthias Kloseb9621712010-04-24 17:59:49 +000014843$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014844
14845fi
14846
14847
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014848# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014850/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014851#include <readline/readline.h>
14852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014853if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014854 have_readline=yes
14855else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014856 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014857
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014858fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014859rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014860if test $have_readline = yes
14861then
Matthias Kloseb9621712010-04-24 17:59:49 +000014862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014863/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014864#include <readline/readline.h>
14865
14866_ACEOF
14867if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014869
Matthias Kloseb9621712010-04-24 17:59:49 +000014870$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014871
14872fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014873rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014874
Matthias Kloseb9621712010-04-24 17:59:49 +000014875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014876/* end confdefs.h. */
14877#include <readline/readline.h>
14878
14879_ACEOF
14880if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014882
Matthias Kloseb9621712010-04-24 17:59:49 +000014883$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014884
14885fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014886rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014887
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014888fi
14889
Martin v. Löwis0daad592001-09-30 21:09:59 +000014890# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14892$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014893if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014894 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014895else
Martin v. Löwis11437992002-04-12 09:54:03 +000014896 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014897LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901/* Override any GCC internal prototype to avoid an error.
14902 Use char because int might match the return type of a GCC
14903 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014904#ifdef __cplusplus
14905extern "C"
14906#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014907char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014908int
14909main ()
14910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014911return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014912 ;
14913 return 0;
14914}
14915_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014916if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014917 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014918else
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014920fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014921rm -f core conftest.err conftest.$ac_objext \
14922 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014923LIBS=$ac_check_lib_save_LIBS
14924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14926$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014927if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014928
Matthias Kloseb9621712010-04-24 17:59:49 +000014929$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014930
Martin v. Löwis0daad592001-09-30 21:09:59 +000014931fi
14932
Michael W. Hudson54241132001-12-07 15:38:26 +000014933
Thomas Wouters89d996e2007-09-08 17:39:28 +000014934# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14936$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014937if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014939else
14940 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014941LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014943/* end confdefs.h. */
14944
14945/* Override any GCC internal prototype to avoid an error.
14946 Use char because int might match the return type of a GCC
14947 builtin and then its argument prototype would still apply. */
14948#ifdef __cplusplus
14949extern "C"
14950#endif
14951char rl_completion_display_matches_hook ();
14952int
14953main ()
14954{
14955return rl_completion_display_matches_hook ();
14956 ;
14957 return 0;
14958}
14959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014960if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014961 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14962else
Matthias Kloseb9621712010-04-24 17:59:49 +000014963 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014965rm -f core conftest.err conftest.$ac_objext \
14966 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014967LIBS=$ac_check_lib_save_LIBS
14968fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14970$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014971if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014972
Matthias Kloseb9621712010-04-24 17:59:49 +000014973$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014974
14975fi
14976
14977
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014978# also in 4.0, but not in editline
14979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14980$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14981if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14982 $as_echo_n "(cached) " >&6
14983else
14984 ac_check_lib_save_LIBS=$LIBS
14985LIBS="-lreadline $READLINE_LIBS $LIBS"
14986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14987/* end confdefs.h. */
14988
14989/* Override any GCC internal prototype to avoid an error.
14990 Use char because int might match the return type of a GCC
14991 builtin and then its argument prototype would still apply. */
14992#ifdef __cplusplus
14993extern "C"
14994#endif
14995char rl_resize_terminal ();
14996int
14997main ()
14998{
14999return rl_resize_terminal ();
15000 ;
15001 return 0;
15002}
15003_ACEOF
15004if ac_fn_c_try_link "$LINENO"; then :
15005 ac_cv_lib_readline_rl_resize_terminal=yes
15006else
15007 ac_cv_lib_readline_rl_resize_terminal=no
15008fi
15009rm -f core conftest.err conftest.$ac_objext \
15010 conftest$ac_exeext conftest.$ac_ext
15011LIBS=$ac_check_lib_save_LIBS
15012fi
15013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15014$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15015if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15016
15017$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15018
15019fi
15020
15021
Martin v. Löwis0daad592001-09-30 21:09:59 +000015022# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15024$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015025if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015026 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015027else
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015029LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015031/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033/* Override any GCC internal prototype to avoid an error.
15034 Use char because int might match the return type of a GCC
15035 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015036#ifdef __cplusplus
15037extern "C"
15038#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015039char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015040int
15041main ()
15042{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015043return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 ;
15045 return 0;
15046}
15047_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015048if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015050else
Matthias Kloseb9621712010-04-24 17:59:49 +000015051 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015053rm -f core conftest.err conftest.$ac_objext \
15054 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015055LIBS=$ac_check_lib_save_LIBS
15056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15058$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015059if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015060
Matthias Kloseb9621712010-04-24 17:59:49 +000015061$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015062
Guido van Rossum353ae582001-07-10 16:45:32 +000015063fi
15064
Jack Jansendd19cf82001-12-06 22:36:17 +000015065
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015066# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015067cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015068/* end confdefs.h. */
15069#include <readline/readline.h>
15070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015071if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015072 have_readline=yes
15073else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015074 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015075
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015076fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015077rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015078if test $have_readline = yes
15079then
Matthias Kloseb9621712010-04-24 17:59:49 +000015080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015081/* end confdefs.h. */
15082#include <readline/readline.h>
15083
15084_ACEOF
15085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015086 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015087
Matthias Kloseb9621712010-04-24 17:59:49 +000015088$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015089
15090fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015091rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015092
15093fi
15094
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15096$as_echo_n "checking for append_history in -lreadline... " >&6; }
15097if ${ac_cv_lib_readline_append_history+:} false; then :
15098 $as_echo_n "(cached) " >&6
15099else
15100 ac_check_lib_save_LIBS=$LIBS
15101LIBS="-lreadline $READLINE_LIBS $LIBS"
15102cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15103/* end confdefs.h. */
15104
15105/* Override any GCC internal prototype to avoid an error.
15106 Use char because int might match the return type of a GCC
15107 builtin and then its argument prototype would still apply. */
15108#ifdef __cplusplus
15109extern "C"
15110#endif
15111char append_history ();
15112int
15113main ()
15114{
15115return append_history ();
15116 ;
15117 return 0;
15118}
15119_ACEOF
15120if ac_fn_c_try_link "$LINENO"; then :
15121 ac_cv_lib_readline_append_history=yes
15122else
15123 ac_cv_lib_readline_append_history=no
15124fi
15125rm -f core conftest.err conftest.$ac_objext \
15126 conftest$ac_exeext conftest.$ac_ext
15127LIBS=$ac_check_lib_save_LIBS
15128fi
15129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15130$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15131if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15132
15133$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15134
15135fi
15136
15137
Martin v. Löwis82bca632006-02-10 20:49:30 +000015138# End of readline checks: restore LIBS
15139LIBS=$LIBS_no_readline
15140
Matthias Kloseb9621712010-04-24 17:59:49 +000015141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15142$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015143if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015144 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015145else
Martin v. Löwis11437992002-04-12 09:54:03 +000015146
Matthias Kloseb9621712010-04-24 17:59:49 +000015147if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015148 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015149else
Matthias Kloseb9621712010-04-24 17:59:49 +000015150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015151/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015152
15153int main()
15154{
15155 int val1 = nice(1);
15156 if (val1 != -1 && val1 == nice(2))
15157 exit(0);
15158 exit(1);
15159}
15160
Martin v. Löwis11437992002-04-12 09:54:03 +000015161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015162if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015163 ac_cv_broken_nice=yes
15164else
Matthias Kloseb9621712010-04-24 17:59:49 +000015165 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015166fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015167rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15168 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015169fi
15170
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015171fi
15172
Matthias Kloseb9621712010-04-24 17:59:49 +000015173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15174$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015175if test "$ac_cv_broken_nice" = yes
15176then
Martin v. Löwis11437992002-04-12 09:54:03 +000015177
Matthias Kloseb9621712010-04-24 17:59:49 +000015178$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015179
15180fi
15181
Matthias Kloseb9621712010-04-24 17:59:49 +000015182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15183$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015184if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015185 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015186else
Matthias Kloseb9621712010-04-24 17:59:49 +000015187 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015188 ac_cv_broken_poll=no
15189else
Matthias Kloseb9621712010-04-24 17:59:49 +000015190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015191/* end confdefs.h. */
15192
15193#include <poll.h>
15194
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015195int main()
15196{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015197 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015198 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015199
15200 close (42);
15201
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015202 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015203 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015204 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015205 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015206 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015207 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015208 return 1;
15209}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015210
15211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015212if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015213 ac_cv_broken_poll=yes
15214else
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015216fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15218 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015221fi
15222
Matthias Kloseb9621712010-04-24 17:59:49 +000015223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15224$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015225if test "$ac_cv_broken_poll" = yes
15226then
15227
Matthias Kloseb9621712010-04-24 17:59:49 +000015228$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015229
15230fi
15231
Brett Cannon43802422005-02-10 20:48:03 +000015232# 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 +000015233# (which is not required by ISO C or UNIX spec) and/or if we support
15234# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015235ac_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 +000015236#include <$ac_cv_struct_tm>
15237
Matthias Kloseb9621712010-04-24 17:59:49 +000015238"
Victor Stinnere0be4232011-10-25 13:06:09 +020015239if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015240
15241cat >>confdefs.h <<_ACEOF
15242#define HAVE_STRUCT_TM_TM_ZONE 1
15243_ACEOF
15244
15245
15246fi
15247
15248if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15249
Matthias Kloseb9621712010-04-24 17:59:49 +000015250$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015251
15252else
Matthias Kloseb9621712010-04-24 17:59:49 +000015253 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15254"
Victor Stinnere0be4232011-10-25 13:06:09 +020015255if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015256 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015257else
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259fi
15260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015262#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263_ACEOF
15264
Matthias Kloseb9621712010-04-24 17:59:49 +000015265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15266$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015267if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015268 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269else
Matthias Kloseb9621712010-04-24 17:59:49 +000015270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015271/* end confdefs.h. */
15272#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015273#if !HAVE_DECL_TZNAME
15274extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015275#endif
15276
15277int
15278main ()
15279{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015281 ;
15282 return 0;
15283}
15284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015285if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015286 ac_cv_var_tzname=yes
15287else
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015290rm -f core conftest.err conftest.$ac_objext \
15291 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015292fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15294$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015295 if test $ac_cv_var_tzname = yes; then
15296
Matthias Kloseb9621712010-04-24 17:59:49 +000015297$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015298
15299 fi
15300fi
15301
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015302
Martin v. Löwis1d459062005-03-14 21:23:33 +000015303# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15305$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015306if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015307 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015308else
15309
Matthias Kloseb9621712010-04-24 17:59:49 +000015310if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015311 ac_cv_working_tzset=no
15312else
Matthias Kloseb9621712010-04-24 17:59:49 +000015313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015314/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015315
15316#include <stdlib.h>
15317#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015318#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015319
15320#if HAVE_TZNAME
15321extern char *tzname[];
15322#endif
15323
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015324int main()
15325{
Brett Cannon18367812003-09-19 00:59:16 +000015326 /* Note that we need to ensure that not only does tzset(3)
15327 do 'something' with localtime, but it works as documented
15328 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015329 This includes making sure that tzname is set properly if
15330 tm->tm_zone does not exist since it is the alternative way
15331 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015332
15333 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015334 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015335 */
15336
Martin v. Löwis1d459062005-03-14 21:23:33 +000015337 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015338 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15339
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015340 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015341 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015342 if (localtime(&groundhogday)->tm_hour != 0)
15343 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015344#if HAVE_TZNAME
15345 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15346 if (strcmp(tzname[0], "UTC") ||
15347 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15348 exit(1);
15349#endif
Brett Cannon18367812003-09-19 00:59:16 +000015350
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015351 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015352 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015353 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015354 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015355#if HAVE_TZNAME
15356 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15357 exit(1);
15358#endif
Brett Cannon18367812003-09-19 00:59:16 +000015359
15360 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15361 tzset();
15362 if (localtime(&groundhogday)->tm_hour != 11)
15363 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015364#if HAVE_TZNAME
15365 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15366 exit(1);
15367#endif
15368
15369#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015370 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15371 exit(1);
15372 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15373 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015374#endif
Brett Cannon18367812003-09-19 00:59:16 +000015375
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015376 exit(0);
15377}
15378
15379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015380if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015381 ac_cv_working_tzset=yes
15382else
Matthias Kloseb9621712010-04-24 17:59:49 +000015383 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15386 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015387fi
15388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015389fi
15390
Matthias Kloseb9621712010-04-24 17:59:49 +000015391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15392$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015393if test "$ac_cv_working_tzset" = yes
15394then
15395
Matthias Kloseb9621712010-04-24 17:59:49 +000015396$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015397
15398fi
15399
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015400# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15402$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015403if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015404 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015405else
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015407/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015408#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015409int
15410main ()
15411{
15412
15413struct stat st;
15414st.st_mtim.tv_nsec = 1;
15415
15416 ;
15417 return 0;
15418}
15419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015421 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015422else
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15426fi
15427
Matthias Kloseb9621712010-04-24 17:59:49 +000015428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15429$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015430if test "$ac_cv_stat_tv_nsec" = yes
15431then
15432
Matthias Kloseb9621712010-04-24 17:59:49 +000015433$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015434
15435fi
15436
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015437# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15439$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015440if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015441 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015442else
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015444/* end confdefs.h. */
15445#include <sys/stat.h>
15446int
15447main ()
15448{
15449
15450struct stat st;
15451st.st_mtimespec.tv_nsec = 1;
15452
15453 ;
15454 return 0;
15455}
15456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015457if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015458 ac_cv_stat_tv_nsec2=yes
15459else
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15463fi
15464
Matthias Kloseb9621712010-04-24 17:59:49 +000015465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15466$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015467if test "$ac_cv_stat_tv_nsec2" = yes
15468then
15469
Matthias Kloseb9621712010-04-24 17:59:49 +000015470$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015471
15472fi
15473
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015474# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015475ac_save_cppflags="$CPPFLAGS"
15476CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015477
15478for ac_header in curses.h ncurses.h
15479do :
15480 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15481ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15482if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15483 cat >>confdefs.h <<_ACEOF
15484#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15485_ACEOF
15486
15487fi
15488
15489done
15490
15491
15492# On Solaris, term.h requires curses.h
15493for ac_header in term.h
15494do :
15495 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15496#ifdef HAVE_CURSES_H
15497#include <curses.h>
15498#endif
15499
15500"
15501if test "x$ac_cv_header_term_h" = xyes; then :
15502 cat >>confdefs.h <<_ACEOF
15503#define HAVE_TERM_H 1
15504_ACEOF
15505
15506fi
15507
15508done
15509
15510
Jack Jansen666b1e72001-10-31 12:11:48 +000015511# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15513$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015514if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015515 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015516else
Matthias Kloseb9621712010-04-24 17:59:49 +000015517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015518/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015519#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015520int
15521main ()
15522{
Jack Jansen666b1e72001-10-31 12:11:48 +000015523
15524 int rtn;
15525 rtn = mvwdelch(0,0,0);
15526
Martin v. Löwis11437992002-04-12 09:54:03 +000015527 ;
15528 return 0;
15529}
15530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015531if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015532 ac_cv_mvwdelch_is_expression=yes
15533else
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15537fi
15538
Matthias Kloseb9621712010-04-24 17:59:49 +000015539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15540$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015541
15542if test "$ac_cv_mvwdelch_is_expression" = yes
15543then
Martin v. Löwis11437992002-04-12 09:54:03 +000015544
Matthias Kloseb9621712010-04-24 17:59:49 +000015545$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015546
15547fi
15548
Matthias Kloseb9621712010-04-24 17:59:49 +000015549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15550$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015551if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015553else
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015555/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015556#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015557int
15558main ()
15559{
Jack Jansen666b1e72001-10-31 12:11:48 +000015560
15561 WINDOW *w;
15562 w->_flags = 0;
15563
Martin v. Löwis11437992002-04-12 09:54:03 +000015564 ;
15565 return 0;
15566}
15567_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015568if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015569 ac_cv_window_has_flags=yes
15570else
Matthias Kloseb9621712010-04-24 17:59:49 +000015571 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15574fi
15575
Matthias Kloseb9621712010-04-24 17:59:49 +000015576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15577$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015578
Jack Jansen666b1e72001-10-31 12:11:48 +000015579
15580if test "$ac_cv_window_has_flags" = yes
15581then
Martin v. Löwis11437992002-04-12 09:54:03 +000015582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015584
15585fi
15586
Matthias Kloseb9621712010-04-24 17:59:49 +000015587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15588$as_echo_n "checking for is_term_resized... " >&6; }
15589cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015590/* end confdefs.h. */
15591#include <curses.h>
15592int
15593main ()
15594{
15595void *x=is_term_resized
15596 ;
15597 return 0;
15598}
15599_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015600if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015601
Matthias Kloseb9621712010-04-24 17:59:49 +000015602$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015603
Matthias Kloseb159a552010-04-25 21:00:44 +000015604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015605$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015606else
Matthias Kloseb9621712010-04-24 17:59:49 +000015607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15608$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015609
15610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15612
Matthias Kloseb9621712010-04-24 17:59:49 +000015613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15614$as_echo_n "checking for resize_term... " >&6; }
15615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015616/* end confdefs.h. */
15617#include <curses.h>
15618int
15619main ()
15620{
15621void *x=resize_term
15622 ;
15623 return 0;
15624}
15625_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015626if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015627
Matthias Kloseb9621712010-04-24 17:59:49 +000015628$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015629
Matthias Kloseb159a552010-04-25 21:00:44 +000015630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015631$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015632else
Matthias Kloseb9621712010-04-24 17:59:49 +000015633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15634$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015635
15636fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15638
Matthias Kloseb9621712010-04-24 17:59:49 +000015639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15640$as_echo_n "checking for resizeterm... " >&6; }
15641cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015642/* end confdefs.h. */
15643#include <curses.h>
15644int
15645main ()
15646{
15647void *x=resizeterm
15648 ;
15649 return 0;
15650}
15651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015652if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015655
Matthias Kloseb159a552010-04-25 21:00:44 +000015656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015657$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015658else
Matthias Kloseb9621712010-04-24 17:59:49 +000015659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15660$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015661
15662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015664# last curses configure check
15665CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15668$as_echo "$as_me: checking for device files" >&6;}
15669
15670if test "x$cross_compiling" = xyes; then
15671 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15673$as_echo_n "checking for /dev/ptmx... " >&6; }
15674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15675$as_echo "not set" >&6; }
15676 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15677 fi
15678 if test "${ac_cv_file__dev_ptc+set}" != set; then
15679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15680$as_echo_n "checking for /dev/ptc... " >&6; }
15681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15682$as_echo "not set" >&6; }
15683 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15684 fi
15685fi
15686
Matthias Kloseb9621712010-04-24 17:59:49 +000015687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15688$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015689if ${ac_cv_file__dev_ptmx+:} false; then :
15690 $as_echo_n "(cached) " >&6
15691else
15692 test "$cross_compiling" = yes &&
15693 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15694if test -r "/dev/ptmx"; then
15695 ac_cv_file__dev_ptmx=yes
15696else
15697 ac_cv_file__dev_ptmx=no
15698fi
15699fi
15700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15701$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15702if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015703
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015704fi
15705
15706if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015707
Matthias Kloseb9621712010-04-24 17:59:49 +000015708$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015709
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15712$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015713if ${ac_cv_file__dev_ptc+:} false; then :
15714 $as_echo_n "(cached) " >&6
15715else
15716 test "$cross_compiling" = yes &&
15717 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15718if test -r "/dev/ptc"; then
15719 ac_cv_file__dev_ptc=yes
15720else
15721 ac_cv_file__dev_ptc=no
15722fi
15723fi
15724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15725$as_echo "$ac_cv_file__dev_ptc" >&6; }
15726if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015727
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015728fi
15729
15730if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015731
Matthias Kloseb9621712010-04-24 17:59:49 +000015732$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015733
Neal Norwitz865400f2003-03-21 01:42:58 +000015734fi
15735
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015736if test "$have_long_long" = yes
15737then
Matthias Kloseb9621712010-04-24 17:59:49 +000015738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15739$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015740 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015741 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015742else
Matthias Kloseb9621712010-04-24 17:59:49 +000015743 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015744 ac_cv_have_long_long_format="cross -- assuming no"
15745 if test x$GCC = xyes; then
15746 save_CFLAGS=$CFLAGS
15747 CFLAGS="$CFLAGS -Werror -Wformat"
15748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15749/* end confdefs.h. */
15750
15751 #include <stdio.h>
15752 #include <stddef.h>
15753
15754int
15755main ()
15756{
15757
15758 char *buffer;
15759 sprintf(buffer, "%lld", (long long)123);
15760 sprintf(buffer, "%lld", (long long)-123);
15761 sprintf(buffer, "%llu", (unsigned long long)123);
15762
15763 ;
15764 return 0;
15765}
15766_ACEOF
15767if ac_fn_c_try_compile "$LINENO"; then :
15768 ac_cv_have_long_long_format=yes
15769
15770fi
15771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15772 CFLAGS=$save_CFLAGS
15773 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015774else
Matthias Kloseb9621712010-04-24 17:59:49 +000015775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015776/* end confdefs.h. */
15777
15778 #include <stdio.h>
15779 #include <stddef.h>
15780 #include <string.h>
15781
15782 #ifdef HAVE_SYS_TYPES_H
15783 #include <sys/types.h>
15784 #endif
15785
15786 int main()
15787 {
15788 char buffer[256];
15789
15790 if (sprintf(buffer, "%lld", (long long)123) < 0)
15791 return 1;
15792 if (strcmp(buffer, "123"))
15793 return 1;
15794
15795 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15796 return 1;
15797 if (strcmp(buffer, "-123"))
15798 return 1;
15799
15800 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15801 return 1;
15802 if (strcmp(buffer, "123"))
15803 return 1;
15804
15805 return 0;
15806 }
15807
15808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015809if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015810 ac_cv_have_long_long_format=yes
15811else
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015816fi
15817
15818
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015819fi
15820
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15822$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015823fi
15824
Mark Dickinson89d7d412009-12-31 20:50:59 +000015825if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015826then
15827
Matthias Kloseb9621712010-04-24 17:59:49 +000015828$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015829
15830fi
15831
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015832if test $ac_sys_system = Darwin
15833then
15834 LIBS="$LIBS -framework CoreFoundation"
15835fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015836
Matthias Kloseb9621712010-04-24 17:59:49 +000015837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15838$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015839if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015840 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015841else
Matthias Kloseb9621712010-04-24 17:59:49 +000015842 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015843 ac_cv_have_size_t_format="cross -- assuming yes"
15844
Thomas Wouters477c8d52006-05-27 19:21:47 +000015845else
Matthias Kloseb9621712010-04-24 17:59:49 +000015846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015847/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015848
Thomas Wouters477c8d52006-05-27 19:21:47 +000015849#include <stdio.h>
15850#include <stddef.h>
15851#include <string.h>
15852
Christian Heimes2c181612007-12-17 20:04:13 +000015853#ifdef HAVE_SYS_TYPES_H
15854#include <sys/types.h>
15855#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015856
15857#ifdef HAVE_SSIZE_T
15858typedef ssize_t Py_ssize_t;
15859#elif SIZEOF_VOID_P == SIZEOF_LONG
15860typedef long Py_ssize_t;
15861#else
15862typedef int Py_ssize_t;
15863#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015864
Christian Heimes2c181612007-12-17 20:04:13 +000015865int main()
15866{
15867 char buffer[256];
15868
Thomas Wouters477c8d52006-05-27 19:21:47 +000015869 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15870 return 1;
15871
Thomas Wouters89f507f2006-12-13 04:49:30 +000015872 if (strcmp(buffer, "123"))
15873 return 1;
15874
15875 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15876 return 1;
15877
15878 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015879 return 1;
15880
15881 return 0;
15882}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015883
Thomas Wouters477c8d52006-05-27 19:21:47 +000015884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015885if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015886 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015887else
Matthias Kloseb9621712010-04-24 17:59:49 +000015888 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015892fi
15893
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15896$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015897if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015898
Matthias Kloseb9621712010-04-24 17:59:49 +000015899$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015900
15901fi
15902
Matthias Kloseb9621712010-04-24 17:59:49 +000015903ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015904#ifdef HAVE_SYS_TYPES_H
15905#include <sys/types.h>
15906#endif
15907#ifdef HAVE_SYS_SOCKET_H
15908#include <sys/socket.h>
15909#endif
15910
Matthias Kloseb9621712010-04-24 17:59:49 +000015911"
Victor Stinnere0be4232011-10-25 13:06:09 +020015912if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015913
Martin v. Löwis11437992002-04-12 09:54:03 +000015914else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015915
Matthias Kloseb9621712010-04-24 17:59:49 +000015916$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015917
15918fi
15919
Michael W. Hudson54241132001-12-07 15:38:26 +000015920
Matthias Kloseb9621712010-04-24 17:59:49 +000015921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15922$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015923if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015924 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015925else
Matthias Kloseb9621712010-04-24 17:59:49 +000015926 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015927 ac_cv_broken_mbstowcs=no
15928else
Matthias Kloseb9621712010-04-24 17:59:49 +000015929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015930/* end confdefs.h. */
15931
Stefan Krah19c21392012-11-22 23:47:32 +010015932#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015933#include<stdlib.h>
15934int main() {
15935 size_t len = -1;
15936 const char *str = "text";
15937 len = mbstowcs(NULL, str, 0);
15938 return (len != 4);
15939}
15940
15941_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015942if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015943 ac_cv_broken_mbstowcs=no
15944else
Matthias Kloseb9621712010-04-24 17:59:49 +000015945 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015946fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015949fi
15950
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015951fi
15952
Matthias Kloseb9621712010-04-24 17:59:49 +000015953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15954$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015955if test "$ac_cv_broken_mbstowcs" = yes
15956then
15957
Matthias Kloseb9621712010-04-24 17:59:49 +000015958$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015959
15960fi
15961
Antoine Pitroub52ec782009-01-25 16:34:23 +000015962# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15964$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015965
15966# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015967if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015968 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015969if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015970then
15971
Matthias Kloseb9621712010-04-24 17:59:49 +000015972$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015973
Matthias Kloseb9621712010-04-24 17:59:49 +000015974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15975$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015976fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015977if test "$withval" = no
15978then
15979
15980$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15981
Matthias Kloseb9621712010-04-24 17:59:49 +000015982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15983$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015984fi
15985
Antoine Pitrou042b1282010-08-13 21:15:58 +000015986else
15987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15988$as_echo "no value specified" >&6; }
15989fi
15990
Antoine Pitroub52ec782009-01-25 16:34:23 +000015991
Matthias Kloseb17289e2012-03-15 19:51:34 +010015992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15993$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15994if ${ac_cv_computed_gotos+:} false; then :
15995 $as_echo_n "(cached) " >&6
15996else
15997 if test "$cross_compiling" = yes; then :
15998 if test "${with_computed_gotos+set}" = set; then
15999 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16000 else
16001 ac_cv_computed_gotos=no
16002 fi
16003else
16004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16005/* end confdefs.h. */
16006
16007int main(int argc, char **argv)
16008{
16009 static void *targets[1] = { &&LABEL1 };
16010 goto LABEL2;
16011LABEL1:
16012 return 0;
16013LABEL2:
16014 goto *targets[0];
16015 return 1;
16016}
16017
16018_ACEOF
16019if ac_fn_c_try_run "$LINENO"; then :
16020 ac_cv_computed_gotos=yes
16021else
16022 ac_cv_computed_gotos=no
16023fi
16024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16025 conftest.$ac_objext conftest.beam conftest.$ac_ext
16026fi
16027
16028fi
16029
16030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16031$as_echo "$ac_cv_computed_gotos" >&6; }
16032case "$ac_cv_computed_gotos" in yes*)
16033
16034$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16035
16036esac
16037
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016038case $ac_sys_system in
16039AIX*)
16040
16041$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16042 ;;
16043esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016044
Michael W. Hudson54241132001-12-07 15:38:26 +000016045
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016046
16047
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016048for h in `(cd $srcdir;echo Python/thread_*.h)`
16049do
16050 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16051done
16052
Michael W. Hudson54241132001-12-07 15:38:26 +000016053
Ned Deily0db50cf2014-07-25 12:41:31 -070016054SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16056$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016057for dir in $SRCDIRS; do
16058 if test ! -d $dir; then
16059 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016060 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016061done
Matthias Kloseb9621712010-04-24 17:59:49 +000016062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16063$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016064
Stefan Krah1919b7e2012-03-21 18:25:23 +010016065# Availability of -O2:
16066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16067$as_echo_n "checking for -O2... " >&6; }
16068saved_cflags="$CFLAGS"
16069CFLAGS="-O2"
16070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16071/* end confdefs.h. */
16072
16073int
16074main ()
16075{
16076
16077
16078 ;
16079 return 0;
16080}
16081_ACEOF
16082if ac_fn_c_try_compile "$LINENO"; then :
16083 have_O2=yes
16084else
16085 have_O2=no
16086fi
16087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16089$as_echo "$have_O2" >&6; }
16090CFLAGS="$saved_cflags"
16091
16092# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16093# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16095$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16096saved_cflags="$CFLAGS"
16097CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16098if test "$have_O2" = no; then
16099 CFLAGS=""
16100fi
16101if test "$cross_compiling" = yes; then :
16102 have_glibc_memmove_bug=undefined
16103else
16104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16105/* end confdefs.h. */
16106
16107#include <stdio.h>
16108#include <stdlib.h>
16109#include <string.h>
16110void foo(void *p, void *q) { memmove(p, q, 19); }
16111int main() {
16112 char a[32] = "123456789000000000";
16113 foo(&a[9], a);
16114 if (strcmp(a, "123456789123456789000000000") != 0)
16115 return 1;
16116 foo(a, &a[9]);
16117 if (strcmp(a, "123456789000000000") != 0)
16118 return 1;
16119 return 0;
16120}
16121
16122_ACEOF
16123if ac_fn_c_try_run "$LINENO"; then :
16124 have_glibc_memmove_bug=no
16125else
16126 have_glibc_memmove_bug=yes
16127fi
16128rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16129 conftest.$ac_objext conftest.beam conftest.$ac_ext
16130fi
16131
16132CFLAGS="$saved_cflags"
16133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16134$as_echo "$have_glibc_memmove_bug" >&6; }
16135if test "$have_glibc_memmove_bug" = yes; then
16136
16137$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16138
16139fi
16140
16141if test "$have_gcc_asm_for_x87" = yes; then
16142 # Some versions of gcc miscompile inline asm:
16143 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16144 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16145 case $CC in
16146 *gcc*)
16147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16148$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16149 saved_cflags="$CFLAGS"
16150 CFLAGS="-O2"
16151 if test "$cross_compiling" = yes; then :
16152 have_ipa_pure_const_bug=undefined
16153else
16154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16155/* end confdefs.h. */
16156
16157 __attribute__((noinline)) int
16158 foo(int *p) {
16159 int r;
16160 asm ( "movl \$6, (%1)\n\t"
16161 "xorl %0, %0\n\t"
16162 : "=r" (r) : "r" (p) : "memory"
16163 );
16164 return r;
16165 }
16166 int main() {
16167 int p = 8;
16168 if ((foo(&p) ? : p) != 6)
16169 return 1;
16170 return 0;
16171 }
16172
16173_ACEOF
16174if ac_fn_c_try_run "$LINENO"; then :
16175 have_ipa_pure_const_bug=no
16176else
16177 have_ipa_pure_const_bug=yes
16178fi
16179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16180 conftest.$ac_objext conftest.beam conftest.$ac_ext
16181fi
16182
16183 CFLAGS="$saved_cflags"
16184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16185$as_echo "$have_ipa_pure_const_bug" >&6; }
16186 if test "$have_ipa_pure_const_bug" = yes; then
16187
16188$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16189
16190 fi
16191 ;;
16192 esac
16193fi
16194
Victor Stinner4f5366e2015-01-09 02:13:19 +010016195# Check for stdatomic.h
16196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16197$as_echo_n "checking for stdatomic.h... " >&6; }
16198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16199/* end confdefs.h. */
16200
16201
16202 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016203 atomic_int value = ATOMIC_VAR_INIT(1);
16204 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016205 int main() {
16206 int loaded_value = atomic_load(&value);
16207 return 0;
16208 }
16209
16210
16211_ACEOF
16212if ac_fn_c_try_link "$LINENO"; then :
16213 have_stdatomic_h=yes
16214else
16215 have_stdatomic_h=no
16216fi
16217rm -f core conftest.err conftest.$ac_objext \
16218 conftest$ac_exeext conftest.$ac_ext
16219
16220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16221$as_echo "$have_stdatomic_h" >&6; }
16222
16223if test "$have_stdatomic_h" = yes; then
16224
16225$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16226
16227fi
16228
16229# Check for GCC >= 4.7 __atomic builtins
16230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16231$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16233/* end confdefs.h. */
16234
16235
16236 volatile int val = 1;
16237 int main() {
16238 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16239 return 0;
16240 }
16241
16242
16243_ACEOF
16244if ac_fn_c_try_link "$LINENO"; then :
16245 have_builtin_atomic=yes
16246else
16247 have_builtin_atomic=no
16248fi
16249rm -f core conftest.err conftest.$ac_objext \
16250 conftest$ac_exeext conftest.$ac_ext
16251
16252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16253$as_echo "$have_builtin_atomic" >&6; }
16254
16255if test "$have_builtin_atomic" = yes; then
16256
16257$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16258
16259fi
16260
Ned Deily322f5ba2013-11-21 23:01:59 -080016261# ensurepip option
16262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16263$as_echo_n "checking for ensurepip... " >&6; }
16264
16265# Check whether --with-ensurepip was given.
16266if test "${with_ensurepip+set}" = set; then :
16267 withval=$with_ensurepip;
16268else
16269 with_ensurepip=upgrade
16270fi
16271
16272case $with_ensurepip in #(
16273 yes|upgrade) :
16274 ENSUREPIP=upgrade ;; #(
16275 install) :
16276 ENSUREPIP=install ;; #(
16277 no) :
16278 ENSUREPIP=no ;; #(
16279 *) :
16280 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16281esac
16282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16283$as_echo "$ENSUREPIP" >&6; }
16284
16285
Victor Stinner35a97c02015-03-08 02:59:09 +010016286# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16288$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16290/* end confdefs.h. */
16291
16292
16293 #include <dirent.h>
16294
16295 int main() {
16296 struct dirent entry;
16297 return entry.d_type == DT_UNKNOWN;
16298 }
16299
16300
16301_ACEOF
16302if ac_fn_c_try_link "$LINENO"; then :
16303 have_dirent_d_type=yes
16304else
16305 have_dirent_d_type=no
16306fi
16307rm -f core conftest.err conftest.$ac_objext \
16308 conftest$ac_exeext conftest.$ac_ext
16309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16310$as_echo "$have_dirent_d_type" >&6; }
16311
16312if test "$have_dirent_d_type" = yes; then
16313
16314$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16315
16316fi
16317
Victor Stinner9eb57c52015-03-19 22:21:49 +010016318# check if the Linux getrandom() syscall is available
16319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16320$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16322/* end confdefs.h. */
16323
16324
Victor Stinner1b80b242016-04-12 22:34:58 +020016325 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016326 #include <sys/syscall.h>
16327
16328 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016329 char buffer[1];
Victor Stinnerbae2d622015-10-01 09:47:30 +020016330 const size_t buflen = sizeof(buffer);
16331 const int flags = 0;
Victor Stinner9eb57c52015-03-19 22:21:49 +010016332 /* ignore the result, Python checks for ENOSYS at runtime */
Victor Stinnerbae2d622015-10-01 09:47:30 +020016333 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016334 return 0;
16335 }
16336
16337
16338_ACEOF
16339if ac_fn_c_try_link "$LINENO"; then :
16340 have_getrandom_syscall=yes
16341else
16342 have_getrandom_syscall=no
16343fi
16344rm -f core conftest.err conftest.$ac_objext \
16345 conftest$ac_exeext conftest.$ac_ext
16346{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16347$as_echo "$have_getrandom_syscall" >&6; }
16348
16349if test "$have_getrandom_syscall" = yes; then
16350
16351$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16352
16353fi
16354
Victor Stinnerbae2d622015-10-01 09:47:30 +020016355# check if the getrandom() function is available
16356# the test was written for the Solaris function of <sys/random.h>
16357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16358$as_echo_n "checking for the getrandom() function... " >&6; }
16359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16360/* end confdefs.h. */
16361
16362
16363 #include <sys/random.h>
16364
16365 int main() {
16366 char buffer[1];
16367 const size_t buflen = sizeof(buffer);
16368 const int flags = 0;
16369 /* ignore the result, Python checks for ENOSYS at runtime */
16370 (void)getrandom(buffer, buflen, flags);
16371 return 0;
16372 }
16373
16374
16375_ACEOF
16376if ac_fn_c_try_link "$LINENO"; then :
16377 have_getrandom=yes
16378else
16379 have_getrandom=no
16380fi
16381rm -f core conftest.err conftest.$ac_objext \
16382 conftest$ac_exeext conftest.$ac_ext
16383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16384$as_echo "$have_getrandom" >&6; }
16385
16386if test "$have_getrandom" = yes; then
16387
16388$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16389
16390fi
16391
Guido van Rossum627b2d71993-12-24 10:39:16 +000016392# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016393ac_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 +000016394
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016395ac_config_files="$ac_config_files Modules/ld_so_aix"
16396
Martin v. Löwis11437992002-04-12 09:54:03 +000016397cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016398# This file is a shell script that caches the results of configure
16399# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016400# scripts and configure runs, see configure's option --config-cache.
16401# It is not useful on other systems. If it contains results you don't
16402# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016403#
Martin v. Löwis11437992002-04-12 09:54:03 +000016404# config.status only pays attention to the cache file if you give it
16405# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016406#
Skip Montanaro6dead952003-09-25 14:50:04 +000016407# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016408# loading this file, other *unset* `ac_cv_foo' will be assigned the
16409# following values.
16410
16411_ACEOF
16412
Guido van Rossumf78abae1997-01-21 22:02:36 +000016413# The following way of writing the cache mishandles newlines in values,
16414# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016415# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016416# Ultrix sh set writes to stderr and can't be redirected directly,
16417# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016418(
16419 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16420 eval ac_val=\$$ac_var
16421 case $ac_val in #(
16422 *${as_nl}*)
16423 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016424 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16425$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016426 esac
16427 case $ac_var in #(
16428 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016429 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16430 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016431 esac ;;
16432 esac
16433 done
16434
Martin v. Löwis11437992002-04-12 09:54:03 +000016435 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016436 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16437 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016438 # `set' does not quote correctly, so add quotes: double-quote
16439 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016441 "s/'/'\\\\''/g;
16442 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016443 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016444 *)
16445 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016446 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016448 esac |
16449 sort
16450) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016451 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016453 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016455 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16456 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16458 :end' >>confcache
16459if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16460 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016461 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016462 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16463$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016464 if test ! -f "$cache_file" || test -h "$cache_file"; then
16465 cat confcache >"$cache_file"
16466 else
16467 case $cache_file in #(
16468 */* | ?:*)
16469 mv -f confcache "$cache_file"$$ &&
16470 mv -f "$cache_file"$$ "$cache_file" ;; #(
16471 *)
16472 mv -f confcache "$cache_file" ;;
16473 esac
16474 fi
16475 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016476 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016477 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16478$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016479 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016480fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016481rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016482
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016483test "x$prefix" = xNONE && prefix=$ac_default_prefix
16484# Let make expand exec_prefix.
16485test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016486
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016487DEFS=-DHAVE_CONFIG_H
16488
Skip Montanaro6dead952003-09-25 14:50:04 +000016489ac_libobjs=
16490ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016491U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016492for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16493 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016494 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016495 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016496 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16497 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016498 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16499 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016500done
16501LIBOBJS=$ac_libobjs
16502
16503LTLIBOBJS=$ac_ltlibobjs
16504
16505
Martin v. Löwis11437992002-04-12 09:54:03 +000016506
Matthias Kloseb9621712010-04-24 17:59:49 +000016507
Victor Stinnere0be4232011-10-25 13:06:09 +020016508: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016509ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016510ac_clean_files_save=$ac_clean_files
16511ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016512{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16513$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16514as_write_fail=0
16515cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016516#! $SHELL
16517# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016518# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016519# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016520# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016521
Martin v. Löwis11437992002-04-12 09:54:03 +000016522debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016523ac_cs_recheck=false
16524ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016525
Matthias Kloseb9621712010-04-24 17:59:49 +000016526SHELL=\${CONFIG_SHELL-$SHELL}
16527export SHELL
16528_ASEOF
16529cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16530## -------------------- ##
16531## M4sh Initialization. ##
16532## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534# Be more Bourne compatible
16535DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016536if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016537 emulate sh
16538 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016539 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016540 # is contrary to our usage. Disable this feature.
16541 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016542 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016543else
Matthias Kloseb9621712010-04-24 17:59:49 +000016544 case `(set -o) 2>/dev/null` in #(
16545 *posix*) :
16546 set -o posix ;; #(
16547 *) :
16548 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016549esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016550fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016551
16552
Matthias Kloseb9621712010-04-24 17:59:49 +000016553as_nl='
16554'
16555export as_nl
16556# Printing a long string crashes Solaris 7 /usr/bin/printf.
16557as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16558as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16559as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16560# Prefer a ksh shell builtin over an external printf program on Solaris,
16561# but without wasting forks for bash or zsh.
16562if test -z "$BASH_VERSION$ZSH_VERSION" \
16563 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16564 as_echo='print -r --'
16565 as_echo_n='print -rn --'
16566elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16567 as_echo='printf %s\n'
16568 as_echo_n='printf %s'
16569else
16570 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16571 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16572 as_echo_n='/usr/ucb/echo -n'
16573 else
16574 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16575 as_echo_n_body='eval
16576 arg=$1;
16577 case $arg in #(
16578 *"$as_nl"*)
16579 expr "X$arg" : "X\\(.*\\)$as_nl";
16580 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16581 esac;
16582 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16583 '
16584 export as_echo_n_body
16585 as_echo_n='sh -c $as_echo_n_body as_echo'
16586 fi
16587 export as_echo_body
16588 as_echo='sh -c $as_echo_body as_echo'
16589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016590
16591# The user is always right.
16592if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016593 PATH_SEPARATOR=:
16594 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16595 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16596 PATH_SEPARATOR=';'
16597 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016600
16601# IFS
16602# We need space, tab and new line, in precisely that order. Quoting is
16603# there to prevent editors from complaining about space-tab.
16604# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16605# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016606IFS=" "" $as_nl"
16607
16608# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016609as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016610case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611 *[\\/]* ) as_myself=$0 ;;
16612 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016613for as_dir in $PATH
16614do
16615 IFS=$as_save_IFS
16616 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016617 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16618 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016619IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621 ;;
16622esac
16623# We did not find ourselves, most probably we were run as `sh COMMAND'
16624# in which case we are not to be found in the path.
16625if test "x$as_myself" = x; then
16626 as_myself=$0
16627fi
16628if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016629 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16630 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631fi
16632
Matthias Kloseb9621712010-04-24 17:59:49 +000016633# Unset variables that we do not need and which cause bugs (e.g. in
16634# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16635# suppresses any "Segmentation fault" message there. '((' could
16636# trigger a bug in pdksh 5.2.14.
16637for as_var in BASH_ENV ENV MAIL MAILPATH
16638do eval test x\${$as_var+set} = xset \
16639 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640done
16641PS1='$ '
16642PS2='> '
16643PS4='+ '
16644
16645# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016646LC_ALL=C
16647export LC_ALL
16648LANGUAGE=C
16649export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016650
Matthias Kloseb9621712010-04-24 17:59:49 +000016651# CDPATH.
16652(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16653
16654
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016655# as_fn_error STATUS ERROR [LINENO LOG_FD]
16656# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016657# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16658# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016659# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016660as_fn_error ()
16661{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016662 as_status=$1; test $as_status -eq 0 && as_status=1
16663 if test "$4"; then
16664 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16665 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016666 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016667 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016668 as_fn_exit $as_status
16669} # as_fn_error
16670
16671
16672# as_fn_set_status STATUS
16673# -----------------------
16674# Set $? to STATUS, without forking.
16675as_fn_set_status ()
16676{
16677 return $1
16678} # as_fn_set_status
16679
16680# as_fn_exit STATUS
16681# -----------------
16682# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16683as_fn_exit ()
16684{
16685 set +e
16686 as_fn_set_status $1
16687 exit $1
16688} # as_fn_exit
16689
16690# as_fn_unset VAR
16691# ---------------
16692# Portably unset VAR.
16693as_fn_unset ()
16694{
16695 { eval $1=; unset $1;}
16696}
16697as_unset=as_fn_unset
16698# as_fn_append VAR VALUE
16699# ----------------------
16700# Append the text in VALUE to the end of the definition contained in VAR. Take
16701# advantage of any shell optimizations that allow amortized linear growth over
16702# repeated appends, instead of the typical quadratic growth present in naive
16703# implementations.
16704if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16705 eval 'as_fn_append ()
16706 {
16707 eval $1+=\$2
16708 }'
16709else
16710 as_fn_append ()
16711 {
16712 eval $1=\$$1\$2
16713 }
16714fi # as_fn_append
16715
16716# as_fn_arith ARG...
16717# ------------------
16718# Perform arithmetic evaluation on the ARGs, and store the result in the
16719# global $as_val. Take advantage of shells that can avoid forks. The arguments
16720# must be portable across $(()) and expr.
16721if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16722 eval 'as_fn_arith ()
16723 {
16724 as_val=$(( $* ))
16725 }'
16726else
16727 as_fn_arith ()
16728 {
16729 as_val=`expr "$@" || test $? -eq 1`
16730 }
16731fi # as_fn_arith
16732
16733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016734if expr a : '\(a\)' >/dev/null 2>&1 &&
16735 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16736 as_expr=expr
16737else
16738 as_expr=false
16739fi
16740
16741if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16742 as_basename=basename
16743else
16744 as_basename=false
16745fi
16746
Matthias Kloseb9621712010-04-24 17:59:49 +000016747if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16748 as_dirname=dirname
16749else
16750 as_dirname=false
16751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753as_me=`$as_basename -- "$0" ||
16754$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16755 X"$0" : 'X\(//\)$' \| \
16756 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016757$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016758 sed '/^.*\/\([^/][^/]*\)\/*$/{
16759 s//\1/
16760 q
16761 }
16762 /^X\/\(\/\/\)$/{
16763 s//\1/
16764 q
16765 }
16766 /^X\/\(\/\).*/{
16767 s//\1/
16768 q
16769 }
16770 s/.*/./; q'`
16771
Matthias Kloseb9621712010-04-24 17:59:49 +000016772# Avoid depending upon Character Ranges.
16773as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16774as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16775as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16776as_cr_digits='0123456789'
16777as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778
16779ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016780case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016781-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016782 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016783 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016784 xy) ECHO_C='\c';;
16785 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16786 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787 esac;;
16788*)
16789 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016790esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016791
Martin v. Löwis11437992002-04-12 09:54:03 +000016792rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016793if test -d conf$$.dir; then
16794 rm -f conf$$.dir/conf$$.file
16795else
16796 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016797 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016799if (echo >conf$$.file) 2>/dev/null; then
16800 if ln -s conf$$.file conf$$ 2>/dev/null; then
16801 as_ln_s='ln -s'
16802 # ... but there are two gotchas:
16803 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16804 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016805 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016806 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016807 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016808 elif ln conf$$.file conf$$ 2>/dev/null; then
16809 as_ln_s=ln
16810 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016811 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016813else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016814 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16817rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016818
Matthias Kloseb9621712010-04-24 17:59:49 +000016819
16820# as_fn_mkdir_p
16821# -------------
16822# Create "$as_dir" as a directory, including parents if necessary.
16823as_fn_mkdir_p ()
16824{
16825
16826 case $as_dir in #(
16827 -*) as_dir=./$as_dir;;
16828 esac
16829 test -d "$as_dir" || eval $as_mkdir_p || {
16830 as_dirs=
16831 while :; do
16832 case $as_dir in #(
16833 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16834 *) as_qdir=$as_dir;;
16835 esac
16836 as_dirs="'$as_qdir' $as_dirs"
16837 as_dir=`$as_dirname -- "$as_dir" ||
16838$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16839 X"$as_dir" : 'X\(//\)[^/]' \| \
16840 X"$as_dir" : 'X\(//\)$' \| \
16841 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16842$as_echo X"$as_dir" |
16843 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16844 s//\1/
16845 q
16846 }
16847 /^X\(\/\/\)[^/].*/{
16848 s//\1/
16849 q
16850 }
16851 /^X\(\/\/\)$/{
16852 s//\1/
16853 q
16854 }
16855 /^X\(\/\).*/{
16856 s//\1/
16857 q
16858 }
16859 s/.*/./; q'`
16860 test -d "$as_dir" && break
16861 done
16862 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016863 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016864
16865
16866} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016867if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016868 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016869else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016870 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016871 as_mkdir_p=false
16872fi
16873
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016874
16875# as_fn_executable_p FILE
16876# -----------------------
16877# Test if FILE is an executable regular file.
16878as_fn_executable_p ()
16879{
16880 test -f "$1" && test -x "$1"
16881} # as_fn_executable_p
16882as_test_x='test -x'
16883as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016884
16885# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016886as_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 +000016887
16888# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016889as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016890
16891
Martin v. Löwis11437992002-04-12 09:54:03 +000016892exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016893## ----------------------------------- ##
16894## Main body of $CONFIG_STATUS script. ##
16895## ----------------------------------- ##
16896_ASEOF
16897test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016898
Matthias Kloseb9621712010-04-24 17:59:49 +000016899cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16900# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016901# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902# values after options handling.
16903ac_log="
Yury Selivanov7aa53412015-05-30 10:57:56 -040016904This file was extended by python $as_me 3.5, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016905generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016906
16907 CONFIG_FILES = $CONFIG_FILES
16908 CONFIG_HEADERS = $CONFIG_HEADERS
16909 CONFIG_LINKS = $CONFIG_LINKS
16910 CONFIG_COMMANDS = $CONFIG_COMMANDS
16911 $ $0 $@
16912
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016913on `(hostname || uname -n) 2>/dev/null | sed 1q`
16914"
16915
Martin v. Löwis11437992002-04-12 09:54:03 +000016916_ACEOF
16917
Matthias Kloseb9621712010-04-24 17:59:49 +000016918case $ac_config_files in *"
16919"*) set x $ac_config_files; shift; ac_config_files=$*;;
16920esac
16921
16922case $ac_config_headers in *"
16923"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16924esac
16925
16926
16927cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016928# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016929config_files="$ac_config_files"
16930config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016933
Matthias Kloseb9621712010-04-24 17:59:49 +000016934cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016935ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016936\`$as_me' instantiates files and other configuration actions
16937from templates according to the current configuration. Unless the files
16938and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016939
Matthias Kloseb9621712010-04-24 17:59:49 +000016940Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016941
16942 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016943 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016944 --config print configuration, then exit
16945 -q, --quiet, --silent
16946 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 -d, --debug don't remove temporary files
16948 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016949 --file=FILE[:TEMPLATE]
16950 instantiate the configuration file FILE
16951 --header=FILE[:TEMPLATE]
16952 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016953
16954Configuration files:
16955$config_files
16956
16957Configuration headers:
16958$config_headers
16959
Matthias Kloseb9621712010-04-24 17:59:49 +000016960Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016962_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016963cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16964ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016965ac_cs_version="\\
Yury Selivanov7aa53412015-05-30 10:57:56 -040016966python config.status 3.5
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016967configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016968 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016969
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016970Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016971This config.status script is free software; the Free Software Foundation
16972gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016973
16974ac_pwd='$ac_pwd'
16975srcdir='$srcdir'
16976INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016977MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016978test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016979_ACEOF
16980
Matthias Kloseb9621712010-04-24 17:59:49 +000016981cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16982# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016983ac_need_defaults=:
16984while test $# != 0
16985do
16986 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016987 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016988 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16989 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016990 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016991 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016992 --*=)
16993 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16994 ac_optarg=
16995 ac_shift=:
16996 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016997 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016998 ac_option=$1
16999 ac_optarg=$2
17000 ac_shift=shift
17001 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017002 esac
17003
Skip Montanaro6dead952003-09-25 14:50:04 +000017004 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017005 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017006 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17007 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017008 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017009 $as_echo "$ac_cs_version"; exit ;;
17010 --config | --confi | --conf | --con | --co | --c )
17011 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017012 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017013 debug=: ;;
17014 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017015 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017016 case $ac_optarg in
17017 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017018 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017019 esac
17020 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017021 ac_need_defaults=false;;
17022 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017023 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017024 case $ac_optarg in
17025 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17026 esac
17027 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017028 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017029 --he | --h)
17030 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017031 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017032Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017034 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017035 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17036 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17037 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017038
17039 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017040 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017041Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017042
Matthias Kloseb9621712010-04-24 17:59:49 +000017043 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017044 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017045
17046 esac
17047 shift
17048done
17049
Skip Montanaro6dead952003-09-25 14:50:04 +000017050ac_configure_extra_args=
17051
17052if $ac_cs_silent; then
17053 exec 6>/dev/null
17054 ac_configure_extra_args="$ac_configure_extra_args --silent"
17055fi
17056
17057_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017058cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017059if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017060 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017061 shift
17062 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17063 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017064 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017065 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017066fi
17067
Martin v. Löwis11437992002-04-12 09:54:03 +000017068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017069cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017070exec 5>>config.log
17071{
17072 echo
17073 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17074## Running $as_me. ##
17075_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017076 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017080cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017081_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017082
Matthias Kloseb9621712010-04-24 17:59:49 +000017083cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084
17085# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017086for ac_config_target in $ac_config_targets
17087do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088 case $ac_config_target in
17089 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17090 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17091 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017092 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17093 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017094 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17095 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017096 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017097 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017098 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017099
Victor Stinnere0be4232011-10-25 13:06:09 +020017100 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017101 esac
17102done
17103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017104
Martin v. Löwis11437992002-04-12 09:54:03 +000017105# If the user did not use the arguments to specify the items to instantiate,
17106# then the envvar interface is used. Set only those that are not.
17107# We use the long form for the default assignment because of an extremely
17108# bizarre bug on SunOS 4.1.3.
17109if $ac_need_defaults; then
17110 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17111 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17112fi
17113
Skip Montanaro6dead952003-09-25 14:50:04 +000017114# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017115# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017116# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017117# Hook for its removal unless debugging.
17118# Note that there is a small window in which the directory will not be cleaned:
17119# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017120$debug ||
17121{
Victor Stinnere0be4232011-10-25 13:06:09 +020017122 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017123 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017124 : "${ac_tmp:=$tmp}"
17125 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017126' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017127 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017128}
Martin v. Löwis11437992002-04-12 09:54:03 +000017129# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017130
Martin v. Löwis11437992002-04-12 09:54:03 +000017131{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017132 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017133 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017134} ||
17135{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136 tmp=./conf$$-$RANDOM
17137 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017138} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017139ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017140
Matthias Kloseb9621712010-04-24 17:59:49 +000017141# Set up the scripts for CONFIG_FILES section.
17142# No need to generate them if there are no CONFIG_FILES.
17143# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017144if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017145
Matthias Kloseb9621712010-04-24 17:59:49 +000017146
17147ac_cr=`echo X | tr X '\015'`
17148# On cygwin, bash can eat \r inside `` if the user requested igncr.
17149# But we know of no other shell where ac_cr would be empty at this
17150# point, so we can use a bashism as a fallback.
17151if test "x$ac_cr" = x; then
17152 eval ac_cr=\$\'\\r\'
17153fi
17154ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17155if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017156 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017157else
17158 ac_cs_awk_cr=$ac_cr
17159fi
17160
Victor Stinnere0be4232011-10-25 13:06:09 +020017161echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017162_ACEOF
17163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017164
Matthias Kloseb9621712010-04-24 17:59:49 +000017165{
17166 echo "cat >conf$$subs.awk <<_ACEOF" &&
17167 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17168 echo "_ACEOF"
17169} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017170 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17171ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017172ac_delim='%!_!# '
17173for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017174 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017175 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176
Matthias Kloseb9621712010-04-24 17:59:49 +000017177 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17178 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017179 break
17180 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017181 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017182 else
17183 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017184 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017185done
Matthias Kloseb9621712010-04-24 17:59:49 +000017186rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187
Matthias Kloseb9621712010-04-24 17:59:49 +000017188cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017189cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017191sed -n '
17192h
17193s/^/S["/; s/!.*/"]=/
17194p
17195g
17196s/^[^!]*!//
17197:repl
17198t repl
17199s/'"$ac_delim"'$//
17200t delim
17201:nl
17202h
17203s/\(.\{148\}\)..*/\1/
17204t more1
17205s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17206p
17207n
17208b repl
17209:more1
17210s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17211p
17212g
17213s/.\{148\}//
17214t nl
17215:delim
17216h
17217s/\(.\{148\}\)..*/\1/
17218t more2
17219s/["\\]/\\&/g; s/^/"/; s/$/"/
17220p
17221b
17222:more2
17223s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17224p
17225g
17226s/.\{148\}//
17227t delim
17228' <conf$$subs.awk | sed '
17229/^[^""]/{
17230 N
17231 s/\n//
17232}
17233' >>$CONFIG_STATUS || ac_write_fail=1
17234rm -f conf$$subs.awk
17235cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17236_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017237cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017238 for (key in S) S_is_set[key] = 1
17239 FS = ""
17240
17241}
17242{
17243 line = $ 0
17244 nfields = split(line, field, "@")
17245 substed = 0
17246 len = length(field[1])
17247 for (i = 2; i < nfields; i++) {
17248 key = field[i]
17249 keylen = length(key)
17250 if (S_is_set[key]) {
17251 value = S[key]
17252 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17253 len += length(value) + length(field[++i])
17254 substed = 1
17255 } else
17256 len += 1 + keylen
17257 }
17258
17259 print line
17260}
17261
17262_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017263_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017264cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17265if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17266 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17267else
17268 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017269fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017270 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017271_ACEOF
17272
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017273# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17274# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017275# trailing colons and then remove the whole line if VPATH becomes empty
17276# (actually we leave an empty line to preserve line numbers).
17277if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017278 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17279h
17280s///
17281s/^/:/
17282s/[ ]*$/:/
17283s/:\$(srcdir):/:/g
17284s/:\${srcdir}:/:/g
17285s/:@srcdir@:/:/g
17286s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017287s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017288x
17289s/\(=[ ]*\).*/\1/
17290G
17291s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017292s/^[^=]*=[ ]*$//
17293}'
17294fi
17295
Matthias Kloseb9621712010-04-24 17:59:49 +000017296cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017297fi # test -n "$CONFIG_FILES"
17298
Matthias Kloseb9621712010-04-24 17:59:49 +000017299# Set up the scripts for CONFIG_HEADERS section.
17300# No need to generate them if there are no CONFIG_HEADERS.
17301# This happens for instance with `./config.status Makefile'.
17302if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017303cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017304BEGIN {
17305_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017306
Matthias Kloseb9621712010-04-24 17:59:49 +000017307# Transform confdefs.h into an awk script `defines.awk', embedded as
17308# here-document in config.status, that substitutes the proper values into
17309# config.h.in to produce config.h.
17310
17311# Create a delimiter string that does not exist in confdefs.h, to ease
17312# handling of long lines.
17313ac_delim='%!_!# '
17314for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017315 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17316 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017317 break
17318 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017319 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017320 else
17321 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17322 fi
17323done
17324
17325# For the awk script, D is an array of macro values keyed by name,
17326# likewise P contains macro parameters if any. Preserve backslash
17327# newline sequences.
17328
17329ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17330sed -n '
17331s/.\{148\}/&'"$ac_delim"'/g
17332t rset
17333:rset
17334s/^[ ]*#[ ]*define[ ][ ]*/ /
17335t def
17336d
17337:def
17338s/\\$//
17339t bsnl
17340s/["\\]/\\&/g
17341s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17342D["\1"]=" \3"/p
17343s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17344d
17345:bsnl
17346s/["\\]/\\&/g
17347s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17348D["\1"]=" \3\\\\\\n"\\/p
17349t cont
17350s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17351t cont
17352d
17353:cont
17354n
17355s/.\{148\}/&'"$ac_delim"'/g
17356t clear
17357:clear
17358s/\\$//
17359t bsnlc
17360s/["\\]/\\&/g; s/^/"/; s/$/"/p
17361d
17362:bsnlc
17363s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17364b cont
17365' <confdefs.h | sed '
17366s/'"$ac_delim"'/"\\\
17367"/g' >>$CONFIG_STATUS || ac_write_fail=1
17368
17369cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17370 for (key in D) D_is_set[key] = 1
17371 FS = ""
17372}
17373/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17374 line = \$ 0
17375 split(line, arg, " ")
17376 if (arg[1] == "#") {
17377 defundef = arg[2]
17378 mac1 = arg[3]
17379 } else {
17380 defundef = substr(arg[1], 2)
17381 mac1 = arg[2]
17382 }
17383 split(mac1, mac2, "(") #)
17384 macro = mac2[1]
17385 prefix = substr(line, 1, index(line, defundef) - 1)
17386 if (D_is_set[macro]) {
17387 # Preserve the white space surrounding the "#".
17388 print prefix "define", macro P[macro] D[macro]
17389 next
17390 } else {
17391 # Replace #undef with comments. This is necessary, for example,
17392 # in the case of _POSIX_SOURCE, which is predefined and required
17393 # on some systems where configure will not decide to define it.
17394 if (defundef == "undef") {
17395 print "/*", prefix defundef, macro, "*/"
17396 next
17397 }
17398 }
17399}
17400{ print }
17401_ACAWK
17402_ACEOF
17403cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017404 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017405fi # test -n "$CONFIG_HEADERS"
17406
17407
17408eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17409shift
17410for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017411do
17412 case $ac_tag in
17413 :[FHLC]) ac_mode=$ac_tag; continue;;
17414 esac
17415 case $ac_mode$ac_tag in
17416 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017417 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017418 :[FH]-) ac_tag=-:-;;
17419 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17420 esac
17421 ac_save_IFS=$IFS
17422 IFS=:
17423 set x $ac_tag
17424 IFS=$ac_save_IFS
17425 shift
17426 ac_file=$1
17427 shift
17428
17429 case $ac_mode in
17430 :L) ac_source=$1;;
17431 :[FH])
17432 ac_file_inputs=
17433 for ac_f
17434 do
17435 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017436 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437 *) # Look for the file first in the build tree, then in the source tree
17438 # (if the path is not absolute). The absolute path cannot be DOS-style,
17439 # because $ac_f cannot contain `:'.
17440 test -f "$ac_f" ||
17441 case $ac_f in
17442 [\\/$]*) false;;
17443 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17444 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017445 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017447 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17448 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017449 done
17450
17451 # Let's still pretend it is `configure' which instantiates (i.e., don't
17452 # use $as_me), people would be surprised to read:
17453 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017454 configure_input='Generated from '`
17455 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17456 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457 if test x"$ac_file" != x-; then
17458 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017459 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17460$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017462 # Neutralize special characters interpreted by sed in replacement strings.
17463 case $configure_input in #(
17464 *\&* | *\|* | *\\* )
17465 ac_sed_conf_input=`$as_echo "$configure_input" |
17466 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17467 *) ac_sed_conf_input=$configure_input;;
17468 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469
17470 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017471 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17472 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017473 esac
17474 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017475 esac
17476
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017478$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017479 X"$ac_file" : 'X\(//\)[^/]' \| \
17480 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017481 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017482$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017483 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17484 s//\1/
17485 q
17486 }
17487 /^X\(\/\/\)[^/].*/{
17488 s//\1/
17489 q
17490 }
17491 /^X\(\/\/\)$/{
17492 s//\1/
17493 q
17494 }
17495 /^X\(\/\).*/{
17496 s//\1/
17497 q
17498 }
17499 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017500 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017501 ac_builddir=.
17502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503case "$ac_dir" in
17504.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17505*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017506 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017507 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017508 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509 case $ac_top_builddir_sub in
17510 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17511 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17512 esac ;;
17513esac
17514ac_abs_top_builddir=$ac_pwd
17515ac_abs_builddir=$ac_pwd$ac_dir_suffix
17516# for backward compatibility:
17517ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017518
17519case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017520 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017521 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017522 ac_top_srcdir=$ac_top_builddir_sub
17523 ac_abs_top_srcdir=$ac_pwd ;;
17524 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017525 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017526 ac_top_srcdir=$srcdir
17527 ac_abs_top_srcdir=$srcdir ;;
17528 *) # Relative name.
17529 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17530 ac_top_srcdir=$ac_top_build_prefix$srcdir
17531 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017532esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017534
Martin v. Löwis11437992002-04-12 09:54:03 +000017535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017536 case $ac_mode in
17537 :F)
17538 #
17539 # CONFIG_FILE
17540 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017541
17542 case $INSTALL in
17543 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017545 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017546 ac_MKDIR_P=$MKDIR_P
17547 case $MKDIR_P in
17548 [\\/$]* | ?:[\\/]* ) ;;
17549 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17550 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017551_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017552
Matthias Kloseb9621712010-04-24 17:59:49 +000017553cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017554# If the template does not know about datarootdir, expand it.
17555# FIXME: This hack should be removed a few years after 2.60.
17556ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017557ac_sed_dataroot='
17558/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017559 p
17560 q
17561}
17562/@datadir@/p
17563/@docdir@/p
17564/@infodir@/p
17565/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017566/@mandir@/p'
17567case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017568*datarootdir*) ac_datarootdir_seen=yes;;
17569*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017570 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17571$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017574 ac_datarootdir_hack='
17575 s&@datadir@&$datadir&g
17576 s&@docdir@&$docdir&g
17577 s&@infodir@&$infodir&g
17578 s&@localedir@&$localedir&g
17579 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017580 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581esac
17582_ACEOF
17583
17584# Neutralize VPATH when `$srcdir' = `.'.
17585# Shell code in configure.ac might set extrasub.
17586# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017587cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17588ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017589$extrasub
17590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017591cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017592:t
17593/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017594s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017595s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017596s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597s&@srcdir@&$ac_srcdir&;t t
17598s&@abs_srcdir@&$ac_abs_srcdir&;t t
17599s&@top_srcdir@&$ac_top_srcdir&;t t
17600s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17601s&@builddir@&$ac_builddir&;t t
17602s&@abs_builddir@&$ac_abs_builddir&;t t
17603s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17604s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017605s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017606$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017607"
Victor Stinnere0be4232011-10-25 13:06:09 +020017608eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17609 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017610
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017611test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017612 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17613 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17614 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017615 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017616which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017617$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017618which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017619
Victor Stinnere0be4232011-10-25 13:06:09 +020017620 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017621 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017622 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17623 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017624 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017625 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626 ;;
17627 :H)
17628 #
17629 # CONFIG_HEADER
17630 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017631 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017632 {
17633 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017634 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17635 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017636 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017637 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017638 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17639$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017640 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017641 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017642 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017643 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 fi
17645 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017646 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017647 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017648 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017649 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017650 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017652
17653 esac
17654
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017655
17656 case $ac_file$ac_mode in
17657 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17658
17659 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660done # for ac_tag
17661
Guido van Rossum627b2d71993-12-24 10:39:16 +000017662
Matthias Kloseb9621712010-04-24 17:59:49 +000017663as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017664_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017665ac_clean_files=$ac_clean_files_save
17666
Matthias Kloseb9621712010-04-24 17:59:49 +000017667test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017668 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017669
Martin v. Löwis11437992002-04-12 09:54:03 +000017670
17671# configure is writing to config.log, and then calls config.status.
17672# config.status does its own redirection, appending to config.log.
17673# Unfortunately, on DOS this fails, as config.log is still kept open
17674# by configure, so config.status won't be able to write to it; its
17675# output is simply discarded. So we exec the FD to /dev/null,
17676# effectively closing config.log, so it can be properly (re)opened and
17677# appended to by config.status. When coming back to configure, we
17678# need to make the FD available again.
17679if test "$no_create" != yes; then
17680 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017681 ac_config_status_args=
17682 test "$silent" = yes &&
17683 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017684 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017685 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017686 exec 5>>config.log
17687 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17688 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017689 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017690fi
17691if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17693$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017694fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017695
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017696
Christian Heimes75ed8902013-11-20 01:11:18 +010017697echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017698if test ! -f Modules/Setup
17699then
17700 cp $srcdir/Modules/Setup.dist Modules/Setup
17701fi
17702
Christian Heimes75ed8902013-11-20 01:11:18 +010017703echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017704if test ! -f Modules/Setup.local
17705then
17706 echo "# Edit this file for local setup changes" >Modules/Setup.local
17707fi
17708
Christian Heimes75ed8902013-11-20 01:11:18 +010017709echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017710$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17711 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017712 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017713mv config.c Modules