blob: f5cabadac71a4e8f8ba49adc6e805241db6bec72 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003# Generated by GNU Autoconf 2.69 for python 3.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07005# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700270$0: https://bugs.python.org/ about your system, including
Matthias Kloseb9621712010-04-24 17:59:49 +0000271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Benjamin Petersona8c22a02015-05-27 23:29:00 -0500583PACKAGE_VERSION='3.6'
584PACKAGE_STRING='python 3.6'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700585PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ned Deily322f5ba2013-11-21 23:01:59 -0800626ENSUREPIP
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000627SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000628THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100629LIBPL
630PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700631EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000632SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000633LIBC
634LIBM
635HAVE_GETHOSTBYNAME
636HAVE_GETHOSTBYNAME_R
637HAVE_GETHOSTBYNAME_R_3_ARG
638HAVE_GETHOSTBYNAME_R_5_ARG
639HAVE_GETHOSTBYNAME_R_6_ARG
640LIBOBJS
641TRUE
642MACHDEP_OBJS
643DYNLOADFILE
644DLINCLDIR
645THREADOBJ
646LDLAST
647USE_THREAD_MODULE
648SIGNAL_OBJS
649USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700650TCLTK_LIBS
651TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000652LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100653PKG_CONFIG_LIBDIR
654PKG_CONFIG_PATH
655PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000656SHLIBS
657CFLAGSFORSHARED
658LINKFORSHARED
659CCSHARED
660BLDSHARED
661LDCXXSHARED
662LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700663SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000664LIBTOOL_CRUFT
665OTHER_LIBTOOL_OPT
666UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700667CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000668BASECFLAGS
669OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700670LLVM_PROF_FOUND
671LLVM_PROF_ERR
672LLVM_PROF_FILE
673LLVM_PROF_MERGER
674PGO_PROF_USE_FLAG
675PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700676LTOFLAGS
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000677ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000678LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100679MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000680INSTALL_DATA
681INSTALL_SCRIPT
682INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200683ac_ct_READELF
684READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000685ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200686ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000687AR
688RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000689USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000690GNULD
691LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000692LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000693RUNSHARED
694INSTSONAME
695LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000696PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000697BLDLIBRARY
698DLLLIBRARY
699LDLIBRARY
700LIBRARY
701BUILDEXEEXT
702EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200703NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200704MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200705PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200706PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200708ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000709MAINCC
710CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200711GREP
712CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000713OBJEXT
714EXEEXT
715ac_ct_CC
716CPPFLAGS
717LDFLAGS
718CFLAGS
719CC
720EXPORT_MACOSX_DEPLOYMENT_TARGET
721CONFIGURE_MACOSX_DEPLOYMENT_TARGET
722SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200723_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000724MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000725FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000726FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800727FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKALTINSTALLLAST
729FRAMEWORKALTINSTALLFIRST
730FRAMEWORKINSTALLLAST
731FRAMEWORKINSTALLFIRST
732PYTHONFRAMEWORKINSTALLDIR
733PYTHONFRAMEWORKPREFIX
734PYTHONFRAMEWORKDIR
735PYTHONFRAMEWORKIDENTIFIER
736PYTHONFRAMEWORK
737LIPO_32BIT_FLAGS
738ARCH_RUN_32BIT
739UNIVERSALSDK
740CONFIG_ARGS
741SOVERSION
742VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000743GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200744PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200745PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100746host_os
747host_vendor
748host_cpu
749host
750build_os
751build_vendor
752build_cpu
753build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500754HAS_HG
755HGBRANCH
756HGTAG
757HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400758BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000759target_alias
760host_alias
761build_alias
762LIBS
763ECHO_T
764ECHO_N
765ECHO_C
766DEFS
767mandir
768localedir
769libdir
770psdir
771pdfdir
772dvidir
773htmldir
774infodir
775docdir
776oldincludedir
777includedir
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700778runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000779localstatedir
780sharedstatedir
781sysconfdir
782datadir
783datarootdir
784libexecdir
785sbindir
786bindir
787program_transform_name
788prefix
789exec_prefix
790PACKAGE_URL
791PACKAGE_BUGREPORT
792PACKAGE_STRING
793PACKAGE_VERSION
794PACKAGE_TARNAME
795PACKAGE_NAME
796PATH_SEPARATOR
797SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000798ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000799ac_user_opts='
800enable_option_checking
801enable_universalsdk
802with_universal_archs
803with_framework_name
804enable_framework
805with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600806with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000807with_cxx_main
808with_suffix
809enable_shared
810enable_profiling
811with_pydebug
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700812with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100813with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100814with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_libs
816with_system_expat
817with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100818with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000819enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700820with_tcltk_includes
821with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000822with_dbmliborder
823with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_threads
825with_thread
826enable_ipv6
827with_doc_strings
828with_tsc
829with_pymalloc
830with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000831with_fpectl
832with_libm
833with_libc
834enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000835with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800836with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000837'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000838 ac_precious_vars='build_alias
839host_alias
840target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100841MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000842CC
843CFLAGS
844LDFLAGS
845LIBS
846CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100847CPP
848PKG_CONFIG
849PKG_CONFIG_PATH
850PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851
Guido van Rossum627b2d71993-12-24 10:39:16 +0000852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000854ac_init_help=
855ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000856ac_unrecognized_opts=
857ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858# The variables have the same names as the options, with
859# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000860cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863no_recursion=
864prefix=NONE
865program_prefix=NONE
866program_suffix=NONE
867program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872x_includes=NONE
873x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000874
875# Installation directory options.
876# These are left unexpanded so users can "make install exec_prefix=/foo"
877# and all the variables that are supposed to be based on exec_prefix
878# by default will actually change.
879# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881bindir='${exec_prefix}/bin'
882sbindir='${exec_prefix}/sbin'
883libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884datarootdir='${prefix}/share'
885datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000886sysconfdir='${prefix}/etc'
887sharedstatedir='${prefix}/com'
888localstatedir='${prefix}/var'
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -0700889runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890includedir='${prefix}/include'
891oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
893infodir='${datarootdir}/info'
894htmldir='${docdir}'
895dvidir='${docdir}'
896pdfdir='${docdir}'
897psdir='${docdir}'
898libdir='${exec_prefix}/lib'
899localedir='${datarootdir}/locale'
900mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000901
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000903ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000905do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 # If the previous option needs an argument, assign it.
907 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000908 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 ac_prev=
910 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000913 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200914 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
915 *=) ac_optarg= ;;
916 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919 # Accept the important Cygnus configure options, so we can diagnose typos.
920
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921 case $ac_dashdash$ac_option in
922 --)
923 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925 -bindir | --bindir | --bindi | --bind | --bin | --bi)
926 ac_prev=bindir ;;
927 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000928 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000929
930 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000934
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 -cache-file | --cache-file | --cache-fil | --cache-fi \
936 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
937 ac_prev=cache_file ;;
938 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
939 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 cache_file=$ac_optarg ;;
941
942 --config-cache | -C)
943 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000946 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000948 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
951 | --dataroo | --dataro | --datar)
952 ac_prev=datarootdir ;;
953 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
954 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
955 datarootdir=$ac_optarg ;;
956
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000958 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000960 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200961 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000962 ac_useropt_orig=$ac_useropt
963 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
964 case $ac_user_opts in
965 *"
966"enable_$ac_useropt"
967"*) ;;
968 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
969 ac_unrecognized_sep=', ';;
970 esac
971 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000972
973 -docdir | --docdir | --docdi | --doc | --do)
974 ac_prev=docdir ;;
975 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
976 docdir=$ac_optarg ;;
977
978 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
979 ac_prev=dvidir ;;
980 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
981 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000984 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000985 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000986 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200987 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000988 ac_useropt_orig=$ac_useropt
989 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
990 case $ac_user_opts in
991 *"
992"enable_$ac_useropt"
993"*) ;;
994 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
995 ac_unrecognized_sep=', ';;
996 esac
997 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1000 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1001 | --exec | --exe | --ex)
1002 ac_prev=exec_prefix ;;
1003 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1004 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1005 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001006 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
1008 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009 # Obsolete; use --with-gas.
1010 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 -help | --help | --hel | --he | -h)
1013 ac_init_help=long ;;
1014 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1015 ac_init_help=recursive ;;
1016 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1017 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001018
1019 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001024 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1025 ac_prev=htmldir ;;
1026 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1027 | --ht=*)
1028 htmldir=$ac_optarg ;;
1029
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 -includedir | --includedir | --includedi | --included | --include \
1031 | --includ | --inclu | --incl | --inc)
1032 ac_prev=includedir ;;
1033 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1034 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -infodir | --infodir | --infodi | --infod | --info | --inf)
1038 ac_prev=infodir ;;
1039 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
1042 -libdir | --libdir | --libdi | --libd)
1043 ac_prev=libdir ;;
1044 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046
1047 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1048 | --libexe | --libex | --libe)
1049 ac_prev=libexecdir ;;
1050 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1051 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001054 -localedir | --localedir | --localedi | --localed | --locale)
1055 ac_prev=localedir ;;
1056 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1057 localedir=$ac_optarg ;;
1058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001059 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001060 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001061 ac_prev=localstatedir ;;
1062 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001065
1066 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1067 ac_prev=mandir ;;
1068 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001072 # Obsolete; use --without-fp.
1073 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
1075 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 no_create=yes ;;
1078
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001079 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1080 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1081 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1084 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1085 | --oldin | --oldi | --old | --ol | --o)
1086 ac_prev=oldincludedir ;;
1087 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1088 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1089 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001090 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001091
Guido van Rossum7f43da71994-08-01 12:15:30 +00001092 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1093 ac_prev=prefix ;;
1094 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
1097 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1098 | --program-pre | --program-pr | --program-p)
1099 ac_prev=program_prefix ;;
1100 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1101 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001102 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103
1104 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1105 | --program-suf | --program-su | --program-s)
1106 ac_prev=program_suffix ;;
1107 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1108 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110
1111 -program-transform-name | --program-transform-name \
1112 | --program-transform-nam | --program-transform-na \
1113 | --program-transform-n | --program-transform- \
1114 | --program-transform | --program-transfor \
1115 | --program-transfo | --program-transf \
1116 | --program-trans | --program-tran \
1117 | --progr-tra | --program-tr | --program-t)
1118 ac_prev=program_transform_name ;;
1119 -program-transform-name=* | --program-transform-name=* \
1120 | --program-transform-nam=* | --program-transform-na=* \
1121 | --program-transform-n=* | --program-transform-=* \
1122 | --program-transform=* | --program-transfor=* \
1123 | --program-transfo=* | --program-transf=* \
1124 | --program-trans=* | --program-tran=* \
1125 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001128 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1129 ac_prev=pdfdir ;;
1130 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1131 pdfdir=$ac_optarg ;;
1132
1133 -psdir | --psdir | --psdi | --psd | --ps)
1134 ac_prev=psdir ;;
1135 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1136 psdir=$ac_optarg ;;
1137
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1139 | -silent | --silent | --silen | --sile | --sil)
1140 silent=yes ;;
1141
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001142 -runstatedir | --runstatedir | --runstatedi | --runstated \
1143 | --runstate | --runstat | --runsta | --runst | --runs \
1144 | --run | --ru | --r)
1145 ac_prev=runstatedir ;;
1146 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1147 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1148 | --run=* | --ru=* | --r=*)
1149 runstatedir=$ac_optarg ;;
1150
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001151 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1152 ac_prev=sbindir ;;
1153 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1154 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001156
1157 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1158 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1159 | --sharedst | --shareds | --shared | --share | --shar \
1160 | --sha | --sh)
1161 ac_prev=sharedstatedir ;;
1162 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1163 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1164 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1165 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001168 -site | --site | --sit)
1169 ac_prev=site ;;
1170 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172
Guido van Rossum7f43da71994-08-01 12:15:30 +00001173 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1174 ac_prev=srcdir ;;
1175 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001178 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1179 | --syscon | --sysco | --sysc | --sys | --sy)
1180 ac_prev=sysconfdir ;;
1181 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1182 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001184
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1191 verbose=yes ;;
1192
Martin v. Löwis11437992002-04-12 09:54:03 +00001193 -version | --version | --versio | --versi | --vers | -V)
1194 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001197 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001198 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001199 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001200 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001201 ac_useropt_orig=$ac_useropt
1202 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1203 case $ac_user_opts in
1204 *"
1205"with_$ac_useropt"
1206"*) ;;
1207 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1208 ac_unrecognized_sep=', ';;
1209 esac
1210 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
1212 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001215 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001216 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 ac_useropt_orig=$ac_useropt
1218 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1219 case $ac_user_opts in
1220 *"
1221"with_$ac_useropt"
1222"*) ;;
1223 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1224 ac_unrecognized_sep=', ';;
1225 esac
1226 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001227
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001228 --x)
1229 # Obsolete; use --with-x.
1230 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231
1232 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1233 | --x-incl | --x-inc | --x-in | --x-i)
1234 ac_prev=x_includes ;;
1235 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1236 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238
1239 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1240 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1241 ac_prev=x_libraries ;;
1242 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1243 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001246 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1247Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 ;;
1249
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 *=*)
1251 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1252 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001253 case $ac_envvar in #(
1254 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 export $ac_envvar ;;
1259
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001260 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001264 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001265 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266 ;;
1267
1268 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269done
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001273 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274fi
1275
Matthias Kloseb9621712010-04-24 17:59:49 +00001276if test -n "$ac_unrecognized_opts"; then
1277 case $enable_option_checking in
1278 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001279 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001280 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1281 esac
1282fi
1283
1284# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1286 datadir sysconfdir sharedstatedir localstatedir includedir \
1287 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001288 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001289do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001291 # Remove trailing slashes.
1292 case $ac_val in
1293 */ )
1294 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1295 eval $ac_var=\$ac_val;;
1296 esac
1297 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001298 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 [\\/$]* | ?:[\\/]* ) continue;;
1300 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001302 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001303done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304
Martin v. Löwis11437992002-04-12 09:54:03 +00001305# There might be people who depend on the old broken behavior: `$host'
1306# used to hold the argument of --host etc.
1307# FIXME: To remove some day.
1308build=$build_alias
1309host=$host_alias
1310target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311
Martin v. Löwis11437992002-04-12 09:54:03 +00001312# FIXME: To remove some day.
1313if test "x$host_alias" != x; then
1314 if test "x$build_alias" = x; then
1315 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001316 elif test "x$build_alias" != "x$host_alias"; then
1317 cross_compiling=yes
1318 fi
1319fi
1320
1321ac_tool_prefix=
1322test -n "$host_alias" && ac_tool_prefix=$host_alias-
1323
1324test "$silent" = yes && exec 6>/dev/null
1325
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327ac_pwd=`pwd` && test -n "$ac_pwd" &&
1328ac_ls_di=`ls -di .` &&
1329ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001330 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001332 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335# Find the source files, if location was not specified.
1336if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001337 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001338 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001339 ac_confdir=`$as_dirname -- "$as_myself" ||
1340$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1341 X"$as_myself" : 'X\(//\)[^/]' \| \
1342 X"$as_myself" : 'X\(//\)$' \| \
1343 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1344$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\/\)[^/].*/{
1350 s//\1/
1351 q
1352 }
1353 /^X\(\/\/\)$/{
1354 s//\1/
1355 q
1356 }
1357 /^X\(\/\).*/{
1358 s//\1/
1359 q
1360 }
1361 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001363 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001364 srcdir=..
1365 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001366else
1367 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001369if test ! -r "$srcdir/$ac_unique_file"; then
1370 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001371 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001373ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1374ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376 pwd)`
1377# When building in place, set srcdir=.
1378if test "$ac_abs_confdir" = "$ac_pwd"; then
1379 srcdir=.
1380fi
1381# Remove unnecessary trailing slashes from srcdir.
1382# Double slashes in file names in object file debugging info
1383# mess up M-x gdb in Emacs.
1384case $srcdir in
1385*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1386esac
1387for ac_var in $ac_precious_vars; do
1388 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1389 eval ac_env_${ac_var}_value=\$${ac_var}
1390 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1391 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001393
Martin v. Löwis11437992002-04-12 09:54:03 +00001394#
1395# Report the --help message.
1396#
1397if test "$ac_init_help" = "long"; then
1398 # Omit some internal or obsolete options to make the list less imposing.
1399 # This message is too long to be a string in the A/UX 3.1 sh.
1400 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001401\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403Usage: $0 [OPTION]... [VAR=VALUE]...
1404
1405To assign environment variables (e.g., CC, CFLAGS...), specify them as
1406VAR=VALUE. See below for descriptions of some of the useful variables.
1407
1408Defaults for the options are specified in brackets.
1409
1410Configuration:
1411 -h, --help display this help and exit
1412 --help=short display options specific to this package
1413 --help=recursive display the short help of all the included packages
1414 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001415 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --cache-file=FILE cache test results in FILE [disabled]
1417 -C, --config-cache alias for \`--cache-file=config.cache'
1418 -n, --no-create do not create output files
1419 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1420
Martin v. Löwis11437992002-04-12 09:54:03 +00001421Installation directories:
1422 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001423 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001424 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001425 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427By default, \`make install' will install all the files in
1428\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1429an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1430for instance \`--prefix=\$HOME'.
1431
1432For better control, use the options below.
1433
1434Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 --bindir=DIR user executables [EPREFIX/bin]
1436 --sbindir=DIR system admin executables [EPREFIX/sbin]
1437 --libexecdir=DIR program executables [EPREFIX/libexec]
1438 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1439 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1440 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001441 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001442 --libdir=DIR object code libraries [EPREFIX/lib]
1443 --includedir=DIR C header files [PREFIX/include]
1444 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1445 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1446 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1447 --infodir=DIR info documentation [DATAROOTDIR/info]
1448 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1449 --mandir=DIR man documentation [DATAROOTDIR/man]
1450 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1451 --htmldir=DIR html documentation [DOCDIR]
1452 --dvidir=DIR dvi documentation [DOCDIR]
1453 --pdfdir=DIR pdf documentation [DOCDIR]
1454 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001455_ACEOF
1456
1457 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001458
1459System types:
1460 --build=BUILD configure for building on BUILD [guessed]
1461 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001462_ACEOF
1463fi
1464
1465if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001466 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001467 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001468 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001469 cat <<\_ACEOF
1470
1471Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001472 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001473 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1474 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001475 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001476 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --enable-framework[=INSTALLDIR]
1478 Build (MacOSX|Darwin) framework
1479 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001480 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001481 --enable-loadable-sqlite-extensions
1482 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --enable-ipv6 Enable ipv6 (with ipv4) support
1484 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001485 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001486 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Optional Packages:
1489 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1490 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001491 --with-universal-archs=ARCH
1492 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001493 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001494 --with-framework-name=FRAMEWORK
1495 specify an alternate name of the framework built
1496 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001498 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001499 --with-cxx-main=<compiler>
1500 compile main() and link python executable with C++
1501 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001502 --with-suffix=.exe set executable suffix
1503 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001504 --with-lto Enable Link Time Optimization in PGO builds.
1505 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001506 --with-hash-algorithm=[fnv|siphash24]
1507 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001508 --with-address-sanitizer
1509 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001510 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001511 --with-system-expat build pyexpat module using an installed expat
1512 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001513 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001514 --with-system-libmpdec build _decimal module using an installed libmpdec
1515 library
Ned Deilyd819b932013-09-06 01:07:05 -07001516 --with-tcltk-includes='-I...'
1517 override search for Tcl and Tk include files
1518 --with-tcltk-libs='-L...'
1519 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001520 --with-dbmliborder=db1:db2:...
1521 order to check db backends for dbm. Valid value is a
1522 colon separated string with the backend names
1523 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with(out)-threads[=DIRECTORY]
1526 disable/enable thread support
1527 --with(out)-thread[=DIRECTORY]
1528 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001530 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001531 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001532 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001533 --with-fpectl enable SIGFPE catching
1534 --with-libm=STRING math library
1535 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001536 --with(out)-computed-gotos
1537 Use computed gotos in evaluation loop (enabled by
1538 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001539 --with(out)-ensurepip=[=upgrade]
1540 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001541
1542Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001543 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CC C compiler command
1545 CFLAGS C compiler flags
1546 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1547 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001549 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001550 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001551 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001552 PKG_CONFIG path to pkg-config utility
1553 PKG_CONFIG_PATH
1554 directories to add to pkg-config's search path
1555 PKG_CONFIG_LIBDIR
1556 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001557
1558Use these variables to override the choices made by `configure' or to help
1559it to find libraries and programs with nonstandard names/locations.
1560
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001561Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001562_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001563ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001564fi
1565
1566if test "$ac_init_help" = "recursive"; then
1567 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001568 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001569 test -d "$ac_dir" ||
1570 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1571 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001572 ac_builddir=.
1573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574case "$ac_dir" in
1575.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1576*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001577 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001578 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001579 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 case $ac_top_builddir_sub in
1581 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1582 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1583 esac ;;
1584esac
1585ac_abs_top_builddir=$ac_pwd
1586ac_abs_builddir=$ac_pwd$ac_dir_suffix
1587# for backward compatibility:
1588ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001589
1590case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001593 ac_top_srcdir=$ac_top_builddir_sub
1594 ac_abs_top_srcdir=$ac_pwd ;;
1595 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001596 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597 ac_top_srcdir=$srcdir
1598 ac_abs_top_srcdir=$srcdir ;;
1599 *) # Relative name.
1600 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1601 ac_top_srcdir=$ac_top_build_prefix$srcdir
1602 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001603esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001605
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001606 cd "$ac_dir" || { ac_status=$?; continue; }
1607 # Check for guested configure.
1608 if test -f "$ac_srcdir/configure.gnu"; then
1609 echo &&
1610 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1611 elif test -f "$ac_srcdir/configure"; then
1612 echo &&
1613 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001614 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001615 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001616 fi || ac_status=$?
1617 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001618 done
1619fi
1620
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001622if $ac_init_version; then
1623 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001624python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001625generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001626
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001627Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001628This configure script is free software; the Free Software Foundation
1629gives unlimited permission to copy, distribute and modify it.
1630_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001631 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001633
1634## ------------------------ ##
1635## Autoconf initialization. ##
1636## ------------------------ ##
1637
1638# ac_fn_c_try_compile LINENO
1639# --------------------------
1640# Try to compile conftest.$ac_ext, and return whether this succeeded.
1641ac_fn_c_try_compile ()
1642{
1643 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1644 rm -f conftest.$ac_objext
1645 if { { ac_try="$ac_compile"
1646case "(($ac_try" in
1647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1648 *) ac_try_echo=$ac_try;;
1649esac
1650eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1651$as_echo "$ac_try_echo"; } >&5
1652 (eval "$ac_compile") 2>conftest.err
1653 ac_status=$?
1654 if test -s conftest.err; then
1655 grep -v '^ *+' conftest.err >conftest.er1
1656 cat conftest.er1 >&5
1657 mv -f conftest.er1 conftest.err
1658 fi
1659 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1660 test $ac_status = 0; } && {
1661 test -z "$ac_c_werror_flag" ||
1662 test ! -s conftest.err
1663 } && test -s conftest.$ac_objext; then :
1664 ac_retval=0
1665else
1666 $as_echo "$as_me: failed program was:" >&5
1667sed 's/^/| /' conftest.$ac_ext >&5
1668
1669 ac_retval=1
1670fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001671 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001672 as_fn_set_status $ac_retval
1673
1674} # ac_fn_c_try_compile
1675
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001676# ac_fn_c_try_cpp LINENO
1677# ----------------------
1678# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1679ac_fn_c_try_cpp ()
1680{
1681 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1682 if { { ac_try="$ac_cpp conftest.$ac_ext"
1683case "(($ac_try" in
1684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1685 *) ac_try_echo=$ac_try;;
1686esac
1687eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1688$as_echo "$ac_try_echo"; } >&5
1689 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1690 ac_status=$?
1691 if test -s conftest.err; then
1692 grep -v '^ *+' conftest.err >conftest.er1
1693 cat conftest.er1 >&5
1694 mv -f conftest.er1 conftest.err
1695 fi
1696 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1697 test $ac_status = 0; } > conftest.i && {
1698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1699 test ! -s conftest.err
1700 }; then :
1701 ac_retval=0
1702else
1703 $as_echo "$as_me: failed program was:" >&5
1704sed 's/^/| /' conftest.$ac_ext >&5
1705
1706 ac_retval=1
1707fi
1708 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1709 as_fn_set_status $ac_retval
1710
1711} # ac_fn_c_try_cpp
1712
Matthias Kloseb9621712010-04-24 17:59:49 +00001713# ac_fn_c_try_link LINENO
1714# -----------------------
1715# Try to link conftest.$ac_ext, and return whether this succeeded.
1716ac_fn_c_try_link ()
1717{
1718 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1719 rm -f conftest.$ac_objext conftest$ac_exeext
1720 if { { ac_try="$ac_link"
1721case "(($ac_try" in
1722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1723 *) ac_try_echo=$ac_try;;
1724esac
1725eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1726$as_echo "$ac_try_echo"; } >&5
1727 (eval "$ac_link") 2>conftest.err
1728 ac_status=$?
1729 if test -s conftest.err; then
1730 grep -v '^ *+' conftest.err >conftest.er1
1731 cat conftest.er1 >&5
1732 mv -f conftest.er1 conftest.err
1733 fi
1734 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1735 test $ac_status = 0; } && {
1736 test -z "$ac_c_werror_flag" ||
1737 test ! -s conftest.err
1738 } && test -s conftest$ac_exeext && {
1739 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001740 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001741 }; then :
1742 ac_retval=0
1743else
1744 $as_echo "$as_me: failed program was:" >&5
1745sed 's/^/| /' conftest.$ac_ext >&5
1746
1747 ac_retval=1
1748fi
1749 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1750 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1751 # interfere with the next link command; also delete a directory that is
1752 # left behind by Apple's compiler. We do this before executing the actions.
1753 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001754 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001755 as_fn_set_status $ac_retval
1756
1757} # ac_fn_c_try_link
1758
Matthias Kloseb9621712010-04-24 17:59:49 +00001759# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1760# -------------------------------------------------------
1761# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1762# the include files in INCLUDES and setting the cache variable VAR
1763# accordingly.
1764ac_fn_c_check_header_mongrel ()
1765{
1766 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001767 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1769$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001770if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001771 $as_echo_n "(cached) " >&6
1772fi
1773eval ac_res=\$$3
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1775$as_echo "$ac_res" >&6; }
1776else
1777 # Is the header compilable?
1778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1779$as_echo_n "checking $2 usability... " >&6; }
1780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1781/* end confdefs.h. */
1782$4
1783#include <$2>
1784_ACEOF
1785if ac_fn_c_try_compile "$LINENO"; then :
1786 ac_header_compiler=yes
1787else
1788 ac_header_compiler=no
1789fi
1790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1792$as_echo "$ac_header_compiler" >&6; }
1793
1794# Is the header present?
1795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1796$as_echo_n "checking $2 presence... " >&6; }
1797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1798/* end confdefs.h. */
1799#include <$2>
1800_ACEOF
1801if ac_fn_c_try_cpp "$LINENO"; then :
1802 ac_header_preproc=yes
1803else
1804 ac_header_preproc=no
1805fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001806rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1808$as_echo "$ac_header_preproc" >&6; }
1809
1810# So? What about this header?
1811case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1812 yes:no: )
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1814$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1816$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1817 ;;
1818 no:yes:* )
1819 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1820$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1821 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1822$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1824$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1826$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1827 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1828$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001829( $as_echo "## --------------------------------------- ##
1830## Report this to https://bugs.python.org/ ##
1831## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001832 ) | sed "s/^/$as_me: WARNING: /" >&2
1833 ;;
1834esac
1835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1836$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001837if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001838 $as_echo_n "(cached) " >&6
1839else
1840 eval "$3=\$ac_header_compiler"
1841fi
1842eval ac_res=\$$3
1843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1844$as_echo "$ac_res" >&6; }
1845fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001847
1848} # ac_fn_c_check_header_mongrel
1849
1850# ac_fn_c_try_run LINENO
1851# ----------------------
1852# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1853# that executables *can* be run.
1854ac_fn_c_try_run ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 if { { ac_try="$ac_link"
1858case "(($ac_try" in
1859 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1860 *) ac_try_echo=$ac_try;;
1861esac
1862eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1863$as_echo "$ac_try_echo"; } >&5
1864 (eval "$ac_link") 2>&5
1865 ac_status=$?
1866 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1867 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1868 { { case "(($ac_try" in
1869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1870 *) ac_try_echo=$ac_try;;
1871esac
1872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1873$as_echo "$ac_try_echo"; } >&5
1874 (eval "$ac_try") 2>&5
1875 ac_status=$?
1876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1877 test $ac_status = 0; }; }; then :
1878 ac_retval=0
1879else
1880 $as_echo "$as_me: program exited with status $ac_status" >&5
1881 $as_echo "$as_me: failed program was:" >&5
1882sed 's/^/| /' conftest.$ac_ext >&5
1883
1884 ac_retval=$ac_status
1885fi
1886 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001887 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001888 as_fn_set_status $ac_retval
1889
1890} # ac_fn_c_try_run
1891
1892# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1893# -------------------------------------------------------
1894# Tests whether HEADER exists and can be compiled using the include files in
1895# INCLUDES, setting the cache variable VAR accordingly.
1896ac_fn_c_check_header_compile ()
1897{
1898 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1900$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001901if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001902 $as_echo_n "(cached) " >&6
1903else
1904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1905/* end confdefs.h. */
1906$4
1907#include <$2>
1908_ACEOF
1909if ac_fn_c_try_compile "$LINENO"; then :
1910 eval "$3=yes"
1911else
1912 eval "$3=no"
1913fi
1914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1915fi
1916eval ac_res=\$$3
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1918$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001919 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001920
1921} # ac_fn_c_check_header_compile
1922
Matthias Kloseb9621712010-04-24 17:59:49 +00001923# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1924# -------------------------------------------
1925# Tests whether TYPE exists after having included INCLUDES, setting cache
1926# variable VAR accordingly.
1927ac_fn_c_check_type ()
1928{
1929 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1931$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001932if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001933 $as_echo_n "(cached) " >&6
1934else
1935 eval "$3=no"
1936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1937/* end confdefs.h. */
1938$4
1939int
1940main ()
1941{
1942if (sizeof ($2))
1943 return 0;
1944 ;
1945 return 0;
1946}
1947_ACEOF
1948if ac_fn_c_try_compile "$LINENO"; then :
1949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1950/* end confdefs.h. */
1951$4
1952int
1953main ()
1954{
1955if (sizeof (($2)))
1956 return 0;
1957 ;
1958 return 0;
1959}
1960_ACEOF
1961if ac_fn_c_try_compile "$LINENO"; then :
1962
1963else
1964 eval "$3=yes"
1965fi
1966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1967fi
1968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1969fi
1970eval ac_res=\$$3
1971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1972$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001973 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001974
1975} # ac_fn_c_check_type
1976
1977# ac_fn_c_find_uintX_t LINENO BITS VAR
1978# ------------------------------------
1979# Finds an unsigned integer type with width BITS, setting cache variable VAR
1980# accordingly.
1981ac_fn_c_find_uintX_t ()
1982{
1983 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1985$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001986if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001987 $as_echo_n "(cached) " >&6
1988else
1989 eval "$3=no"
1990 # Order is important - never check a type that is potentially smaller
1991 # than half of the expected target width.
1992 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1993 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995/* end confdefs.h. */
1996$ac_includes_default
1997int
1998main ()
1999{
2000static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002001test_array [0] = 0;
2002return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002003
2004 ;
2005 return 0;
2006}
2007_ACEOF
2008if ac_fn_c_try_compile "$LINENO"; then :
2009 case $ac_type in #(
2010 uint$2_t) :
2011 eval "$3=yes" ;; #(
2012 *) :
2013 eval "$3=\$ac_type" ;;
2014esac
2015fi
2016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002017 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019else
2020 break
2021fi
2022 done
2023fi
2024eval ac_res=\$$3
2025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2026$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002027 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002028
2029} # ac_fn_c_find_uintX_t
2030
2031# ac_fn_c_find_intX_t LINENO BITS VAR
2032# -----------------------------------
2033# Finds a signed integer type with width BITS, setting cache variable VAR
2034# accordingly.
2035ac_fn_c_find_intX_t ()
2036{
2037 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2039$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002040if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002041 $as_echo_n "(cached) " >&6
2042else
2043 eval "$3=no"
2044 # Order is important - never check a type that is potentially smaller
2045 # than half of the expected target width.
2046 for ac_type in int$2_t 'int' 'long int' \
2047 'long long int' 'short int' 'signed char'; do
2048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2049/* end confdefs.h. */
2050$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002051 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002052int
2053main ()
2054{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002055static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002056test_array [0] = 0;
2057return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2065/* end confdefs.h. */
2066$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002067 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002068int
2069main ()
2070{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002071static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002072 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002073test_array [0] = 0;
2074return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002075
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081
2082else
2083 case $ac_type in #(
2084 int$2_t) :
2085 eval "$3=yes" ;; #(
2086 *) :
2087 eval "$3=\$ac_type" ;;
2088esac
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091fi
2092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002093 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095else
2096 break
2097fi
2098 done
2099fi
2100eval ac_res=\$$3
2101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2102$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002103 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002104
2105} # ac_fn_c_find_intX_t
2106
2107# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2108# --------------------------------------------
2109# Tries to find the compile-time value of EXPR in a program that includes
2110# INCLUDES, setting VAR accordingly. Returns whether the value could be
2111# computed
2112ac_fn_c_compute_int ()
2113{
2114 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2115 if test "$cross_compiling" = yes; then
2116 # Depending upon the size, compute the lo and hi bounds.
2117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2118/* end confdefs.h. */
2119$4
2120int
2121main ()
2122{
2123static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002124test_array [0] = 0;
2125return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002126
2127 ;
2128 return 0;
2129}
2130_ACEOF
2131if ac_fn_c_try_compile "$LINENO"; then :
2132 ac_lo=0 ac_mid=0
2133 while :; do
2134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2135/* end confdefs.h. */
2136$4
2137int
2138main ()
2139{
2140static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002141test_array [0] = 0;
2142return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002143
2144 ;
2145 return 0;
2146}
2147_ACEOF
2148if ac_fn_c_try_compile "$LINENO"; then :
2149 ac_hi=$ac_mid; break
2150else
2151 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2152 if test $ac_lo -le $ac_mid; then
2153 ac_lo= ac_hi=
2154 break
2155 fi
2156 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2157fi
2158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2159 done
2160else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163$4
2164int
2165main ()
2166{
2167static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002168test_array [0] = 0;
2169return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002170
2171 ;
2172 return 0;
2173}
2174_ACEOF
2175if ac_fn_c_try_compile "$LINENO"; then :
2176 ac_hi=-1 ac_mid=-1
2177 while :; do
2178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2179/* end confdefs.h. */
2180$4
2181int
2182main ()
2183{
2184static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002185test_array [0] = 0;
2186return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002187
2188 ;
2189 return 0;
2190}
2191_ACEOF
2192if ac_fn_c_try_compile "$LINENO"; then :
2193 ac_lo=$ac_mid; break
2194else
2195 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2196 if test $ac_mid -le $ac_hi; then
2197 ac_lo= ac_hi=
2198 break
2199 fi
2200 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2201fi
2202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2203 done
2204else
2205 ac_lo= ac_hi=
2206fi
2207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2208fi
2209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2210# Binary search between lo and hi bounds.
2211while test "x$ac_lo" != "x$ac_hi"; do
2212 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2214/* end confdefs.h. */
2215$4
2216int
2217main ()
2218{
2219static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002220test_array [0] = 0;
2221return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002222
2223 ;
2224 return 0;
2225}
2226_ACEOF
2227if ac_fn_c_try_compile "$LINENO"; then :
2228 ac_hi=$ac_mid
2229else
2230 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2231fi
2232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2233done
2234case $ac_lo in #((
2235?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2236'') ac_retval=1 ;;
2237esac
2238 else
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h. */
2241$4
2242static long int longval () { return $2; }
2243static unsigned long int ulongval () { return $2; }
2244#include <stdio.h>
2245#include <stdlib.h>
2246int
2247main ()
2248{
2249
2250 FILE *f = fopen ("conftest.val", "w");
2251 if (! f)
2252 return 1;
2253 if (($2) < 0)
2254 {
2255 long int i = longval ();
2256 if (i != ($2))
2257 return 1;
2258 fprintf (f, "%ld", i);
2259 }
2260 else
2261 {
2262 unsigned long int i = ulongval ();
2263 if (i != ($2))
2264 return 1;
2265 fprintf (f, "%lu", i);
2266 }
2267 /* Do not output a trailing newline, as this causes \r\n confusion
2268 on some platforms. */
2269 return ferror (f) || fclose (f) != 0;
2270
2271 ;
2272 return 0;
2273}
2274_ACEOF
2275if ac_fn_c_try_run "$LINENO"; then :
2276 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2277else
2278 ac_retval=1
2279fi
2280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2281 conftest.$ac_objext conftest.beam conftest.$ac_ext
2282rm -f conftest.val
2283
2284 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002285 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002286 as_fn_set_status $ac_retval
2287
2288} # ac_fn_c_compute_int
2289
2290# ac_fn_c_check_func LINENO FUNC VAR
2291# ----------------------------------
2292# Tests whether FUNC exists, setting the cache variable VAR accordingly
2293ac_fn_c_check_func ()
2294{
2295 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2297$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002298if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002299 $as_echo_n "(cached) " >&6
2300else
2301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2302/* end confdefs.h. */
2303/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2304 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2305#define $2 innocuous_$2
2306
2307/* System header to define __stub macros and hopefully few prototypes,
2308 which can conflict with char $2 (); below.
2309 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2310 <limits.h> exists even on freestanding compilers. */
2311
2312#ifdef __STDC__
2313# include <limits.h>
2314#else
2315# include <assert.h>
2316#endif
2317
2318#undef $2
2319
2320/* Override any GCC internal prototype to avoid an error.
2321 Use char because int might match the return type of a GCC
2322 builtin and then its argument prototype would still apply. */
2323#ifdef __cplusplus
2324extern "C"
2325#endif
2326char $2 ();
2327/* The GNU C library defines this for functions which it implements
2328 to always fail with ENOSYS. Some functions are actually named
2329 something starting with __ and the normal name is an alias. */
2330#if defined __stub_$2 || defined __stub___$2
2331choke me
2332#endif
2333
2334int
2335main ()
2336{
2337return $2 ();
2338 ;
2339 return 0;
2340}
2341_ACEOF
2342if ac_fn_c_try_link "$LINENO"; then :
2343 eval "$3=yes"
2344else
2345 eval "$3=no"
2346fi
2347rm -f core conftest.err conftest.$ac_objext \
2348 conftest$ac_exeext conftest.$ac_ext
2349fi
2350eval ac_res=\$$3
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2352$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002353 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002354
2355} # ac_fn_c_check_func
2356
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002357# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2358# ---------------------------------------------
2359# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2360# accordingly.
2361ac_fn_c_check_decl ()
2362{
2363 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2364 as_decl_name=`echo $2|sed 's/ *(.*//'`
2365 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2367$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2368if eval \${$3+:} false; then :
2369 $as_echo_n "(cached) " >&6
2370else
2371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2372/* end confdefs.h. */
2373$4
2374int
2375main ()
2376{
2377#ifndef $as_decl_name
2378#ifdef __cplusplus
2379 (void) $as_decl_use;
2380#else
2381 (void) $as_decl_name;
2382#endif
2383#endif
2384
2385 ;
2386 return 0;
2387}
2388_ACEOF
2389if ac_fn_c_try_compile "$LINENO"; then :
2390 eval "$3=yes"
2391else
2392 eval "$3=no"
2393fi
2394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2395fi
2396eval ac_res=\$$3
2397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2398$as_echo "$ac_res" >&6; }
2399 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2400
2401} # ac_fn_c_check_decl
2402
Matthias Kloseb9621712010-04-24 17:59:49 +00002403# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2404# ----------------------------------------------------
2405# Tries to find if the field MEMBER exists in type AGGR, after including
2406# INCLUDES, setting cache variable VAR accordingly.
2407ac_fn_c_check_member ()
2408{
2409 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2411$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002412if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 $as_echo_n "(cached) " >&6
2414else
2415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2416/* end confdefs.h. */
2417$5
2418int
2419main ()
2420{
2421static $2 ac_aggr;
2422if (ac_aggr.$3)
2423return 0;
2424 ;
2425 return 0;
2426}
2427_ACEOF
2428if ac_fn_c_try_compile "$LINENO"; then :
2429 eval "$4=yes"
2430else
2431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2432/* end confdefs.h. */
2433$5
2434int
2435main ()
2436{
2437static $2 ac_aggr;
2438if (sizeof ac_aggr.$3)
2439return 0;
2440 ;
2441 return 0;
2442}
2443_ACEOF
2444if ac_fn_c_try_compile "$LINENO"; then :
2445 eval "$4=yes"
2446else
2447 eval "$4=no"
2448fi
2449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2450fi
2451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452fi
2453eval ac_res=\$$4
2454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2455$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002456 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002457
2458} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002460This file contains any messages produced by compilers while
2461running configure, to aid debugging if configure makes a mistake.
2462
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002463It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002464generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002465
2466 $ $0 $@
2467
2468_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002469exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002470{
2471cat <<_ASUNAME
2472## --------- ##
2473## Platform. ##
2474## --------- ##
2475
2476hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2477uname -m = `(uname -m) 2>/dev/null || echo unknown`
2478uname -r = `(uname -r) 2>/dev/null || echo unknown`
2479uname -s = `(uname -s) 2>/dev/null || echo unknown`
2480uname -v = `(uname -v) 2>/dev/null || echo unknown`
2481
2482/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2483/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2484
2485/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2486/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2487/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002488/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002489/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2490/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2491/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2492
2493_ASUNAME
2494
2495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2496for as_dir in $PATH
2497do
2498 IFS=$as_save_IFS
2499 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002500 $as_echo "PATH: $as_dir"
2501 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002502IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002503
2504} >&5
2505
2506cat >&5 <<_ACEOF
2507
2508
2509## ----------- ##
2510## Core tests. ##
2511## ----------- ##
2512
2513_ACEOF
2514
2515
2516# Keep a trace of the command line.
2517# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002518# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002519# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002520# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002521ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002522ac_configure_args0=
2523ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002524ac_must_keep_next=false
2525for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002526do
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 for ac_arg
2528 do
2529 case $ac_arg in
2530 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2531 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2532 | -silent | --silent | --silen | --sile | --sil)
2533 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002535 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002536 esac
2537 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002539 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002540 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002541 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002542 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002544 case $ac_arg in
2545 *=* | --config-cache | -C | -disable-* | --disable-* \
2546 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2547 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2548 | -with-* | --with-* | -without-* | --without-* | --x)
2549 case "$ac_configure_args0 " in
2550 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2551 esac
2552 ;;
2553 -* ) ac_must_keep_next=true ;;
2554 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002555 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002557 ;;
2558 esac
2559 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002560done
Matthias Kloseb9621712010-04-24 17:59:49 +00002561{ ac_configure_args0=; unset ac_configure_args0;}
2562{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002563
2564# When interrupted or exit'd, cleanup temporary files, and complete
2565# config.log. We remove comments because anyway the quotes in there
2566# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567# WARNING: Use '\'' to represent an apostrophe within the trap.
2568# 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 +00002569trap 'exit_status=$?
2570 # Save into config.log some information that might help in debugging.
2571 {
2572 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002573
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002575## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002577 echo
2578 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579(
2580 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2581 eval ac_val=\$$ac_var
2582 case $ac_val in #(
2583 *${as_nl}*)
2584 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002585 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2586$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587 esac
2588 case $ac_var in #(
2589 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2591 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002592 esac ;;
2593 esac
2594 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2597 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 "s/'\''/'\''\\\\'\'''\''/g;
2600 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2601 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002602 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002604 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002605 esac |
2606 sort
2607)
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002609
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002610 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002611## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002612## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002613 echo
2614 for ac_var in $ac_subst_vars
2615 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 eval ac_val=\$$ac_var
2617 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002618 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002621 done | sort
2622 echo
2623
2624 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002625 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002626## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002627## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002628 echo
2629 for ac_var in $ac_subst_files
2630 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631 eval ac_val=\$$ac_var
2632 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002633 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002634 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002635 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002636 done | sort
2637 echo
2638 fi
2639
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002641 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002642## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002643## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002644 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 echo
2647 fi
2648 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 $as_echo "$as_me: caught signal $ac_signal"
2650 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002651 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002652 rm -f core *.core core.conftest.* &&
2653 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002656for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002658done
2659ac_signal=0
2660
2661# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002662rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002663
Matthias Kloseb9621712010-04-24 17:59:49 +00002664$as_echo "/* confdefs.h */" > confdefs.h
2665
Martin v. Löwis11437992002-04-12 09:54:03 +00002666# Predefined preprocessor variables.
2667
2668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_NAME "$PACKAGE_NAME"
2670_ACEOF
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2674_ACEOF
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_VERSION "$PACKAGE_VERSION"
2678_ACEOF
2679
Martin v. Löwis11437992002-04-12 09:54:03 +00002680cat >>confdefs.h <<_ACEOF
2681#define PACKAGE_STRING "$PACKAGE_STRING"
2682_ACEOF
2683
Martin v. Löwis11437992002-04-12 09:54:03 +00002684cat >>confdefs.h <<_ACEOF
2685#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2686_ACEOF
2687
Matthias Kloseb9621712010-04-24 17:59:49 +00002688cat >>confdefs.h <<_ACEOF
2689#define PACKAGE_URL "$PACKAGE_URL"
2690_ACEOF
2691
Martin v. Löwis11437992002-04-12 09:54:03 +00002692
2693# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002694# Prefer an explicitly selected file to automatically selected ones.
2695ac_site_file1=NONE
2696ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002698 # We do not want a PATH search for config.site.
2699 case $CONFIG_SITE in #((
2700 -*) ac_site_file1=./$CONFIG_SITE;;
2701 */*) ac_site_file1=$CONFIG_SITE;;
2702 *) ac_site_file1=./$CONFIG_SITE;;
2703 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002705 ac_site_file1=$prefix/share/config.site
2706 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002707else
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 ac_site_file1=$ac_default_prefix/share/config.site
2709 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002710fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002711for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712do
Matthias Kloseb9621712010-04-24 17:59:49 +00002713 test "x$ac_site_file" = xNONE && continue
2714 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2716$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002718 . "$ac_site_file" \
2719 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2721as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002722See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002723 fi
2724done
2725
2726if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 # Some versions of bash will fail to source /dev/null (special files
2728 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2729 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2731$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002733 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2734 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 esac
2736 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002737else
Matthias Kloseb9621712010-04-24 17:59:49 +00002738 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2739$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 >$cache_file
2741fi
2742
2743# Check that the precious variables saved in the cache have kept the same
2744# value.
2745ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002746for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2748 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002749 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2750 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 case $ac_old_set,$ac_new_set in
2752 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002753 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2754$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 +00002755 ac_cache_corrupted=: ;;
2756 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002757 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2758$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 ac_cache_corrupted=: ;;
2760 ,);;
2761 *)
2762 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002763 # differences in whitespace do not lead to failure.
2764 ac_old_val_w=`echo x $ac_old_val`
2765 ac_new_val_w=`echo x $ac_new_val`
2766 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2768$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2769 ac_cache_corrupted=:
2770 else
2771 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2772$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2773 eval $ac_var=\$ac_old_val
2774 fi
2775 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2776$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2777 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2778$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 fi;;
2780 esac
2781 # Pass precious variables to config.status.
2782 if test "$ac_new_set" = set; then
2783 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002784 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 *) ac_arg=$ac_var=$ac_new_val ;;
2786 esac
2787 case " $ac_configure_args " in
2788 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002789 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002790 esac
2791 fi
2792done
2793if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002794 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2795$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2796 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2797$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002798 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002799fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002800## -------------------- ##
2801## Main body of script. ##
2802## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002803
Guido van Rossum7f43da71994-08-01 12:15:30 +00002804ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002805ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002806ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2807ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2808ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002809
Guido van Rossum627b2d71993-12-24 10:39:16 +00002810
Michael W. Hudson54241132001-12-07 15:38:26 +00002811
Trent Nelson4d4ec652012-10-16 08:51:24 -04002812
Trent Nelson5595ab52012-10-17 04:47:31 -04002813if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002814 # If we're building out-of-tree, we need to make sure the following
2815 # resources get picked up before their $srcdir counterparts.
2816 # Objects/ -> typeslots.inc
2817 # Include/ -> Python-ast.h, graminit.h
2818 # Python/ -> importlib.h
2819 # (A side effect of this is that these resources will automatically be
2820 # regenerated when building out-of-tree, regardless of whether or not
2821 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2822 # off.)
2823 BASECPPFLAGS="-IObjects -IInclude -IPython"
2824else
2825 BASECPPFLAGS=""
2826fi
2827
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002828
2829
2830
2831
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002832if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002833then
2834# Extract the first word of "hg", so it can be a program name with args.
2835set dummy hg; ac_word=$2
2836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2837$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002838if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002839 $as_echo_n "(cached) " >&6
2840else
2841 if test -n "$HAS_HG"; then
2842 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2843else
2844as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2845for as_dir in $PATH
2846do
2847 IFS=$as_save_IFS
2848 test -z "$as_dir" && as_dir=.
2849 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002851 ac_cv_prog_HAS_HG="found"
2852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2853 break 2
2854 fi
2855done
2856 done
2857IFS=$as_save_IFS
2858
2859 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2860fi
2861fi
2862HAS_HG=$ac_cv_prog_HAS_HG
2863if test -n "$HAS_HG"; then
2864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2865$as_echo "$HAS_HG" >&6; }
2866else
2867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2868$as_echo "no" >&6; }
2869fi
2870
2871
2872else
2873HAS_HG=no-repository
2874fi
2875if test $HAS_HG = found
2876then
2877 HGVERSION="hg id -i \$(srcdir)"
2878 HGTAG="hg id -t \$(srcdir)"
2879 HGBRANCH="hg id -b \$(srcdir)"
2880else
2881 HGVERSION=""
2882 HGTAG=""
2883 HGBRANCH=""
2884fi
2885
2886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002888
2889
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002890ac_aux_dir=
2891for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2892 if test -f "$ac_dir/install-sh"; then
2893 ac_aux_dir=$ac_dir
2894 ac_install_sh="$ac_aux_dir/install-sh -c"
2895 break
2896 elif test -f "$ac_dir/install.sh"; then
2897 ac_aux_dir=$ac_dir
2898 ac_install_sh="$ac_aux_dir/install.sh -c"
2899 break
2900 elif test -f "$ac_dir/shtool"; then
2901 ac_aux_dir=$ac_dir
2902 ac_install_sh="$ac_aux_dir/shtool install -c"
2903 break
2904 fi
2905done
2906if test -z "$ac_aux_dir"; then
2907 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2908fi
2909
2910# These three variables are undocumented and unsupported,
2911# and are intended to be withdrawn in a future Autoconf release.
2912# They can cause serious problems if a builder's source tree is in a directory
2913# whose full name contains unusual characters.
2914ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2915ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2916ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2917
2918
2919# Make sure we can run config.sub.
2920$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2921 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2922
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2924$as_echo_n "checking build system type... " >&6; }
2925if ${ac_cv_build+:} false; then :
2926 $as_echo_n "(cached) " >&6
2927else
2928 ac_build_alias=$build_alias
2929test "x$ac_build_alias" = x &&
2930 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2931test "x$ac_build_alias" = x &&
2932 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2933ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2934 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2935
2936fi
2937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2938$as_echo "$ac_cv_build" >&6; }
2939case $ac_cv_build in
2940*-*-*) ;;
2941*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2942esac
2943build=$ac_cv_build
2944ac_save_IFS=$IFS; IFS='-'
2945set x $ac_cv_build
2946shift
2947build_cpu=$1
2948build_vendor=$2
2949shift; shift
2950# Remember, the first character of IFS is used to create $*,
2951# except with old shells:
2952build_os=$*
2953IFS=$ac_save_IFS
2954case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2955
2956
2957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2958$as_echo_n "checking host system type... " >&6; }
2959if ${ac_cv_host+:} false; then :
2960 $as_echo_n "(cached) " >&6
2961else
2962 if test "x$host_alias" = x; then
2963 ac_cv_host=$ac_cv_build
2964else
2965 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2966 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2967fi
2968
2969fi
2970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2971$as_echo "$ac_cv_host" >&6; }
2972case $ac_cv_host in
2973*-*-*) ;;
2974*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2975esac
2976host=$ac_cv_host
2977ac_save_IFS=$IFS; IFS='-'
2978set x $ac_cv_host
2979shift
2980host_cpu=$1
2981host_vendor=$2
2982shift; shift
2983# Remember, the first character of IFS is used to create $*,
2984# except with old shells:
2985host_os=$*
2986IFS=$ac_save_IFS
2987case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2988
2989
2990
doko@python.orga10e4a92013-01-25 18:45:12 +01002991
2992
Ned Deilyfcbc2462014-08-22 13:32:49 -07002993# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2994rm -f pybuilddir.txt
2995
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002996for ac_prog in python$PACKAGE_VERSION python3 python
2997do
2998 # Extract the first word of "$ac_prog", so it can be a program name with args.
2999set dummy $ac_prog; ac_word=$2
3000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3001$as_echo_n "checking for $ac_word... " >&6; }
3002if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
3003 $as_echo_n "(cached) " >&6
3004else
3005 if test -n "$PYTHON_FOR_GEN"; then
3006 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
3007else
3008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3009for as_dir in $PATH
3010do
3011 IFS=$as_save_IFS
3012 test -z "$as_dir" && as_dir=.
3013 for ac_exec_ext in '' $ac_executable_extensions; do
3014 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3015 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
3016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3017 break 2
3018 fi
3019done
3020 done
3021IFS=$as_save_IFS
3022
3023fi
3024fi
3025PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
3026if test -n "$PYTHON_FOR_GEN"; then
3027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
3028$as_echo "$PYTHON_FOR_GEN" >&6; }
3029else
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3031$as_echo "no" >&6; }
3032fi
3033
3034
3035 test -n "$PYTHON_FOR_GEN" && break
3036done
3037test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
3038
3039if test "$PYTHON_FOR_GEN" = not-found; then
3040 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
3041 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
3042 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
3043fi
3044
3045
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003046if test "$cross_compiling" = yes; then
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
3048$as_echo_n "checking for python interpreter for cross build... " >&6; }
3049 if test -z "$PYTHON_FOR_BUILD"; then
3050 for interp in python$PACKAGE_VERSION python3 python; do
3051 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02003052 if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003053 break
3054 fi
3055 interp=
3056 done
3057 if test x$interp = x; then
3058 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
3059 fi
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
3061$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01003062 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 +02003063 fi
Martin Panter43a94a72016-07-29 05:52:32 +00003064 # Used to comment out stuff for rebuilding generated files
3065 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01003066elif test "$cross_compiling" = maybe; then
3067 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003068else
3069 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00003070 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003071fi
3072
3073
Martin v. Löwis11437992002-04-12 09:54:03 +00003074
Martin Pantereac67be2016-07-28 01:28:27 +00003075
Benjamin Petersond23f8222009-04-05 19:13:16 +00003076if test "$prefix" != "/"; then
3077 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
3078fi
3079
3080
Martin v. Löwis11437992002-04-12 09:54:03 +00003081
3082
Martin v. Löwis8316feb2003-06-14 07:48:07 +00003083# We don't use PACKAGE_ variables, and they cause conflicts
3084# with other autoconf-based packages that include Python.h
3085grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
3086rm confdefs.h
3087mv confdefs.h.new confdefs.h
3088
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00003089
Benjamin Petersona8c22a02015-05-27 23:29:00 -05003090VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00003091
Benjamin Petersond7f73e92010-09-05 00:09:07 +00003092# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003093
3094SOVERSION=1.0
3095
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003096# The later defininition of _XOPEN_SOURCE disables certain features
3097# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
3098
Matthias Kloseb9621712010-04-24 17:59:49 +00003099$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003100
3101
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003102# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3103# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
3104# them.
3105
Matthias Kloseb9621712010-04-24 17:59:49 +00003106$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003107
3108
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003109# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3110# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3111# them.
3112
Matthias Kloseb9621712010-04-24 17:59:49 +00003113$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003114
3115
Martin v. Löwisd6320502004-08-12 13:45:08 +00003116# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3117# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3118
Matthias Kloseb9621712010-04-24 17:59:49 +00003119$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003120
3121
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003122# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3123# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3124# them.
3125
Matthias Kloseb9621712010-04-24 17:59:49 +00003126$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003127
3128
3129
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003130define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003131
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003132# Arguments passed to configure.
3133
3134CONFIG_ARGS="$ac_configure_args"
3135
Matthias Kloseb9621712010-04-24 17:59:49 +00003136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3137$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003139if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003140 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003141 case $enableval in
3142 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003143 # Locate the best usable SDK, see Mac/README.txt for more
3144 # information
3145 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003146 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003147 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003148 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3149 if test ! -d "${enableval}"
3150 then
3151 enableval=/
3152 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003153 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003154 ;;
3155 esac
3156 case $enableval in
3157 no)
3158 UNIVERSALSDK=
3159 enable_universalsdk=
3160 ;;
3161 *)
3162 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003163 if test ! -d "${UNIVERSALSDK}"
3164 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003165 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003166 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003167 ;;
3168 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003169
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003170
Thomas Wouters477c8d52006-05-27 19:21:47 +00003171else
3172
3173 UNIVERSALSDK=
3174 enable_universalsdk=
3175
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003176fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003177
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003178if test -n "${UNIVERSALSDK}"
3179then
Matthias Kloseb9621712010-04-24 17:59:49 +00003180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3181$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003182else
Matthias Kloseb9621712010-04-24 17:59:49 +00003183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3184$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003185fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003186
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003187
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003188
Ned Deily87adb6e2013-10-18 21:09:56 -07003189ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003190
Ned Deilycbfb9a52012-06-23 16:02:19 -07003191# For backward compatibility reasons we prefer to select '32-bit' if available,
3192# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003193UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003194if test "`uname -s`" = "Darwin"
3195then
3196 if test -n "${UNIVERSALSDK}"
3197 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003198 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003199 then
3200 UNIVERSAL_ARCHS="intel"
3201 fi
3202 fi
3203fi
3204
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003205
Matthias Kloseb9621712010-04-24 17:59:49 +00003206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3207$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003208
3209# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003210if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003211 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212 UNIVERSAL_ARCHS="$withval"
3213
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003214fi
3215
Ned Deily87adb6e2013-10-18 21:09:56 -07003216if test -n "${UNIVERSALSDK}"
3217then
3218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3219$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3220else
3221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3222$as_echo "no" >&6; }
3223fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225
3226# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003227if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003228 withval=$with_framework_name;
3229 PYTHONFRAMEWORK=${withval}
3230 PYTHONFRAMEWORKDIR=${withval}.framework
3231 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3232
3233else
3234
3235 PYTHONFRAMEWORK=Python
3236 PYTHONFRAMEWORKDIR=Python.framework
3237 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3238
3239fi
3240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003242if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003243 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003244 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003245 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003246 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003247 esac
3248 case $enableval in
3249 no)
3250 PYTHONFRAMEWORK=
3251 PYTHONFRAMEWORKDIR=no-framework
3252 PYTHONFRAMEWORKPREFIX=
3253 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003254 FRAMEWORKINSTALLFIRST=
3255 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003256 FRAMEWORKALTINSTALLFIRST=
3257 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003258 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003259 if test "x${prefix}" = "xNONE"; then
3260 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3261 else
3262 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3263 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003264 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003265 ;;
3266 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003267 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003268 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003269 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003270 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003271 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3272 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003273 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003274 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003275
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003276 if test "x${prefix}" = "xNONE" ; then
3277 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003278
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003279 else
3280 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3281 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003282
3283 case "${enableval}" in
3284 /System*)
3285 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3286 if test "${prefix}" = "NONE" ; then
3287 # See below
3288 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3289 fi
3290 ;;
3291
3292 /Library*)
3293 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3294 ;;
3295
3296 */Library/Frameworks)
3297 MDIR="`dirname "${enableval}"`"
3298 MDIR="`dirname "${MDIR}"`"
3299 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3300
3301 if test "${prefix}" = "NONE"; then
3302 # User hasn't specified the
3303 # --prefix option, but wants to install
3304 # the framework in a non-default location,
3305 # ensure that the compatibility links get
3306 # installed relative to that prefix as well
3307 # instead of in /usr/local.
3308 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3309 fi
3310 ;;
3311
3312 *)
3313 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3314 ;;
3315 esac
3316
Jack Jansen127e56e2001-09-11 14:41:54 +00003317 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003318
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003319 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003320 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003321 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003322
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003324
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003325 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3326
3327 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3328
Jack Jansene578a632001-08-15 01:27:14 +00003329 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003330
Guido van Rossum563e7081996-09-10 18:20:48 +00003331else
Martin v. Löwis11437992002-04-12 09:54:03 +00003332
Jack Jansene578a632001-08-15 01:27:14 +00003333 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003334 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003335 PYTHONFRAMEWORKPREFIX=
3336 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003337 FRAMEWORKINSTALLFIRST=
3338 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003339 FRAMEWORKALTINSTALLFIRST=
3340 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003341 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003342 if test "x${prefix}" = "xNONE" ; then
3343 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3344 else
3345 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3346 fi
Jack Jansene578a632001-08-15 01:27:14 +00003347 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003348
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003349
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003350fi
3351
Thomas Wouters477c8d52006-05-27 19:21:47 +00003352
3353
Michael W. Hudson54241132001-12-07 15:38:26 +00003354
3355
3356
3357
Jack Jansene578a632001-08-15 01:27:14 +00003358
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003359
3360
3361
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003362
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003363
Ned Deilyb8f944f2013-11-21 22:42:25 -08003364
Jack Jansene578a632001-08-15 01:27:14 +00003365##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003366## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003367## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003368##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003369# Set name for machine-dependent library files
3370
Matthias Kloseb9621712010-04-24 17:59:49 +00003371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3372$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003373if test -z "$MACHDEP"
3374then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003375 # avoid using uname for cross builds
3376 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003377 # ac_sys_system and ac_sys_release are used for setting
3378 # a lot of different things including 'define_xopen_source'
3379 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003380 case "$host" in
3381 *-*-linux*)
3382 ac_sys_system=Linux
3383 ;;
3384 *-*-cygwin*)
3385 ac_sys_system=Cygwin
3386 ;;
3387 *)
3388 # for now, limit cross builds to known configurations
3389 MACHDEP="unknown"
3390 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3391 esac
3392 ac_sys_release=
3393 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003394 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003395 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003396 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003397 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003398 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003399 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003400 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003401 fi
3402 ac_md_system=`echo $ac_sys_system |
3403 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3404 ac_md_release=`echo $ac_sys_release |
3405 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3406 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003407
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003408 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003409 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003410 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003411 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003412 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003413 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003414 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003415fi
Guido van Rossum91922671997-10-09 20:24:13 +00003416
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003417
3418if test "$cross_compiling" = yes; then
3419 case "$host" in
3420 *-*-linux*)
3421 case "$host_cpu" in
3422 arm*)
3423 _host_cpu=arm
3424 ;;
3425 *)
3426 _host_cpu=$host_cpu
3427 esac
3428 ;;
3429 *-*-cygwin*)
3430 _host_cpu=
3431 ;;
3432 *)
3433 # for now, limit cross builds to known configurations
3434 MACHDEP="unknown"
3435 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3436 esac
3437 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3438fi
3439
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003440# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3441# disable features if it is defined, without any means to access these
3442# features as extensions. For these systems, we skip the definition of
3443# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3444# some feature, make sure there is no alternative way to access this
3445# feature. Also, when using wildcards, make sure you have verified the
3446# need for not defining _XOPEN_SOURCE on all systems matching the
3447# wildcard, and that the wildcard does not include future systems
3448# (which may remove their limitations).
3449case $ac_sys_system/$ac_sys_release in
3450 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3451 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003452 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003453 # In addition, Stefan Krah confirms that issue #1244610 exists through
3454 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003455 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003456 define_xopen_source=no
3457 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3458 # also defined. This can be overridden by defining _BSD_SOURCE
3459 # As this has a different meaning on Linux, only define it on OpenBSD
3460
Matthias Kloseb9621712010-04-24 17:59:49 +00003461$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003462
3463 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003464 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003465 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3466 # also defined. This can be overridden by defining _BSD_SOURCE
3467 # As this has a different meaning on Linux, only define it on OpenBSD
3468
Matthias Kloseb9621712010-04-24 17:59:49 +00003469$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003470
3471 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003472 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3473 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3474 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003475 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 +00003476 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003477 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3478 # request to enable features supported by the standard as a request
3479 # to disable features not supported by the standard. The best way
3480 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3481 # entirely and define __EXTENSIONS__ instead.
3482 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003483 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003484 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3485 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003486 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003487 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003488 define_xopen_source=no;;
3489 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003490 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003491 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003492 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003493 # On FreeBSD 4, the math functions C89 does not cover are never defined
3494 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3495 FreeBSD/4.*)
3496 define_xopen_source=no;;
3497 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3498 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3499 # identifies itself as Darwin/7.*
3500 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3501 # disables platform specific features beyond repair.
3502 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3503 # has no effect, don't bother defining them
3504 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003505 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003506 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003507 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003508 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3509 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3510 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003511 AIX/4)
3512 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003513 AIX/5)
3514 if test `uname -r` -eq 1; then
3515 define_xopen_source=no
3516 fi
3517 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003518 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3519 # defining NI_NUMERICHOST.
3520 QNX/6.3.2)
3521 define_xopen_source=no
3522 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003523
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003524esac
3525
3526if test $define_xopen_source = yes
3527then
Victor Stinner14d098d2011-09-07 22:29:43 +02003528 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003529
Victor Stinner14d098d2011-09-07 22:29:43 +02003530$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003531
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003532
3533 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3534 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3535 # several APIs are not declared. Since this is also needed in some
3536 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003537
Matthias Kloseb9621712010-04-24 17:59:49 +00003538$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003539
3540
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003541
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003542$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003543
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003544fi
3545
Christian Heimes647cd872013-12-07 23:39:33 +01003546# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3547case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003548 hp*|HP*)
3549 define_stdc_a1=yes;;
3550 *)
3551 define_stdc_a1=no;;
3552esac
3553
3554if test $define_stdc_a1 = yes
3555then
Christian Heimes647cd872013-12-07 23:39:33 +01003556
3557$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3558
Christian Heimesb02bcae2013-12-08 15:21:08 +01003559fi
Christian Heimes647cd872013-12-07 23:39:33 +01003560
Guido van Rossum91922671997-10-09 20:24:13 +00003561#
3562# SGI compilers allow the specification of the both the ABI and the
3563# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003564# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003565#
3566# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3567# thus supply support for various ABI/ISA combinations. The MACHDEP
3568# variable is also adjusted.
3569#
3570
3571if test ! -z "$SGI_ABI"
3572then
3573 CC="cc $SGI_ABI"
3574 LDFLAGS="$SGI_ABI $LDFLAGS"
3575 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3578$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003579
Jack Jansen6b08a402004-06-03 12:41:45 +00003580# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3581# it may influence the way we can build extensions, so distutils
3582# needs to check it
3583
Thomas Wouters477c8d52006-05-27 19:21:47 +00003584
Jack Jansen6b08a402004-06-03 12:41:45 +00003585CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003586EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003587
Guido van Rossum627b2d71993-12-24 10:39:16 +00003588# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003589
3590# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3591# for debug/optimization stuff. BASECFLAGS is for flags that are required
3592# just to get things to compile and link. Users are free to override OPT
3593# when running configure or make. The build should not break if they do.
3594# BASECFLAGS should generally not be messed with, however.
3595
3596# XXX shouldn't some/most/all of this code be merged with the stuff later
3597# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3599$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003602if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003604 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003605 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003606 without_gcc=yes;;
3607 yes) CC=gcc
3608 without_gcc=no;;
3609 *) CC=$withval
3610 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003611 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003612else
Martin v. Löwis11437992002-04-12 09:54:03 +00003613
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003614 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003615 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003616 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003617 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003618 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003619fi
3620
Matthias Kloseb9621712010-04-24 17:59:49 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3622$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003623
Zachary Ware5af85642015-12-21 12:09:17 -06003624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3625$as_echo_n "checking for --with-icc... " >&6; }
3626
3627# Check whether --with-icc was given.
3628if test "${with_icc+set}" = set; then :
3629 withval=$with_icc;
3630 case $withval in
3631 no) CC=${CC:-cc}
3632 with_icc=no;;
3633 yes) CC=icc
3634 CXX=icpc
3635 with_icc=yes;;
3636 *) CC=$withval
3637 with_icc=$withval;;
3638 esac
3639else
3640
3641 with_icc=no
3642fi
3643
3644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3645$as_echo "$with_icc" >&6; }
3646
Guido van Rossum8b131c51995-03-09 14:10:13 +00003647# If the user switches compilers, we can't believe the cache
3648if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3649then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003650 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003651(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003652fi
3653
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003654# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3655# when the compiler supports them, but we don't always want -O2, and
3656# we set -g later.
3657if test -z "$CFLAGS"; then
3658 CFLAGS=
3659fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003660
3661if test "$ac_sys_system" = "Darwin"
3662then
3663 # Compiler selection on MacOSX is more complicated than
3664 # AC_PROG_CC can handle, see Mac/README.txt for more
3665 # information
3666 if test -z "${CC}"
3667 then
3668 found_gcc=
3669 found_clang=
3670 as_save_IFS=$IFS; IFS=:
3671 for as_dir in $PATH
3672 do
3673 IFS=$as_save_IFS
3674 if test -x $as_dir/gcc; then
3675 if test -z "${found_gcc}"; then
3676 found_gcc=$as_dir/gcc
3677 fi
3678 fi
3679 if test -x $as_dir/clang; then
3680 if test -z "${found_clang}"; then
3681 found_clang=$as_dir/clang
3682 fi
3683 fi
3684 done
3685 IFS=$as_save_IFS
3686
3687 if test -n "$found_gcc" -a -n "$found_clang"
3688 then
3689 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3690 then
3691 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3692$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3693 CC="$found_clang"
3694 CXX="$found_clang++"
3695 fi
3696
3697
3698 elif test -z "$found_gcc" -a -n "$found_clang"
3699 then
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3701$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3702 CC="$found_clang"
3703 CXX="$found_clang++"
3704
3705 elif test -z "$found_gcc" -a -z "$found_clang"
3706 then
3707 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3708 if test -n "${found_clang}"
3709 then
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3711$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3712 CC="${found_clang}"
3713 CXX="`/usr/bin/xcrun -find clang++`"
3714
3715 # else: use default behaviour
3716 fi
3717 fi
3718 fi
3719fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003720ac_ext=c
3721ac_cpp='$CPP $CPPFLAGS'
3722ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3723ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3724ac_compiler_gnu=$ac_cv_c_compiler_gnu
3725if test -n "$ac_tool_prefix"; then
3726 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3727set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3729$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003730if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003731 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003732else
3733 if test -n "$CC"; then
3734 ac_cv_prog_CC="$CC" # Let the user override the test.
3735else
Martin v. Löwis11437992002-04-12 09:54:03 +00003736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3737for as_dir in $PATH
3738do
3739 IFS=$as_save_IFS
3740 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003741 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003742 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 $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 +00003745 break 2
3746 fi
3747done
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003749IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003750
Jack Jansendd19cf82001-12-06 22:36:17 +00003751fi
3752fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003753CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
3764if test -z "$ac_cv_prog_CC"; then
3765 ac_ct_CC=$CC
3766 # Extract the first word of "gcc", so it can be a program name with args.
3767set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3769$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003770if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003772else
3773 if test -n "$ac_ct_CC"; then
3774 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3775else
3776as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3777for as_dir in $PATH
3778do
3779 IFS=$as_save_IFS
3780 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003781 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003782 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003784 $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 +00003785 break 2
3786 fi
3787done
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003789IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003790
3791fi
3792fi
3793ac_ct_CC=$ac_cv_prog_ac_ct_CC
3794if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3796$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003797else
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3799$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003800fi
3801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 if test "x$ac_ct_CC" = x; then
3803 CC=""
3804 else
3805 case $cross_compiling:$ac_tool_warned in
3806yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003807{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3808$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809ac_tool_warned=yes ;;
3810esac
3811 CC=$ac_ct_CC
3812 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003813else
3814 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003815fi
3816
Jack Jansendd19cf82001-12-06 22:36:17 +00003817if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 if test -n "$ac_tool_prefix"; then
3819 # 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 +00003820set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003823if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003825else
3826 if test -n "$CC"; then
3827 ac_cv_prog_CC="$CC" # Let the user override the test.
3828else
Martin v. Löwis11437992002-04-12 09:54:03 +00003829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832 IFS=$as_save_IFS
3833 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003837 $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 +00003838 break 2
3839 fi
3840done
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003842IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003843
3844fi
3845fi
3846CC=$ac_cv_prog_CC
3847if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3849$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850else
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853fi
3854
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003857fi
3858if test -z "$CC"; then
3859 # Extract the first word of "cc", so it can be a program name with args.
3860set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3862$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003863if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003865else
3866 if test -n "$CC"; then
3867 ac_cv_prog_CC="$CC" # Let the user override the test.
3868else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003869 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003870as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3871for as_dir in $PATH
3872do
3873 IFS=$as_save_IFS
3874 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003876 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003877 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3878 ac_prog_rejected=yes
3879 continue
3880 fi
3881 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003882 $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 +00003883 break 2
3884 fi
3885done
Matthias Kloseb9621712010-04-24 17:59:49 +00003886 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003887IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003888
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003889if test $ac_prog_rejected = yes; then
3890 # We found a bogon in the path, so make sure we never use it.
3891 set dummy $ac_cv_prog_CC
3892 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003893 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003894 # We chose a different compiler from the bogus one.
3895 # However, it has the same basename, so the bogon will be chosen
3896 # first if we set CC to just the basename; use the full file name.
3897 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003898 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003899 fi
3900fi
3901fi
3902fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003903CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003904if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3906$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003907else
Matthias Kloseb9621712010-04-24 17:59:49 +00003908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3909$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003910fi
3911
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912
Martin v. Löwis11437992002-04-12 09:54:03 +00003913fi
3914if test -z "$CC"; then
3915 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003916 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003917 do
3918 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3919set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3921$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003922if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003923 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003924else
3925 if test -n "$CC"; then
3926 ac_cv_prog_CC="$CC" # Let the user override the test.
3927else
Martin v. Löwis11437992002-04-12 09:54:03 +00003928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3929for as_dir in $PATH
3930do
3931 IFS=$as_save_IFS
3932 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003933 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003934 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003935 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003936 $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 +00003937 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003938 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003939done
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003941IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003942
3943fi
3944fi
3945CC=$ac_cv_prog_CC
3946if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3948$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003949else
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3951$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003952fi
3953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003954
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 test -n "$CC" && break
3956 done
3957fi
3958if test -z "$CC"; then
3959 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003961do
3962 # Extract the first word of "$ac_prog", so it can be a program name with args.
3963set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3965$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003966if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003967 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003968else
3969 if test -n "$ac_ct_CC"; then
3970 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3971else
3972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3973for as_dir in $PATH
3974do
3975 IFS=$as_save_IFS
3976 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003977 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003980 $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 +00003981 break 2
3982 fi
3983done
Matthias Kloseb9621712010-04-24 17:59:49 +00003984 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003986
Martin v. Löwis11437992002-04-12 09:54:03 +00003987fi
3988fi
3989ac_ct_CC=$ac_cv_prog_ac_ct_CC
3990if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3992$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003993else
Matthias Kloseb9621712010-04-24 17:59:49 +00003994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3995$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003996fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003997
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003998
Martin v. Löwis11437992002-04-12 09:54:03 +00003999 test -n "$ac_ct_CC" && break
4000done
Michael W. Hudson54241132001-12-07 15:38:26 +00004001
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002 if test "x$ac_ct_CC" = x; then
4003 CC=""
4004 else
4005 case $cross_compiling:$ac_tool_warned in
4006yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00004007{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4008$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009ac_tool_warned=yes ;;
4010esac
4011 CC=$ac_ct_CC
4012 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004013fi
4014
4015fi
4016
4017
Matthias Kloseb9621712010-04-24 17:59:49 +00004018test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004020as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02004021See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004022
4023# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00004024$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4025set X $ac_compile
4026ac_compiler=$2
4027for ac_option in --version -v -V -qversion; do
4028 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004029case "(($ac_try" in
4030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4031 *) ac_try_echo=$ac_try;;
4032esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4034$as_echo "$ac_try_echo"; } >&5
4035 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004036 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004037 if test -s conftest.err; then
4038 sed '10a\
4039... rest of stderr output deleted ...
4040 10q' conftest.err >conftest.er1
4041 cat conftest.er1 >&5
4042 fi
4043 rm -f conftest.er1 conftest.err
4044 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4045 test $ac_status = 0; }
4046done
Martin v. Löwis11437992002-04-12 09:54:03 +00004047
Matthias Kloseb9621712010-04-24 17:59:49 +00004048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004049/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00004050
Martin v. Löwis11437992002-04-12 09:54:03 +00004051int
4052main ()
4053{
4054
4055 ;
4056 return 0;
4057}
4058_ACEOF
4059ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00004060ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00004061# Try to create an executable without -o first, disregard a.out.
4062# It will help us diagnose broken compilers, and finding out an intuition
4063# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00004064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4065$as_echo_n "checking whether the C compiler works... " >&6; }
4066ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4067
4068# The possible output files:
4069ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004071ac_rmfiles=
4072for ac_file in $ac_files
4073do
4074 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004075 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004076 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4077 esac
4078done
4079rm -f $ac_rmfiles
4080
Matthias Kloseb9621712010-04-24 17:59:49 +00004081if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004082case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004089 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004092 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4093# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4094# in a Makefile. We should not override ac_cv_exeext if it was cached,
4095# so that the user can short-circuit this test for compilers unknown to
4096# Autoconf.
4097for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00004098do
4099 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004100 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004101 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004102 ;;
4103 [ab].out )
4104 # We found the default executable, but exeext='' is most
4105 # certainly right.
4106 break;;
4107 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00004108 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004109 then :; else
4110 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4111 fi
4112 # We set ac_cv_exeext here because the later test for it is not
4113 # safe: cross compilers may not add the suffix if given an `-o'
4114 # argument, so we may need to know it at that point already.
4115 # Even if this section looks crufty: it has the advantage of
4116 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004117 break;;
4118 * )
4119 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004120 esac
4121done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004122test "$ac_cv_exeext" = no && ac_cv_exeext=
4123
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004124else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 ac_file=''
4126fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004127if test -z "$ac_file"; then :
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4129$as_echo "no" >&6; }
4130$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004131sed 's/^/| /' conftest.$ac_ext >&5
4132
Matthias Kloseb9621712010-04-24 17:59:49 +00004133{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004135as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004136See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004137else
4138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4139$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4142$as_echo_n "checking for C compiler default output file name... " >&6; }
4143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4144$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004145ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004146
Matthias Kloseb9621712010-04-24 17:59:49 +00004147rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004148ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4150$as_echo_n "checking for suffix of executables... " >&6; }
4151if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004152case "(($ac_try" in
4153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4154 *) ac_try_echo=$ac_try;;
4155esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004156eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4157$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004158 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004159 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004160 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4161 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004162 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4163# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4164# work properly (i.e., refer to `conftest.exe'), while it won't with
4165# `rm'.
4166for ac_file in conftest.exe conftest conftest.*; do
4167 test -f "$ac_file" || continue
4168 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004169 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004170 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4171 break;;
4172 * ) break;;
4173 esac
4174done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175else
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004178as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004179See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004181rm -f conftest conftest$ac_cv_exeext
4182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4183$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004184
4185rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186EXEEXT=$ac_cv_exeext
4187ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004188cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4189/* end confdefs.h. */
4190#include <stdio.h>
4191int
4192main ()
4193{
4194FILE *f = fopen ("conftest.out", "w");
4195 return ferror (f) || fclose (f) != 0;
4196
4197 ;
4198 return 0;
4199}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201ac_clean_files="$ac_clean_files conftest.out"
4202# Check that the compiler produces executables we can run. If not, either
4203# the compiler is broken, or we cross compile.
4204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4205$as_echo_n "checking whether we are cross compiling... " >&6; }
4206if test "$cross_compiling" != yes; then
4207 { { ac_try="$ac_link"
4208case "(($ac_try" in
4209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4210 *) ac_try_echo=$ac_try;;
4211esac
4212eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4213$as_echo "$ac_try_echo"; } >&5
4214 (eval "$ac_link") 2>&5
4215 ac_status=$?
4216 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4217 test $ac_status = 0; }
4218 if { ac_try='./conftest$ac_cv_exeext'
4219 { { case "(($ac_try" in
4220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4221 *) ac_try_echo=$ac_try;;
4222esac
4223eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4224$as_echo "$ac_try_echo"; } >&5
4225 (eval "$ac_try") 2>&5
4226 ac_status=$?
4227 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4228 test $ac_status = 0; }; }; then
4229 cross_compiling=no
4230 else
4231 if test "$cross_compiling" = maybe; then
4232 cross_compiling=yes
4233 else
4234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004236as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004237If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004238See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004239 fi
4240 fi
4241fi
4242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4243$as_echo "$cross_compiling" >&6; }
4244
4245rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4246ac_clean_files=$ac_clean_files_save
4247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4248$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004249if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 $as_echo_n "(cached) " >&6
4251else
4252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004253/* end confdefs.h. */
4254
4255int
4256main ()
4257{
4258
4259 ;
4260 return 0;
4261}
4262_ACEOF
4263rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004264if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004265case "(($ac_try" in
4266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4267 *) ac_try_echo=$ac_try;;
4268esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004269eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4270$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004272 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004273 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4274 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275 for ac_file in conftest.o conftest.obj conftest.*; do
4276 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004277 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004278 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004279 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4280 break;;
4281 esac
4282done
4283else
Matthias Kloseb9621712010-04-24 17:59:49 +00004284 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004285sed 's/^/| /' conftest.$ac_ext >&5
4286
Matthias Kloseb9621712010-04-24 17:59:49 +00004287{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4288$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004289as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004290See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004291fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004292rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004293fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4295$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004296OBJEXT=$ac_cv_objext
4297ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4299$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004300if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004301 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004302else
Matthias Kloseb9621712010-04-24 17:59:49 +00004303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004305
Martin v. Löwis11437992002-04-12 09:54:03 +00004306int
4307main ()
4308{
4309#ifndef __GNUC__
4310 choke me
4311#endif
4312
4313 ;
4314 return 0;
4315}
4316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004317if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 ac_compiler_gnu=yes
4319else
Matthias Kloseb9621712010-04-24 17:59:49 +00004320 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004323ac_cv_c_compiler_gnu=$ac_compiler_gnu
4324
4325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4327$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4328if test $ac_compiler_gnu = yes; then
4329 GCC=yes
4330else
4331 GCC=
4332fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004333ac_test_CFLAGS=${CFLAGS+set}
4334ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4336$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004337if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004339else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 ac_save_c_werror_flag=$ac_c_werror_flag
4341 ac_c_werror_flag=yes
4342 ac_cv_prog_cc_g=no
4343 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004346
Martin v. Löwis11437992002-04-12 09:54:03 +00004347int
4348main ()
4349{
4350
4351 ;
4352 return 0;
4353}
4354_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004355if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004356 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357else
Matthias Kloseb9621712010-04-24 17:59:49 +00004358 CFLAGS=""
4359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004360/* end confdefs.h. */
4361
4362int
4363main ()
4364{
4365
4366 ;
4367 return 0;
4368}
4369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004370if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004371
Matthias Kloseb9621712010-04-24 17:59:49 +00004372else
4373 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004374 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004376/* end confdefs.h. */
4377
4378int
4379main ()
4380{
4381
4382 ;
4383 return 0;
4384}
4385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004386if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004387 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004390fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4394 ac_c_werror_flag=$ac_save_c_werror_flag
4395fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4397$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004398if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004399 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004400elif test $ac_cv_prog_cc_g = yes; then
4401 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004402 CFLAGS="-g -O2"
4403 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004404 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405 fi
4406else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004407 if test "$GCC" = yes; then
4408 CFLAGS="-O2"
4409 else
4410 CFLAGS=
4411 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004412fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4414$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004415if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004416 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004417else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004418 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004419ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004421/* end confdefs.h. */
4422#include <stdarg.h>
4423#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004424struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004425/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4426struct buf { int x; };
4427FILE * (*rcsopen) (struct buf *, struct stat *, int);
4428static char *e (p, i)
4429 char **p;
4430 int i;
4431{
4432 return p[i];
4433}
4434static char *f (char * (*g) (char **, int), char **p, ...)
4435{
4436 char *s;
4437 va_list v;
4438 va_start (v,p);
4439 s = g (p, va_arg (v,int));
4440 va_end (v);
4441 return s;
4442}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004443
4444/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4445 function prototypes and stuff, but not '\xHH' hex character constants.
4446 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004447 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004448 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4449 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004450 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004451int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004453/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4454 inside strings and character constants. */
4455#define FOO(x) 'x'
4456int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4457
Skip Montanaro6dead952003-09-25 14:50:04 +00004458int test (int i, double x);
4459struct s1 {int (*f) (int a);};
4460struct s2 {int (*f) (double a);};
4461int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4462int argc;
4463char **argv;
4464int
4465main ()
4466{
4467return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4468 ;
4469 return 0;
4470}
4471_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004472for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4473 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004474do
4475 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004476 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004477 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004479rm -f core conftest.err conftest.$ac_objext
4480 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004481done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004482rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004483CC=$ac_save_CC
4484
4485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004486# AC_CACHE_VAL
4487case "x$ac_cv_prog_cc_c89" in
4488 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4490$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004491 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4493$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004494 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004495 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4497$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004498esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004499if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004500
Matthias Kloseb9621712010-04-24 17:59:49 +00004501fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004502
Martin v. Löwis11437992002-04-12 09:54:03 +00004503ac_ext=c
4504ac_cpp='$CPP $CPPFLAGS'
4505ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4506ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4507ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004508
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004509ac_ext=c
4510ac_cpp='$CPP $CPPFLAGS'
4511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4513ac_compiler_gnu=$ac_cv_c_compiler_gnu
4514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4515$as_echo_n "checking how to run the C preprocessor... " >&6; }
4516# On Suns, sometimes $CPP names a directory.
4517if test -n "$CPP" && test -d "$CPP"; then
4518 CPP=
4519fi
4520if test -z "$CPP"; then
4521 if ${ac_cv_prog_CPP+:} false; then :
4522 $as_echo_n "(cached) " >&6
4523else
4524 # Double quotes because CPP needs to be expanded
4525 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4526 do
4527 ac_preproc_ok=false
4528for ac_c_preproc_warn_flag in '' yes
4529do
4530 # Use a header file that comes with gcc, so configuring glibc
4531 # with a fresh cross-compiler works.
4532 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4533 # <limits.h> exists even on freestanding compilers.
4534 # On the NeXT, cc -E runs the code through the compiler's parser,
4535 # not just through cpp. "Syntax error" is here to catch this case.
4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4537/* end confdefs.h. */
4538#ifdef __STDC__
4539# include <limits.h>
4540#else
4541# include <assert.h>
4542#endif
4543 Syntax error
4544_ACEOF
4545if ac_fn_c_try_cpp "$LINENO"; then :
4546
4547else
4548 # Broken: fails on valid input.
4549continue
4550fi
4551rm -f conftest.err conftest.i conftest.$ac_ext
4552
4553 # OK, works on sane cases. Now check whether nonexistent headers
4554 # can be detected and how.
4555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4556/* end confdefs.h. */
4557#include <ac_nonexistent.h>
4558_ACEOF
4559if ac_fn_c_try_cpp "$LINENO"; then :
4560 # Broken: success on invalid input.
4561continue
4562else
4563 # Passes both tests.
4564ac_preproc_ok=:
4565break
4566fi
4567rm -f conftest.err conftest.i conftest.$ac_ext
4568
4569done
4570# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4571rm -f conftest.i conftest.err conftest.$ac_ext
4572if $ac_preproc_ok; then :
4573 break
4574fi
4575
4576 done
4577 ac_cv_prog_CPP=$CPP
4578
4579fi
4580 CPP=$ac_cv_prog_CPP
4581else
4582 ac_cv_prog_CPP=$CPP
4583fi
4584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4585$as_echo "$CPP" >&6; }
4586ac_preproc_ok=false
4587for ac_c_preproc_warn_flag in '' yes
4588do
4589 # Use a header file that comes with gcc, so configuring glibc
4590 # with a fresh cross-compiler works.
4591 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4592 # <limits.h> exists even on freestanding compilers.
4593 # On the NeXT, cc -E runs the code through the compiler's parser,
4594 # not just through cpp. "Syntax error" is here to catch this case.
4595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4596/* end confdefs.h. */
4597#ifdef __STDC__
4598# include <limits.h>
4599#else
4600# include <assert.h>
4601#endif
4602 Syntax error
4603_ACEOF
4604if ac_fn_c_try_cpp "$LINENO"; then :
4605
4606else
4607 # Broken: fails on valid input.
4608continue
4609fi
4610rm -f conftest.err conftest.i conftest.$ac_ext
4611
4612 # OK, works on sane cases. Now check whether nonexistent headers
4613 # can be detected and how.
4614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4615/* end confdefs.h. */
4616#include <ac_nonexistent.h>
4617_ACEOF
4618if ac_fn_c_try_cpp "$LINENO"; then :
4619 # Broken: success on invalid input.
4620continue
4621else
4622 # Passes both tests.
4623ac_preproc_ok=:
4624break
4625fi
4626rm -f conftest.err conftest.i conftest.$ac_ext
4627
4628done
4629# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4630rm -f conftest.i conftest.err conftest.$ac_ext
4631if $ac_preproc_ok; then :
4632
4633else
4634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4636as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4637See \`config.log' for more details" "$LINENO" 5; }
4638fi
4639
4640ac_ext=c
4641ac_cpp='$CPP $CPPFLAGS'
4642ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4643ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4644ac_compiler_gnu=$ac_cv_c_compiler_gnu
4645
4646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4647$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4648if ${ac_cv_path_GREP+:} false; then :
4649 $as_echo_n "(cached) " >&6
4650else
4651 if test -z "$GREP"; then
4652 ac_path_GREP_found=false
4653 # Loop through the user's path and test for each of PROGNAME-LIST
4654 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4655for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4656do
4657 IFS=$as_save_IFS
4658 test -z "$as_dir" && as_dir=.
4659 for ac_prog in grep ggrep; do
4660 for ac_exec_ext in '' $ac_executable_extensions; do
4661 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4662 as_fn_executable_p "$ac_path_GREP" || continue
4663# Check for GNU ac_path_GREP and select it if it is found.
4664 # Check for GNU $ac_path_GREP
4665case `"$ac_path_GREP" --version 2>&1` in
4666*GNU*)
4667 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4668*)
4669 ac_count=0
4670 $as_echo_n 0123456789 >"conftest.in"
4671 while :
4672 do
4673 cat "conftest.in" "conftest.in" >"conftest.tmp"
4674 mv "conftest.tmp" "conftest.in"
4675 cp "conftest.in" "conftest.nl"
4676 $as_echo 'GREP' >> "conftest.nl"
4677 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4678 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4679 as_fn_arith $ac_count + 1 && ac_count=$as_val
4680 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4681 # Best one so far, save it but keep looking for a better one
4682 ac_cv_path_GREP="$ac_path_GREP"
4683 ac_path_GREP_max=$ac_count
4684 fi
4685 # 10*(2^10) chars as input seems more than enough
4686 test $ac_count -gt 10 && break
4687 done
4688 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4689esac
4690
4691 $ac_path_GREP_found && break 3
4692 done
4693 done
4694 done
4695IFS=$as_save_IFS
4696 if test -z "$ac_cv_path_GREP"; then
4697 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4698 fi
4699else
4700 ac_cv_path_GREP=$GREP
4701fi
4702
4703fi
4704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4705$as_echo "$ac_cv_path_GREP" >&6; }
4706 GREP="$ac_cv_path_GREP"
4707
4708
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004709
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004710
4711
Matthias Kloseb9621712010-04-24 17:59:49 +00004712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4713$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004715# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004716if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004717 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004718
4719 case $withval in
4720 no) with_cxx_main=no
4721 MAINCC='$(CC)';;
4722 yes) with_cxx_main=yes
4723 MAINCC='$(CXX)';;
4724 *) with_cxx_main=yes
4725 MAINCC=$withval
4726 if test -z "$CXX"
4727 then
4728 CXX=$withval
4729 fi;;
4730 esac
4731else
4732
4733 with_cxx_main=no
4734 MAINCC='$(CC)'
4735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004736fi
4737
Matthias Kloseb9621712010-04-24 17:59:49 +00004738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4739$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740
4741preset_cxx="$CXX"
4742if test -z "$CXX"
4743then
4744 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004745 gcc) if test -n "$ac_tool_prefix"; then
4746 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4747set dummy ${ac_tool_prefix}g++; ac_word=$2
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4749$as_echo_n "checking for $ac_word... " >&6; }
4750if ${ac_cv_path_CXX+:} false; then :
4751 $as_echo_n "(cached) " >&6
4752else
4753 case $CXX in
4754 [\\/]* | ?:[\\/]*)
4755 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4756 ;;
4757 *)
4758 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4759for as_dir in notfound
4760do
4761 IFS=$as_save_IFS
4762 test -z "$as_dir" && as_dir=.
4763 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004764 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004765 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4766 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4767 break 2
4768 fi
4769done
4770 done
4771IFS=$as_save_IFS
4772
4773 ;;
4774esac
4775fi
4776CXX=$ac_cv_path_CXX
4777if test -n "$CXX"; then
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4779$as_echo "$CXX" >&6; }
4780else
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4782$as_echo "no" >&6; }
4783fi
4784
4785
4786fi
4787if test -z "$ac_cv_path_CXX"; then
4788 ac_pt_CXX=$CXX
4789 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004790set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4792$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004793if ${ac_cv_path_ac_pt_CXX+:} false; then :
4794 $as_echo_n "(cached) " >&6
4795else
4796 case $ac_pt_CXX in
4797 [\\/]* | ?:[\\/]*)
4798 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4799 ;;
4800 *)
4801 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4802for as_dir in notfound
4803do
4804 IFS=$as_save_IFS
4805 test -z "$as_dir" && as_dir=.
4806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004808 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4810 break 2
4811 fi
4812done
4813 done
4814IFS=$as_save_IFS
4815
4816 ;;
4817esac
4818fi
4819ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4820if test -n "$ac_pt_CXX"; then
4821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4822$as_echo "$ac_pt_CXX" >&6; }
4823else
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4825$as_echo "no" >&6; }
4826fi
4827
4828 if test "x$ac_pt_CXX" = x; then
4829 CXX="g++"
4830 else
4831 case $cross_compiling:$ac_tool_warned in
4832yes:)
4833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4835ac_tool_warned=yes ;;
4836esac
4837 CXX=$ac_pt_CXX
4838 fi
4839else
4840 CXX="$ac_cv_path_CXX"
4841fi
4842 ;;
4843 cc) if test -n "$ac_tool_prefix"; then
4844 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4845set dummy ${ac_tool_prefix}c++; ac_word=$2
4846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4847$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004848if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004849 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004850else
4851 case $CXX in
4852 [\\/]* | ?:[\\/]*)
4853 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4854 ;;
4855 *)
4856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4857for as_dir in notfound
4858do
4859 IFS=$as_save_IFS
4860 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004861 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004863 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004865 break 2
4866 fi
4867done
Matthias Kloseb9621712010-04-24 17:59:49 +00004868 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004869IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004870
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004871 ;;
4872esac
4873fi
4874CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004875if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4877$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004878else
Matthias Kloseb9621712010-04-24 17:59:49 +00004879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4880$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004882
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004883
4884fi
4885if test -z "$ac_cv_path_CXX"; then
4886 ac_pt_CXX=$CXX
4887 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004888set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4890$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004891if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004892 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004893else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004894 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004895 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004896 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 +00004897 ;;
4898 *)
4899 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4900for as_dir in notfound
4901do
4902 IFS=$as_save_IFS
4903 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004904 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004905 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004906 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004907 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004908 break 2
4909 fi
4910done
Matthias Kloseb9621712010-04-24 17:59:49 +00004911 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004912IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004913
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004914 ;;
4915esac
4916fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004917ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4918if test -n "$ac_pt_CXX"; then
4919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4920$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004921else
Matthias Kloseb9621712010-04-24 17:59:49 +00004922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004925
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004926 if test "x$ac_pt_CXX" = x; then
4927 CXX="c++"
4928 else
4929 case $cross_compiling:$ac_tool_warned in
4930yes:)
4931{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4932$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4933ac_tool_warned=yes ;;
4934esac
4935 CXX=$ac_pt_CXX
4936 fi
4937else
4938 CXX="$ac_cv_path_CXX"
4939fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004940 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004941 clang|*/clang) if test -n "$ac_tool_prefix"; then
4942 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4943set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4945$as_echo_n "checking for $ac_word... " >&6; }
4946if ${ac_cv_path_CXX+:} false; then :
4947 $as_echo_n "(cached) " >&6
4948else
4949 case $CXX in
4950 [\\/]* | ?:[\\/]*)
4951 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4952 ;;
4953 *)
4954 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4955for as_dir in notfound
4956do
4957 IFS=$as_save_IFS
4958 test -z "$as_dir" && as_dir=.
4959 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004960 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004961 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4962 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4963 break 2
4964 fi
4965done
4966 done
4967IFS=$as_save_IFS
4968
Ned Deilycbfb9a52012-06-23 16:02:19 -07004969 ;;
4970esac
4971fi
4972CXX=$ac_cv_path_CXX
4973if test -n "$CXX"; then
4974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4975$as_echo "$CXX" >&6; }
4976else
4977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4978$as_echo "no" >&6; }
4979fi
4980
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004981
4982fi
4983if test -z "$ac_cv_path_CXX"; then
4984 ac_pt_CXX=$CXX
4985 # Extract the first word of "clang++", so it can be a program name with args.
4986set dummy clang++; ac_word=$2
4987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4988$as_echo_n "checking for $ac_word... " >&6; }
4989if ${ac_cv_path_ac_pt_CXX+:} false; then :
4990 $as_echo_n "(cached) " >&6
4991else
4992 case $ac_pt_CXX in
4993 [\\/]* | ?:[\\/]*)
4994 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4995 ;;
4996 *)
4997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4998for as_dir in notfound
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
5002 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005003 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005004 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5005 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5006 break 2
5007 fi
5008done
5009 done
5010IFS=$as_save_IFS
5011
5012 ;;
5013esac
5014fi
5015ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5016if test -n "$ac_pt_CXX"; then
5017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5018$as_echo "$ac_pt_CXX" >&6; }
5019else
5020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5021$as_echo "no" >&6; }
5022fi
5023
5024 if test "x$ac_pt_CXX" = x; then
5025 CXX="clang++"
5026 else
5027 case $cross_compiling:$ac_tool_warned in
5028yes:)
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5031ac_tool_warned=yes ;;
5032esac
5033 CXX=$ac_pt_CXX
5034 fi
5035else
5036 CXX="$ac_cv_path_CXX"
5037fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07005038 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06005039 icc|*/icc) if test -n "$ac_tool_prefix"; then
5040 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
5041set dummy ${ac_tool_prefix}icpc; ac_word=$2
5042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5043$as_echo_n "checking for $ac_word... " >&6; }
5044if ${ac_cv_path_CXX+:} false; then :
5045 $as_echo_n "(cached) " >&6
5046else
5047 case $CXX in
5048 [\\/]* | ?:[\\/]*)
5049 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5050 ;;
5051 *)
5052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5053for as_dir in notfound
5054do
5055 IFS=$as_save_IFS
5056 test -z "$as_dir" && as_dir=.
5057 for ac_exec_ext in '' $ac_executable_extensions; do
5058 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5059 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5060 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5061 break 2
5062 fi
5063done
5064 done
5065IFS=$as_save_IFS
5066
5067 ;;
5068esac
5069fi
5070CXX=$ac_cv_path_CXX
5071if test -n "$CXX"; then
5072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5073$as_echo "$CXX" >&6; }
5074else
5075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5076$as_echo "no" >&6; }
5077fi
5078
5079
5080fi
5081if test -z "$ac_cv_path_CXX"; then
5082 ac_pt_CXX=$CXX
5083 # Extract the first word of "icpc", so it can be a program name with args.
5084set dummy icpc; ac_word=$2
5085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5086$as_echo_n "checking for $ac_word... " >&6; }
5087if ${ac_cv_path_ac_pt_CXX+:} false; then :
5088 $as_echo_n "(cached) " >&6
5089else
5090 case $ac_pt_CXX in
5091 [\\/]* | ?:[\\/]*)
5092 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5093 ;;
5094 *)
5095 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5096for as_dir in notfound
5097do
5098 IFS=$as_save_IFS
5099 test -z "$as_dir" && as_dir=.
5100 for ac_exec_ext in '' $ac_executable_extensions; do
5101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5102 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5104 break 2
5105 fi
5106done
5107 done
5108IFS=$as_save_IFS
5109
5110 ;;
5111esac
5112fi
5113ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5114if test -n "$ac_pt_CXX"; then
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5116$as_echo "$ac_pt_CXX" >&6; }
5117else
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5119$as_echo "no" >&6; }
5120fi
5121
5122 if test "x$ac_pt_CXX" = x; then
5123 CXX="icpc"
5124 else
5125 case $cross_compiling:$ac_tool_warned in
5126yes:)
5127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5129ac_tool_warned=yes ;;
5130esac
5131 CXX=$ac_pt_CXX
5132 fi
5133else
5134 CXX="$ac_cv_path_CXX"
5135fi
5136 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005137 esac
5138 if test "$CXX" = "notfound"
5139 then
5140 CXX=""
5141 fi
5142fi
5143if test -z "$CXX"
5144then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005145 if test -n "$ac_tool_prefix"; then
5146 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5147 do
5148 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5149set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5151$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005152if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005153 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005154else
5155 if test -n "$CXX"; then
5156 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5157else
5158as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5159for as_dir in $PATH
5160do
5161 IFS=$as_save_IFS
5162 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005163 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005164 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005165 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005166 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005167 break 2
5168 fi
5169done
Matthias Kloseb9621712010-04-24 17:59:49 +00005170 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005171IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005172
5173fi
5174fi
5175CXX=$ac_cv_prog_CXX
5176if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5178$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005179else
Matthias Kloseb9621712010-04-24 17:59:49 +00005180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5181$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005182fi
5183
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005184
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005185 test -n "$CXX" && break
5186 done
5187fi
5188if test -z "$CXX"; then
5189 ac_ct_CXX=$CXX
5190 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5191do
5192 # Extract the first word of "$ac_prog", so it can be a program name with args.
5193set dummy $ac_prog; ac_word=$2
5194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5195$as_echo_n "checking for $ac_word... " >&6; }
5196if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5197 $as_echo_n "(cached) " >&6
5198else
5199 if test -n "$ac_ct_CXX"; then
5200 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5201else
5202as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5203for as_dir in $PATH
5204do
5205 IFS=$as_save_IFS
5206 test -z "$as_dir" && as_dir=.
5207 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005208 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005209 ac_cv_prog_ac_ct_CXX="$ac_prog"
5210 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5211 break 2
5212 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005213done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005214 done
5215IFS=$as_save_IFS
5216
5217fi
5218fi
5219ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5220if test -n "$ac_ct_CXX"; then
5221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5222$as_echo "$ac_ct_CXX" >&6; }
5223else
5224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5225$as_echo "no" >&6; }
5226fi
5227
5228
5229 test -n "$ac_ct_CXX" && break
5230done
5231
5232 if test "x$ac_ct_CXX" = x; then
5233 CXX="notfound"
5234 else
5235 case $cross_compiling:$ac_tool_warned in
5236yes:)
5237{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5238$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5239ac_tool_warned=yes ;;
5240esac
5241 CXX=$ac_ct_CXX
5242 fi
5243fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005244
5245 if test "$CXX" = "notfound"
5246 then
5247 CXX=""
5248 fi
5249fi
5250if test "$preset_cxx" != "$CXX"
5251then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005252 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005253
5254 By default, distutils will build C++ extension modules with \"$CXX\".
5255 If this is not intended, then set CXX on the configure command line.
5256 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005257$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005258
5259 By default, distutils will build C++ extension modules with \"$CXX\".
5260 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005261 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005262fi
5263
5264
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005265MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5266
5267
5268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5269$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5270cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005271#undef bfin
5272#undef cris
5273#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005274#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005275#undef hppa
5276#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005277#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005278#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005279#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005280#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005281#undef unix
5282#if defined(__linux__)
5283# if defined(__x86_64__) && defined(__LP64__)
5284 x86_64-linux-gnu
5285# elif defined(__x86_64__) && defined(__ILP32__)
5286 x86_64-linux-gnux32
5287# elif defined(__i386__)
5288 i386-linux-gnu
5289# elif defined(__aarch64__) && defined(__AARCH64EL__)
5290# if defined(__ILP32__)
5291 aarch64_ilp32-linux-gnu
5292# else
5293 aarch64-linux-gnu
5294# endif
5295# elif defined(__aarch64__) && defined(__AARCH64EB__)
5296# if defined(__ILP32__)
5297 aarch64_be_ilp32-linux-gnu
5298# else
5299 aarch64_be-linux-gnu
5300# endif
5301# elif defined(__alpha__)
5302 alpha-linux-gnu
5303# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5304# if defined(__ARMEL__)
5305 arm-linux-gnueabihf
5306# else
5307 armeb-linux-gnueabihf
5308# endif
5309# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5310# if defined(__ARMEL__)
5311 arm-linux-gnueabi
5312# else
5313 armeb-linux-gnueabi
5314# endif
5315# elif defined(__hppa__)
5316 hppa-linux-gnu
5317# elif defined(__ia64__)
5318 ia64-linux-gnu
5319# elif defined(__m68k__) && !defined(__mcoldfire__)
5320 m68k-linux-gnu
5321# elif defined(__mips_hard_float) && defined(_MIPSEL)
5322# if _MIPS_SIM == _ABIO32
5323 mipsel-linux-gnu
5324# elif _MIPS_SIM == _ABIN32
5325 mips64el-linux-gnuabin32
5326# elif _MIPS_SIM == _ABI64
5327 mips64el-linux-gnuabi64
5328# else
5329# error unknown platform triplet
5330# endif
5331# elif defined(__mips_hard_float)
5332# if _MIPS_SIM == _ABIO32
5333 mips-linux-gnu
5334# elif _MIPS_SIM == _ABIN32
5335 mips64-linux-gnuabin32
5336# elif _MIPS_SIM == _ABI64
5337 mips64-linux-gnuabi64
5338# else
5339# error unknown platform triplet
5340# endif
5341# elif defined(__or1k__)
5342 or1k-linux-gnu
5343# elif defined(__powerpc__) && defined(__SPE__)
5344 powerpc-linux-gnuspe
5345# elif defined(__powerpc64__)
5346# if defined(__LITTLE_ENDIAN__)
5347 powerpc64le-linux-gnu
5348# else
5349 powerpc64-linux-gnu
5350# endif
5351# elif defined(__powerpc__)
5352 powerpc-linux-gnu
5353# elif defined(__s390x__)
5354 s390x-linux-gnu
5355# elif defined(__s390__)
5356 s390-linux-gnu
5357# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5358 sh4-linux-gnu
5359# elif defined(__sparc__) && defined(__arch64__)
5360 sparc64-linux-gnu
5361# elif defined(__sparc__)
5362 sparc-linux-gnu
5363# else
5364# error unknown platform triplet
5365# endif
5366#elif defined(__FreeBSD_kernel__)
5367# if defined(__LP64__)
5368 x86_64-kfreebsd-gnu
5369# elif defined(__i386__)
5370 i386-kfreebsd-gnu
5371# else
5372# error unknown platform triplet
5373# endif
5374#elif defined(__gnu_hurd__)
5375 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005376#elif defined(__APPLE__)
5377 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005378#else
5379# error unknown platform triplet
5380#endif
5381
5382EOF
5383
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005384if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005385 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5387$as_echo "$PLATFORM_TRIPLET" >&6; }
5388else
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5390$as_echo "none" >&6; }
5391fi
5392rm -f conftest.c conftest.out
5393
5394if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5395 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5396 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5397 fi
5398fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005399if test x$PLATFORM_TRIPLET = x; then
5400 PLATDIR=plat-$MACHDEP
5401else
5402 PLATDIR=plat-$PLATFORM_TRIPLET
5403fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005404
5405
doko@ubuntu.com55532312016-06-14 08:55:19 +02005406if test x$MULTIARCH != x; then
5407 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5408fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005409
5410
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5412$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5413save_LDFLAGS="$LDFLAGS"
5414LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005415
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005416cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5417/* end confdefs.h. */
5418
5419int
5420main ()
5421{
5422
5423 ;
5424 return 0;
5425}
5426_ACEOF
5427if ac_fn_c_try_link "$LINENO"; then :
5428 NO_AS_NEEDED="-Wl,--no-as-needed"
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5430$as_echo "yes" >&6; }
5431else
5432 NO_AS_NEEDED=""
5433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5434$as_echo "no" >&6; }
5435fi
5436rm -f core conftest.err conftest.$ac_objext \
5437 conftest$ac_exeext conftest.$ac_ext
5438LDFLAGS="$save_LDFLAGS"
5439
5440
5441
5442# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005443
Matthias Kloseb9621712010-04-24 17:59:49 +00005444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5445$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005446if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005448else
5449 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5450 then ac_cv_path_EGREP="$GREP -E"
5451 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005452 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005453 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005454 # Loop through the user's path and test for each of PROGNAME-LIST
5455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005456for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5457do
5458 IFS=$as_save_IFS
5459 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005460 for ac_prog in egrep; do
5461 for ac_exec_ext in '' $ac_executable_extensions; do
5462 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005463 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005464# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005465 # Check for GNU $ac_path_EGREP
5466case `"$ac_path_EGREP" --version 2>&1` in
5467*GNU*)
5468 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5469*)
5470 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005471 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005472 while :
5473 do
5474 cat "conftest.in" "conftest.in" >"conftest.tmp"
5475 mv "conftest.tmp" "conftest.in"
5476 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005477 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005478 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5479 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005480 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005481 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5482 # Best one so far, save it but keep looking for a better one
5483 ac_cv_path_EGREP="$ac_path_EGREP"
5484 ac_path_EGREP_max=$ac_count
5485 fi
5486 # 10*(2^10) chars as input seems more than enough
5487 test $ac_count -gt 10 && break
5488 done
5489 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5490esac
5491
Matthias Kloseb9621712010-04-24 17:59:49 +00005492 $ac_path_EGREP_found && break 3
5493 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005494 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005495 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005496IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005498 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 +00005499 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005500else
5501 ac_cv_path_EGREP=$EGREP
5502fi
5503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005504 fi
5505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5507$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005508 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005509
5510
Matthias Kloseb9621712010-04-24 17:59:49 +00005511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5512$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005513if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005514 $as_echo_n "(cached) " >&6
5515else
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005517/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005518#include <stdlib.h>
5519#include <stdarg.h>
5520#include <string.h>
5521#include <float.h>
5522
5523int
5524main ()
5525{
5526
5527 ;
5528 return 0;
5529}
5530_ACEOF
5531if ac_fn_c_try_compile "$LINENO"; then :
5532 ac_cv_header_stdc=yes
5533else
5534 ac_cv_header_stdc=no
5535fi
5536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5537
5538if test $ac_cv_header_stdc = yes; then
5539 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5541/* end confdefs.h. */
5542#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005543
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005544_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005546 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005548else
Matthias Kloseb9621712010-04-24 17:59:49 +00005549 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005550fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005551rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552
Matthias Kloseb9621712010-04-24 17:59:49 +00005553fi
5554
5555if test $ac_cv_header_stdc = yes; then
5556 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5558/* end confdefs.h. */
5559#include <stdlib.h>
5560
5561_ACEOF
5562if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5563 $EGREP "free" >/dev/null 2>&1; then :
5564
5565else
5566 ac_cv_header_stdc=no
5567fi
5568rm -f conftest*
5569
5570fi
5571
5572if test $ac_cv_header_stdc = yes; then
5573 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5574 if test "$cross_compiling" = yes; then :
5575 :
5576else
5577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5578/* end confdefs.h. */
5579#include <ctype.h>
5580#include <stdlib.h>
5581#if ((' ' & 0x0FF) == 0x020)
5582# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5583# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5584#else
5585# define ISLOWER(c) \
5586 (('a' <= (c) && (c) <= 'i') \
5587 || ('j' <= (c) && (c) <= 'r') \
5588 || ('s' <= (c) && (c) <= 'z'))
5589# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5590#endif
5591
5592#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5593int
5594main ()
5595{
5596 int i;
5597 for (i = 0; i < 256; i++)
5598 if (XOR (islower (i), ISLOWER (i))
5599 || toupper (i) != TOUPPER (i))
5600 return 2;
5601 return 0;
5602}
5603_ACEOF
5604if ac_fn_c_try_run "$LINENO"; then :
5605
5606else
5607 ac_cv_header_stdc=no
5608fi
5609rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5610 conftest.$ac_objext conftest.beam conftest.$ac_ext
5611fi
5612
5613fi
5614fi
5615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5616$as_echo "$ac_cv_header_stdc" >&6; }
5617if test $ac_cv_header_stdc = yes; then
5618
5619$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5620
5621fi
5622
5623# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5624for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5625 inttypes.h stdint.h unistd.h
5626do :
5627 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5628ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5629"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005630if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005631 cat >>confdefs.h <<_ACEOF
5632#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5633_ACEOF
5634
5635fi
5636
5637done
5638
5639
5640
5641 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 +02005642if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005643 MINIX=yes
5644else
5645 MINIX=
5646fi
5647
5648
5649 if test "$MINIX" = yes; then
5650
5651$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5652
5653
5654$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5655
5656
5657$as_echo "#define _MINIX 1" >>confdefs.h
5658
5659 fi
5660
5661
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5663$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005664if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 $as_echo_n "(cached) " >&6
5666else
5667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5668/* end confdefs.h. */
5669
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005670# define __EXTENSIONS__ 1
5671 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005672int
5673main ()
5674{
5675
5676 ;
5677 return 0;
5678}
5679_ACEOF
5680if ac_fn_c_try_compile "$LINENO"; then :
5681 ac_cv_safe_to_define___extensions__=yes
5682else
5683 ac_cv_safe_to_define___extensions__=no
5684fi
5685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5686fi
5687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5688$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5689 test $ac_cv_safe_to_define___extensions__ = yes &&
5690 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5691
5692 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5693
5694 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5695
5696 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5697
5698 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5699
5700
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
Xavier de Gaye95750b12016-07-09 11:05:42 +02005702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5703$as_echo_n "checking for the Android API level... " >&6; }
5704cat >> conftest.c <<EOF
5705#ifdef __ANDROID__
5706#include <android/api-level.h>
5707__ANDROID_API__
5708#else
5709#error not Android
5710#endif
5711EOF
5712
5713if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5714 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5716$as_echo "$ANDROID_API_LEVEL" >&6; }
5717
5718cat >>confdefs.h <<_ACEOF
5719#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5720_ACEOF
5721
5722else
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5724$as_echo "not Android" >&6; }
5725fi
5726rm -f conftest.c conftest.out
5727
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728# Check for unsupported systems
5729case $ac_sys_system/$ac_sys_release in
5730atheos*|Linux*/1*)
5731 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5732 echo See README for details.
5733 exit 1;;
5734esac
5735
5736
Matthias Kloseb9621712010-04-24 17:59:49 +00005737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5738$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739
5740# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005741if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005742 withval=$with_suffix;
5743 case $withval in
5744 no) EXEEXT=;;
5745 yes) EXEEXT=.exe;;
5746 *) EXEEXT=$withval;;
5747 esac
5748fi
5749
Matthias Kloseb9621712010-04-24 17:59:49 +00005750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5751$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005752
5753# Test whether we're running on a non-case-sensitive system, in which
5754# case we give a warning if no ext is given
5755
Matthias Kloseb9621712010-04-24 17:59:49 +00005756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5757$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005758if test ! -d CaseSensitiveTestDir; then
5759mkdir CaseSensitiveTestDir
5760fi
5761
5762if test -d casesensitivetestdir
5763then
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5765$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 BUILDEXEEXT=.exe
5767else
Matthias Kloseb9621712010-04-24 17:59:49 +00005768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5769$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770 BUILDEXEEXT=$EXEEXT
5771fi
5772rmdir CaseSensitiveTestDir
5773
5774case $MACHDEP in
5775bsdos*)
5776 case $CC in
5777 gcc) CC="$CC -D_HAVE_BSDI";;
5778 esac;;
5779esac
5780
5781case $ac_sys_system in
5782hp*|HP*)
5783 case $CC in
5784 cc|*/cc) CC="$CC -Ae";;
5785 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786esac
5787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005788
Matthias Kloseb9621712010-04-24 17:59:49 +00005789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5790$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791if test -z "$LIBRARY"
5792then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005793 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5796$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005797
5798# LDLIBRARY is the name of the library to link against (as opposed to the
5799# name of the library into which to insert object files). BLDLIBRARY is also
5800# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5801# is blank as the main program is not linked directly against LDLIBRARY.
5802# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5803# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5804# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5805# DLLLIBRARY is the shared (i.e., DLL) library.
5806#
5807# RUNSHARED is used to run shared python without installed libraries
5808#
5809# INSTSONAME is the name of the shared library that will be use to install
5810# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005811#
5812# LDVERSION is the shared library version number, normally the Python version
5813# with the ABI build flags appended.
5814
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005815
5816
5817
5818
5819
5820
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005821
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005822LDLIBRARY="$LIBRARY"
5823BLDLIBRARY='$(LDLIBRARY)'
5824INSTSONAME='$(LDLIBRARY)'
5825DLLLIBRARY=''
5826LDLIBRARYDIR=''
5827RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005828LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829
5830# LINKCC is the command that links the python executable -- default is $(CC).
5831# If CXX is set, and if it is needed to link a main function that was
5832# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5833# python might then depend on the C++ runtime
5834# This is altered for AIX in order to build the export list before
5835# linking.
5836
Matthias Kloseb9621712010-04-24 17:59:49 +00005837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5838$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005839if test -z "$LINKCC"
5840then
5841 LINKCC='$(PURIFY) $(MAINCC)'
5842 case $ac_sys_system in
5843 AIX*)
5844 exp_extra="\"\""
5845 if test $ac_sys_release -ge 5 -o \
5846 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5847 exp_extra="."
5848 fi
5849 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850 QNX*)
5851 # qcc must be used because the other compilers do not
5852 # support -N.
5853 LINKCC=qcc;;
5854 esac
5855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5857$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858
5859# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5860# make sure we default having it set to "no": this is used by
5861# distutils.unixccompiler to know if it should add --enable-new-dtags
5862# to linker command lines, and failing to detect GNU ld simply results
5863# in the same bahaviour as before.
5864
Matthias Kloseb9621712010-04-24 17:59:49 +00005865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5866$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867ac_prog=ld
5868if test "$GCC" = yes; then
5869 ac_prog=`$CC -print-prog-name=ld`
5870fi
5871case `"$ac_prog" -V 2>&1 < /dev/null` in
5872 *GNU*)
5873 GNULD=yes;;
5874 *)
5875 GNULD=no;;
5876esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5878$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005879
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5881$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005882if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005883 $as_echo_n "(cached) " >&6
5884else
5885 ac_cv_c_inline=no
5886for ac_kw in inline __inline__ __inline; do
5887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5888/* end confdefs.h. */
5889#ifndef __cplusplus
5890typedef int foo_t;
5891static $ac_kw foo_t static_foo () {return 0; }
5892$ac_kw foo_t foo () {return 0; }
5893#endif
5894
5895_ACEOF
5896if ac_fn_c_try_compile "$LINENO"; then :
5897 ac_cv_c_inline=$ac_kw
5898fi
5899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5900 test "$ac_cv_c_inline" != no && break
5901done
5902
5903fi
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5905$as_echo "$ac_cv_c_inline" >&6; }
5906
5907case $ac_cv_c_inline in
5908 inline | yes) ;;
5909 *)
5910 case $ac_cv_c_inline in
5911 no) ac_val=;;
5912 *) ac_val=$ac_cv_c_inline;;
5913 esac
5914 cat >>confdefs.h <<_ACEOF
5915#ifndef __cplusplus
5916#define inline $ac_val
5917#endif
5918_ACEOF
5919 ;;
5920esac
5921
5922if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005923
5924$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005925
5926
5927fi
5928
5929
Matthias Kloseb9621712010-04-24 17:59:49 +00005930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5931$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005933if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005934 enableval=$enable_shared;
5935fi
5936
5937
5938if test -z "$enable_shared"
5939then
5940 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005941 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942 enable_shared="yes";;
5943 *)
5944 enable_shared="no";;
5945 esac
5946fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5948$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949
Matthias Kloseb9621712010-04-24 17:59:49 +00005950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5951$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005952# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005953if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005954 enableval=$enable_profiling;
5955fi
5956
5957if test "x$enable_profiling" = xyes; then
5958 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005959 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961/* end confdefs.h. */
5962int main() { return 0; }
5963_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005964if ac_fn_c_try_link "$LINENO"; then :
5965
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005966else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005967 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005969rm -f core conftest.err conftest.$ac_objext \
5970 conftest$ac_exeext conftest.$ac_ext
5971 CC="$ac_save_cc"
5972else
5973 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005974fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5976$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005977
doko@ubuntu.comba015832012-06-30 16:52:05 +02005978if test "x$enable_profiling" = xyes; then
5979 BASECFLAGS="-pg $BASECFLAGS"
5980 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981fi
5982
Matthias Kloseb9621712010-04-24 17:59:49 +00005983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5984$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985
5986# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5987# library that we build, but we do not want to link against it (we
5988# will find it with a -framework option). For this reason there is an
5989# extra variable BLDLIBRARY against which Python and the extension
5990# modules are linked, BLDLIBRARY. This is normally the same as
5991# LDLIBRARY, but empty for MacOSX framework builds.
5992if test "$enable_framework"
5993then
5994 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005995 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996 BLDLIBRARY=''
5997else
5998 BLDLIBRARY='$(LDLIBRARY)'
5999fi
6000
6001# Other platforms follow
6002if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01006003 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004
Matthias Kloseb9621712010-04-24 17:59:49 +00006005$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006006
6007 case $ac_sys_system in
6008 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006009 LDLIBRARY='libpython$(LDVERSION).dll.a'
6010 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006011 ;;
6012 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006013 LDLIBRARY='libpython$(LDVERSION).so'
6014 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006015 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006017 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006018 then
6019 PY3LIBRARY=libpython3.so
6020 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02006022 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006023 LDLIBRARY='libpython$(LDVERSION).so'
6024 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006025 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006026 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00006027 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00006028 then
6029 PY3LIBRARY=libpython3.so
6030 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031 ;;
6032 hp*|HP*)
6033 case `uname -m` in
6034 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006035 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036 ;;
6037 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006038 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039 ;;
6040 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006041 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006042 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006043 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006045 LDLIBRARY='libpython$(LDVERSION).dylib'
6046 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006047 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006049 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006050 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02006051 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00006052 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006053
6054 esac
6055else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01006056 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057 case $ac_sys_system in
6058 CYGWIN*)
6059 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006060 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006061 ;;
6062 esac
6063fi
6064
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02006065if test "$cross_compiling" = yes; then
6066 RUNSHARED=
6067fi
6068
Matthias Kloseb9621712010-04-24 17:59:49 +00006069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
6070$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006071
6072if test -n "$ac_tool_prefix"; then
6073 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6074set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6076$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006077if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006078 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079else
6080 if test -n "$RANLIB"; then
6081 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6082else
6083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6084for as_dir in $PATH
6085do
6086 IFS=$as_save_IFS
6087 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006088 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006089 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092 break 2
6093 fi
6094done
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006096IFS=$as_save_IFS
6097
6098fi
6099fi
6100RANLIB=$ac_cv_prog_RANLIB
6101if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6103$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104else
Matthias Kloseb9621712010-04-24 17:59:49 +00006105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6106$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006107fi
6108
6109
6110fi
6111if test -z "$ac_cv_prog_RANLIB"; then
6112 ac_ct_RANLIB=$RANLIB
6113 # Extract the first word of "ranlib", so it can be a program name with args.
6114set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6116$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006117if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006118 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006119else
6120 if test -n "$ac_ct_RANLIB"; then
6121 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006128 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132 break 2
6133 fi
6134done
Matthias Kloseb9621712010-04-24 17:59:49 +00006135 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006136IFS=$as_save_IFS
6137
6138fi
6139fi
6140ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6141if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6143$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006144else
Matthias Kloseb9621712010-04-24 17:59:49 +00006145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6146$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006147fi
6148
6149 if test "x$ac_ct_RANLIB" = x; then
6150 RANLIB=":"
6151 else
6152 case $cross_compiling:$ac_tool_warned in
6153yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006154{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6155$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006156ac_tool_warned=yes ;;
6157esac
6158 RANLIB=$ac_ct_RANLIB
6159 fi
6160else
6161 RANLIB="$ac_cv_prog_RANLIB"
6162fi
6163
6164
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006165if test -n "$ac_tool_prefix"; then
6166 for ac_prog in ar aal
6167 do
6168 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6169set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6171$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006172if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006173 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174else
6175 if test -n "$AR"; then
6176 ac_cv_prog_AR="$AR" # Let the user override the test.
6177else
6178as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6179for as_dir in $PATH
6180do
6181 IFS=$as_save_IFS
6182 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006183 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006184 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006185 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187 break 2
6188 fi
6189done
Matthias Kloseb9621712010-04-24 17:59:49 +00006190 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191IFS=$as_save_IFS
6192
6193fi
6194fi
6195AR=$ac_cv_prog_AR
6196if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6198$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199else
Matthias Kloseb9621712010-04-24 17:59:49 +00006200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6201$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006202fi
6203
6204
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006205 test -n "$AR" && break
6206 done
6207fi
6208if test -z "$AR"; then
6209 ac_ct_AR=$AR
6210 for ac_prog in ar aal
6211do
6212 # Extract the first word of "$ac_prog", so it can be a program name with args.
6213set dummy $ac_prog; ac_word=$2
6214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6215$as_echo_n "checking for $ac_word... " >&6; }
6216if ${ac_cv_prog_ac_ct_AR+:} false; then :
6217 $as_echo_n "(cached) " >&6
6218else
6219 if test -n "$ac_ct_AR"; then
6220 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6221else
6222as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6223for as_dir in $PATH
6224do
6225 IFS=$as_save_IFS
6226 test -z "$as_dir" && as_dir=.
6227 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006229 ac_cv_prog_ac_ct_AR="$ac_prog"
6230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6231 break 2
6232 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006233done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006234 done
6235IFS=$as_save_IFS
6236
6237fi
6238fi
6239ac_ct_AR=$ac_cv_prog_ac_ct_AR
6240if test -n "$ac_ct_AR"; then
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6242$as_echo "$ac_ct_AR" >&6; }
6243else
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6245$as_echo "no" >&6; }
6246fi
6247
6248
6249 test -n "$ac_ct_AR" && break
6250done
6251
6252 if test "x$ac_ct_AR" = x; then
6253 AR="ar"
6254 else
6255 case $cross_compiling:$ac_tool_warned in
6256yes:)
6257{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6258$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6259ac_tool_warned=yes ;;
6260esac
6261 AR=$ac_ct_AR
6262 fi
6263fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264
6265
6266# tweak ARFLAGS only if the user didn't set it on the command line
6267
6268if test -z "$ARFLAGS"
6269then
6270 ARFLAGS="rc"
6271fi
6272
doko@ubuntu.com58844492012-06-30 18:25:32 +02006273if test -n "$ac_tool_prefix"; then
6274 for ac_prog in readelf
6275 do
6276 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6277set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6279$as_echo_n "checking for $ac_word... " >&6; }
6280if ${ac_cv_prog_READELF+:} false; then :
6281 $as_echo_n "(cached) " >&6
6282else
6283 if test -n "$READELF"; then
6284 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6285else
6286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6287for as_dir in $PATH
6288do
6289 IFS=$as_save_IFS
6290 test -z "$as_dir" && as_dir=.
6291 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006292 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006293 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6294 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6295 break 2
6296 fi
6297done
6298 done
6299IFS=$as_save_IFS
6300
6301fi
6302fi
6303READELF=$ac_cv_prog_READELF
6304if test -n "$READELF"; then
6305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6306$as_echo "$READELF" >&6; }
6307else
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6309$as_echo "no" >&6; }
6310fi
6311
6312
6313 test -n "$READELF" && break
6314 done
6315fi
6316if test -z "$READELF"; then
6317 ac_ct_READELF=$READELF
6318 for ac_prog in readelf
6319do
6320 # Extract the first word of "$ac_prog", so it can be a program name with args.
6321set dummy $ac_prog; ac_word=$2
6322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6323$as_echo_n "checking for $ac_word... " >&6; }
6324if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6325 $as_echo_n "(cached) " >&6
6326else
6327 if test -n "$ac_ct_READELF"; then
6328 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6329else
6330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6331for as_dir in $PATH
6332do
6333 IFS=$as_save_IFS
6334 test -z "$as_dir" && as_dir=.
6335 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006336 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006337 ac_cv_prog_ac_ct_READELF="$ac_prog"
6338 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6339 break 2
6340 fi
6341done
6342 done
6343IFS=$as_save_IFS
6344
6345fi
6346fi
6347ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6348if test -n "$ac_ct_READELF"; then
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6350$as_echo "$ac_ct_READELF" >&6; }
6351else
6352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6353$as_echo "no" >&6; }
6354fi
6355
6356
6357 test -n "$ac_ct_READELF" && break
6358done
6359
6360 if test "x$ac_ct_READELF" = x; then
6361 READELF=":"
6362 else
6363 case $cross_compiling:$ac_tool_warned in
6364yes:)
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6366$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6367ac_tool_warned=yes ;;
6368esac
6369 READELF=$ac_ct_READELF
6370 fi
6371fi
6372
6373if test "$cross_compiling" = yes; then
6374 case "$READELF" in
6375 readelf|:)
6376 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6377 ;;
6378 esac
6379fi
6380
6381
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006382
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006383case $MACHDEP in
6384bsdos*|hp*|HP*)
6385 # install -d does not work on BSDI or HP-UX
6386 if test -z "$INSTALL"
6387 then
6388 INSTALL="${srcdir}/install-sh -c"
6389 fi
6390esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006391# Find a good install program. We prefer a C program (faster),
6392# so one script is as good as another. But avoid the broken or
6393# incompatible versions:
6394# SysV /etc/install, /usr/sbin/install
6395# SunOS /usr/etc/install
6396# IRIX /sbin/install
6397# AIX /bin/install
6398# AmigaOS /C/install, which installs bootblocks on floppy discs
6399# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6400# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6401# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6402# OS/2's system install, which has a completely different semantic
6403# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006404# Reject install programs that cannot install multiple files.
6405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6406$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006407if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006408if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006409 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006410else
6411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6412for as_dir in $PATH
6413do
6414 IFS=$as_save_IFS
6415 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006416 # Account for people who put trailing slashes in PATH elements.
6417case $as_dir/ in #((
6418 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006419 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006420 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421 /usr/ucb/* ) ;;
6422 *)
6423 # OSF1 and SCO ODT 3.0 have their own names for install.
6424 # Don't use installbsd from OSF since it installs stuff as root
6425 # by default.
6426 for ac_prog in ginstall scoinst install; do
6427 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006428 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006429 if test $ac_prog = install &&
6430 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6431 # AIX install. It has an incompatible calling convention.
6432 :
6433 elif test $ac_prog = install &&
6434 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6435 # program-specific install script used by HP pwplus--don't use.
6436 :
6437 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006438 rm -rf conftest.one conftest.two conftest.dir
6439 echo one > conftest.one
6440 echo two > conftest.two
6441 mkdir conftest.dir
6442 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6443 test -s conftest.one && test -s conftest.two &&
6444 test -s conftest.dir/conftest.one &&
6445 test -s conftest.dir/conftest.two
6446 then
6447 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6448 break 3
6449 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006450 fi
6451 fi
6452 done
6453 done
6454 ;;
6455esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006456
6457 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458IFS=$as_save_IFS
6459
Matthias Kloseb9621712010-04-24 17:59:49 +00006460rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006461
6462fi
6463 if test "${ac_cv_path_install+set}" = set; then
6464 INSTALL=$ac_cv_path_install
6465 else
6466 # As a last resort, use the slow shell script. Don't cache a
6467 # value for INSTALL within a source directory, because that will
6468 # break other packages using the cache if that directory is
6469 # removed, or if the value is a relative name.
6470 INSTALL=$ac_install_sh
6471 fi
6472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6474$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006475
6476# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6477# It thinks the first close brace ends the variable substitution.
6478test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6479
6480test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6481
6482test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6483
Matthias Klose93a0ef12012-03-15 18:08:34 +01006484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6485$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6486if test -z "$MKDIR_P"; then
6487 if ${ac_cv_path_mkdir+:} false; then :
6488 $as_echo_n "(cached) " >&6
6489else
6490 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6492do
6493 IFS=$as_save_IFS
6494 test -z "$as_dir" && as_dir=.
6495 for ac_prog in mkdir gmkdir; do
6496 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006497 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006498 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6499 'mkdir (GNU coreutils) '* | \
6500 'mkdir (coreutils) '* | \
6501 'mkdir (fileutils) '4.1*)
6502 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6503 break 3;;
6504 esac
6505 done
6506 done
6507 done
6508IFS=$as_save_IFS
6509
6510fi
6511
6512 test -d ./--version && rmdir ./--version
6513 if test "${ac_cv_path_mkdir+set}" = set; then
6514 MKDIR_P="$ac_cv_path_mkdir -p"
6515 else
6516 # As a last resort, use the slow shell script. Don't cache a
6517 # value for MKDIR_P within a source directory, because that will
6518 # break other packages using the cache if that directory is
6519 # removed, or if the value is a relative name.
6520 MKDIR_P="$ac_install_sh -d"
6521 fi
6522fi
6523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6524$as_echo "$MKDIR_P" >&6; }
6525
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006526
6527# Not every filesystem supports hard links
6528
6529if test -z "$LN" ; then
6530 case $ac_sys_system in
6531 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006532 *) LN=ln;;
6533 esac
6534fi
6535
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006536# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006537
6538ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006539
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006540# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6542$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006543
6544# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006545if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006546 withval=$with_pydebug;
6547if test "$withval" != no
6548then
6549
Matthias Kloseb9621712010-04-24 17:59:49 +00006550$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551
Matthias Kloseb9621712010-04-24 17:59:49 +00006552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6553$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006554 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006555 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006556else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6557$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558fi
6559else
Matthias Kloseb9621712010-04-24 17:59:49 +00006560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6561$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562fi
6563
6564
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006565# Enable LTO flags
6566
6567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6568$as_echo_n "checking for --with-lto... " >&6; }
6569
6570# Check whether --with-lto was given.
6571if test "${with_lto+set}" = set; then :
6572 withval=$with_lto;
6573if test "$withval" != no
6574then
6575 Py_LTO='true'
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6577$as_echo "yes" >&6; };
6578else
6579 Py_LTO='false'
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6581$as_echo "no" >&6; };
6582fi
6583else
6584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; }
6586fi
6587
6588if test "$Py_LTO" = 'true' ; then
6589 case $CC in
6590 *clang*)
6591 # Any changes made here should be reflected in the GCC+Darwin case below
6592 LTOFLAGS="-flto"
6593 ;;
6594 *gcc*)
6595 case $ac_sys_system in
6596 Darwin*)
6597 LTOFLAGS="-flto"
6598 ;;
6599 *)
6600 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6601 ;;
6602 esac
6603 ;;
6604 esac
6605fi
6606
Brett Cannon7188a3e2015-09-18 15:13:44 -07006607# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006608
6609
6610
6611
6612
6613
Brett Cannon7188a3e2015-09-18 15:13:44 -07006614# Extract the first word of "llvm-profdata", so it can be a program name with args.
6615set dummy llvm-profdata; ac_word=$2
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6617$as_echo_n "checking for $ac_word... " >&6; }
6618if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6619 $as_echo_n "(cached) " >&6
6620else
6621 if test -n "$LLVM_PROF_FOUND"; then
6622 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6623else
6624as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6625for as_dir in $PATH
6626do
6627 IFS=$as_save_IFS
6628 test -z "$as_dir" && as_dir=.
6629 for ac_exec_ext in '' $ac_executable_extensions; do
6630 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6631 ac_cv_prog_LLVM_PROF_FOUND="found"
6632 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6633 break 2
6634 fi
6635done
6636 done
6637IFS=$as_save_IFS
6638
6639 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6640fi
6641fi
6642LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6643if test -n "$LLVM_PROF_FOUND"; then
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6645$as_echo "$LLVM_PROF_FOUND" >&6; }
6646else
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6648$as_echo "no" >&6; }
6649fi
6650
6651
6652LLVM_PROF_ERR=no
6653case $CC in
6654 *clang*)
6655 # Any changes made here should be reflected in the GCC+Darwin case below
6656 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6657 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6658 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6659 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6660 if test $LLVM_PROF_FOUND = not-found
6661 then
6662 LLVM_PROF_ERR=yes
6663 fi
6664 ;;
6665 *gcc*)
6666 case $ac_sys_system in
6667 Darwin*)
6668 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6669 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6670 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6671 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6672 if test $LLVM_PROF_FOUND = not-found
6673 then
6674 LLVM_PROF_ERR=yes
6675 fi
6676 ;;
6677 *)
6678 PGO_PROF_GEN_FLAG="-fprofile-generate"
6679 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6680 LLVM_PROF_MERGER="true"
6681 LLVM_PROF_FILE=""
6682 ;;
6683 esac
6684 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006685 *icc*)
6686 PGO_PROF_GEN_FLAG="-prof-gen"
6687 PGO_PROF_USE_FLAG="-prof-use"
6688 LLVM_PROF_MERGER="true"
6689 LLVM_PROF_FILE=""
6690 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006691esac
6692
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006693# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6694# merged with this chunk of code?
6695
6696# Optimizer/debugger flags
6697# ------------------------
6698# (The following bit of code is complicated enough - please keep things
6699# indented properly. Just pretend you're editing Python code. ;-)
6700
6701# There are two parallel sets of case statements below, one that checks to
6702# see if OPT was set and one that does BASECFLAGS setting based upon
6703# compiler and platform. BASECFLAGS tweaks need to be made even if the
6704# user set OPT.
6705
6706# tweak OPT based on compiler and platform, only if the user didn't set
6707# it on the command line
6708
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006709if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710then
6711 case $GCC in
6712 yes)
6713 if test "$CC" != 'g++' ; then
6714 STRICT_PROTO="-Wstrict-prototypes"
6715 fi
6716 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6717 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6718 WRAP="-fwrapv"
6719 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006720
6721 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006722 case $CC in
6723 *clang*) WRAP="-fwrapv"
6724 ;;
6725 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727 case $ac_cv_prog_cc_g in
6728 yes)
6729 if test "$Py_DEBUG" = 'true' ; then
6730 # Optimization messes up debuggers, so turn it off for
6731 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006732 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6733 OPT="-g -Og -Wall $STRICT_PROTO"
6734 else
6735 OPT="-g -O0 -Wall $STRICT_PROTO"
6736 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006737 else
6738 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6739 fi
6740 ;;
6741 *)
6742 OPT="-O3 -Wall $STRICT_PROTO"
6743 ;;
6744 esac
6745 case $ac_sys_system in
6746 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6747 ;;
6748 esac
6749 ;;
6750
6751 *)
6752 OPT="-O"
6753 ;;
6754 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755fi
6756
6757
6758
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006759
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760# The -arch flags for universal builds on OSX
6761UNIVERSAL_ARCH_FLAGS=
6762
6763
6764# tweak BASECFLAGS based on compiler and platform
6765case $GCC in
6766yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006767 # Python doesn't violate C99 aliasing rules, but older versions of
6768 # GCC produce warnings for legal Python code. Enable
6769 # -fno-strict-aliasing on versions of GCC that support but produce
6770 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6772$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773 ac_save_cc="$CC"
6774 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006775 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006776 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006778else
Matthias Kloseb9621712010-04-24 17:59:49 +00006779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006781
Matthias Kloseb159a552010-04-25 21:00:44 +00006782
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006783int
6784main ()
6785{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006786
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006787 ;
6788 return 0;
6789}
Matthias Kloseb159a552010-04-25 21:00:44 +00006790
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006791_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006792if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006793
6794 CC="$ac_save_cc -fstrict-aliasing"
6795 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006797/* end confdefs.h. */
6798
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006799 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006800int
6801main ()
6802{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006803double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006804 ;
6805 return 0;
6806}
Matthias Kloseb159a552010-04-25 21:00:44 +00006807
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006809if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006810
6811 ac_cv_no_strict_aliasing=no
6812
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813else
Matthias Kloseb159a552010-04-25 21:00:44 +00006814
6815 ac_cv_no_strict_aliasing=yes
6816
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006817fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006819
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006820else
Matthias Kloseb159a552010-04-25 21:00:44 +00006821
6822 ac_cv_no_strict_aliasing=no
6823
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006824fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006826fi
6827
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006828 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6831$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006832 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833 then
6834 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6835 fi
6836
Zachary Ware5af85642015-12-21 12:09:17 -06006837 # ICC doesn't recognize the option, but only emits a warning
6838 ## XXX does it emit an unused result warning and can it be disabled?
6839 case "$CC" in
6840 *icc*)
6841 ac_cv_disable_unused_result_warning=no
6842 ;;
6843 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6845$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6846 ac_save_cc="$CC"
6847 CC="$CC -Wunused-result -Werror"
6848 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006849 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006850 $as_echo_n "(cached) " >&6
6851else
6852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6853/* end confdefs.h. */
6854
6855
6856int
6857main ()
6858{
6859
6860 ;
6861 return 0;
6862}
6863
6864_ACEOF
6865if ac_fn_c_try_compile "$LINENO"; then :
6866
6867 ac_cv_disable_unused_result_warning=yes
6868
6869else
6870
6871 ac_cv_disable_unused_result_warning=no
6872
6873fi
6874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6875fi
6876
6877 CFLAGS="$save_CFLAGS"
6878 CC="$ac_save_cc"
6879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6880$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006881 ;;
6882 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006883
6884 if test $ac_cv_disable_unused_result_warning = yes
6885 then
6886 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6887 fi
6888
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6890$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6891 ac_save_cc="$CC"
6892 CC="$CC -Werror=declaration-after-statement"
6893 save_CFLAGS="$CFLAGS"
6894 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6895 $as_echo_n "(cached) " >&6
6896else
6897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6898/* end confdefs.h. */
6899
6900
6901int
6902main ()
6903{
6904
6905 ;
6906 return 0;
6907}
6908
6909_ACEOF
6910if ac_fn_c_try_compile "$LINENO"; then :
6911
6912 ac_cv_declaration_after_statement_warning=yes
6913
6914else
6915
6916 ac_cv_declaration_after_statement_warning=no
6917
6918fi
6919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6920fi
6921
6922 CFLAGS="$save_CFLAGS"
6923 CC="$ac_save_cc"
6924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6925$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6926
6927 if test $ac_cv_declaration_after_statement_warning = yes
6928 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006929 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006930 fi
6931
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6933$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6934 ac_save_cc="$CC"
6935 CC="$CC -Wsign-compare"
6936 save_CFLAGS="$CFLAGS"
6937 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6938 $as_echo_n "(cached) " >&6
6939else
6940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6941/* end confdefs.h. */
6942
6943
6944int
6945main ()
6946{
6947
6948 ;
6949 return 0;
6950}
6951
6952_ACEOF
6953if ac_fn_c_try_compile "$LINENO"; then :
6954
6955 ac_cv_enable_sign_compare_warning=yes
6956
6957else
6958
6959 ac_cv_enable_sign_compare_warning=no
6960
6961fi
6962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6963fi
6964
6965 CFLAGS="$save_CFLAGS"
6966 CC="$ac_save_cc"
6967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6968$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6969
6970 if test $ac_cv_enable_sign_compare_warning = yes
6971 then
6972 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6973 fi
6974
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6976$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6977 ac_save_cc="$CC"
6978 CC="$CC -Wunreachable-code"
6979 save_CFLAGS="$CFLAGS"
6980 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6981 $as_echo_n "(cached) " >&6
6982else
6983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6984/* end confdefs.h. */
6985
6986
6987int
6988main ()
6989{
6990
6991 ;
6992 return 0;
6993}
6994
6995_ACEOF
6996if ac_fn_c_try_compile "$LINENO"; then :
6997
6998 ac_cv_enable_unreachable_code_warning=yes
6999
7000else
7001
7002 ac_cv_enable_unreachable_code_warning=no
7003
7004fi
7005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7006fi
7007
7008 CFLAGS="$save_CFLAGS"
7009 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007010
7011 # Don't enable unreachable code warning in debug mode, since it usually
7012 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007013 # Issue #24324: Unfortunately, the unreachable code warning does not work
7014 # correctly on gcc and has been silently removed from the compiler.
7015 # It is supported on clang but on OS X systems gcc may be an alias
7016 # for clang. Try to determine if the compiler is not really gcc and,
7017 # if so, only then enable the warning.
7018 if test $ac_cv_enable_unreachable_code_warning = yes && \
7019 test "$Py_DEBUG" != "true" && \
7020 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007021 then
7022 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007023 else
7024 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007025 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7027$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007028
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007029 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7030 # support. Without this, treatment of subnormals doesn't follow
7031 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007032 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007033 alpha*)
7034 BASECFLAGS="$BASECFLAGS -mieee"
7035 ;;
7036 esac
7037
7038 case $ac_sys_system in
7039 SCO_SV*)
7040 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7041 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007042
7043 # is there any other compiler on Darwin besides gcc?
7044 Darwin*)
7045 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7046 # used to be here, but non-Apple gcc doesn't accept them.
7047 if test "${CC}" = gcc
7048 then
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007050$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007051 case "${UNIVERSALSDK}" in
7052 */MacOSX10.4u.sdk)
7053 # Build using 10.4 SDK, force usage of gcc when the
7054 # compiler is gcc, otherwise the user will get very
7055 # confusing error messages when building on OSX 10.6
7056 CC=gcc-4.0
7057 CPP=cpp-4.0
7058 ;;
7059 esac
7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007061$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007062 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007063
Ned Deily87adb6e2013-10-18 21:09:56 -07007064 if test "${enable_universalsdk}"
7065 then
7066 case "$UNIVERSAL_ARCHS" in
7067 32-bit)
7068 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7069 LIPO_32BIT_FLAGS=""
7070 ARCH_RUN_32BIT=""
7071 ;;
7072 64-bit)
7073 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7074 LIPO_32BIT_FLAGS=""
7075 ARCH_RUN_32BIT="true"
7076 ;;
7077 all)
7078 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7079 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7080 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7081 ;;
7082 intel)
7083 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7084 LIPO_32BIT_FLAGS="-extract i386"
7085 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7086 ;;
7087 intel-32)
7088 UNIVERSAL_ARCH_FLAGS="-arch i386"
7089 LIPO_32BIT_FLAGS=""
7090 ARCH_RUN_32BIT=""
7091 ;;
7092 3-way)
7093 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7094 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7095 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7096 ;;
7097 *)
7098 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7099 ;;
7100 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007101
Ned Deily87adb6e2013-10-18 21:09:56 -07007102 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7103 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7104 if test "${UNIVERSALSDK}" != "/"
7105 then
7106 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7107 fi
7108 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007109
Ned Deily87adb6e2013-10-18 21:09:56 -07007110 # Calculate an appropriate deployment target for this build:
7111 # The deployment target value is used explicitly to enable certain
7112 # features are enabled (such as builtin libedit support for readline)
7113 # through the use of Apple's Availabiliy Macros and is used as a
7114 # component of the string returned by distutils.get_platform().
7115 #
7116 # Use the value from:
7117 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7118 # 2. the operating system version of the build machine if >= 10.6
7119 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7120 # below to pick either 10.3, 10.4, or 10.5 as the target.
7121 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007122
Ned Deily87adb6e2013-10-18 21:09:56 -07007123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7124$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007125 cur_target_major=`sw_vers -productVersion | \
7126 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7127 cur_target_minor=`sw_vers -productVersion | \
7128 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7129 cur_target="${cur_target_major}.${cur_target_minor}"
7130 if test ${cur_target_major} -eq 10 && \
7131 test ${cur_target_minor} -ge 3 && \
7132 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007133 then
Ned Deily36820b62014-06-25 13:44:22 -07007134 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007135 cur_target=10.3
7136 if test ${enable_universalsdk}
7137 then
7138 case "$UNIVERSAL_ARCHS" in
7139 all|3-way|intel|64-bit)
7140 # These configurations were first supported in 10.5
7141 cur_target='10.5'
7142 ;;
7143 esac
7144 else
7145 if test `/usr/bin/arch` = "i386"
7146 then
7147 # 10.4 was the first release to support Intel archs
7148 cur_target="10.4"
7149 fi
7150 fi
7151 fi
7152 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007153
Ned Deily87adb6e2013-10-18 21:09:56 -07007154 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7155 # environment with a value that is the same as what we'll use
7156 # in the Makefile to ensure that we'll get the same compiler
7157 # environment during configure and build time.
7158 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7159 export MACOSX_DEPLOYMENT_TARGET
7160 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7162$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007163
Ned Deily87adb6e2013-10-18 21:09:56 -07007164 # end of Darwin* tests
7165 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007166 esac
7167 ;;
7168
7169*)
7170 case $ac_sys_system in
7171 OpenUNIX*|UnixWare*)
7172 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7173 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007174 SCO_SV*)
7175 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7176 ;;
7177 esac
7178 ;;
7179esac
7180
Zachary Ware5af85642015-12-21 12:09:17 -06007181# ICC needs -fp-model strict or floats behave badly
7182case "$CC" in
7183*icc*)
7184 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7185 ;;
7186esac
7187
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007188if test "$Py_DEBUG" = 'true'; then
7189 :
7190else
7191 OPT="-DNDEBUG $OPT"
7192fi
7193
7194if test "$ac_arch_flags"
7195then
7196 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7197fi
7198
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007199# On some compilers, pthreads are available without further options
7200# (e.g. MacOS X). On some of these systems, the compiler will not
7201# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7202# So we have to see first whether pthreads are available without
7203# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7205$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007206if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007207 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007208else
Matthias Kloseb9621712010-04-24 17:59:49 +00007209 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007210 ac_cv_pthread_is_default=no
7211else
Matthias Kloseb9621712010-04-24 17:59:49 +00007212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007213/* end confdefs.h. */
7214
Stefan Krah7dba5942012-11-22 22:49:11 +01007215#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007216#include <pthread.h>
7217
7218void* routine(void* p){return NULL;}
7219
7220int main(){
7221 pthread_t p;
7222 if(pthread_create(&p,NULL,routine,NULL)!=0)
7223 return 1;
7224 (void)pthread_detach(p);
7225 return 0;
7226}
7227
7228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007229if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007230
7231 ac_cv_pthread_is_default=yes
7232 ac_cv_kthread=no
7233 ac_cv_pthread=no
7234
7235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7239 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240fi
7241
7242
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007243fi
7244
Matthias Kloseb9621712010-04-24 17:59:49 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7246$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007247
7248
7249if test $ac_cv_pthread_is_default = yes
7250then
7251 ac_cv_kpthread=no
7252else
7253# -Kpthread, if available, provides the right #defines
7254# and linker options to make pthread_create available
7255# Some compilers won't report that they do not support -Kpthread,
7256# so we need to run a program to see whether it really made the
7257# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7259$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007260if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007262else
7263 ac_save_cc="$CC"
7264CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007265if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007266 ac_cv_kpthread=no
7267else
Matthias Kloseb9621712010-04-24 17:59:49 +00007268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007269/* end confdefs.h. */
7270
Stefan Krah7dba5942012-11-22 22:49:11 +01007271#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007272#include <pthread.h>
7273
7274void* routine(void* p){return NULL;}
7275
7276int main(){
7277 pthread_t p;
7278 if(pthread_create(&p,NULL,routine,NULL)!=0)
7279 return 1;
7280 (void)pthread_detach(p);
7281 return 0;
7282}
7283
7284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007285if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007286 ac_cv_kpthread=yes
7287else
Matthias Kloseb9621712010-04-24 17:59:49 +00007288 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007289fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7291 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007292fi
7293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007294CC="$ac_save_cc"
7295fi
7296
Matthias Kloseb9621712010-04-24 17:59:49 +00007297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7298$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007299fi
7300
7301if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7302then
7303# -Kthread, if available, provides the right #defines
7304# and linker options to make pthread_create available
7305# Some compilers won't report that they do not support -Kthread,
7306# so we need to run a program to see whether it really made the
7307# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7309$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007310if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007311 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007312else
7313 ac_save_cc="$CC"
7314CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007315if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007316 ac_cv_kthread=no
7317else
Matthias Kloseb9621712010-04-24 17:59:49 +00007318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007319/* end confdefs.h. */
7320
Stefan Krah7dba5942012-11-22 22:49:11 +01007321#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007322#include <pthread.h>
7323
7324void* routine(void* p){return NULL;}
7325
7326int main(){
7327 pthread_t p;
7328 if(pthread_create(&p,NULL,routine,NULL)!=0)
7329 return 1;
7330 (void)pthread_detach(p);
7331 return 0;
7332}
7333
7334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007335if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007336 ac_cv_kthread=yes
7337else
Matthias Kloseb9621712010-04-24 17:59:49 +00007338 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342fi
7343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344CC="$ac_save_cc"
7345fi
7346
Matthias Kloseb9621712010-04-24 17:59:49 +00007347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7348$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007349fi
7350
7351if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7352then
7353# -pthread, if available, provides the right #defines
7354# and linker options to make pthread_create available
7355# Some compilers won't report that they do not support -pthread,
7356# so we need to run a program to see whether it really made the
7357# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7359$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007360if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007362else
7363 ac_save_cc="$CC"
7364CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007365if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007366 ac_cv_pthread=no
7367else
Matthias Kloseb9621712010-04-24 17:59:49 +00007368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007369/* end confdefs.h. */
7370
Stefan Krah7dba5942012-11-22 22:49:11 +01007371#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007372#include <pthread.h>
7373
7374void* routine(void* p){return NULL;}
7375
7376int main(){
7377 pthread_t p;
7378 if(pthread_create(&p,NULL,routine,NULL)!=0)
7379 return 1;
7380 (void)pthread_detach(p);
7381 return 0;
7382}
7383
7384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007385if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386 ac_cv_pthread=yes
7387else
Matthias Kloseb9621712010-04-24 17:59:49 +00007388 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007390rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7391 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007392fi
7393
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394CC="$ac_save_cc"
7395fi
7396
Matthias Kloseb9621712010-04-24 17:59:49 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7398$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007399fi
7400
7401# If we have set a CC compiler flag for thread support then
7402# check if it works for CXX, too.
7403ac_cv_cxx_thread=no
7404if test ! -z "$CXX"
7405then
Matthias Kloseb9621712010-04-24 17:59:49 +00007406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7407$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007408ac_save_cxx="$CXX"
7409
7410if test "$ac_cv_kpthread" = "yes"
7411then
7412 CXX="$CXX -Kpthread"
7413 ac_cv_cxx_thread=yes
7414elif test "$ac_cv_kthread" = "yes"
7415then
7416 CXX="$CXX -Kthread"
7417 ac_cv_cxx_thread=yes
7418elif test "$ac_cv_pthread" = "yes"
7419then
7420 CXX="$CXX -pthread"
7421 ac_cv_cxx_thread=yes
7422fi
7423
7424if test $ac_cv_cxx_thread = yes
7425then
7426 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7427 $CXX -c conftest.$ac_ext 2>&5
7428 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7429 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7430 then
7431 ac_cv_cxx_thread=yes
7432 else
7433 ac_cv_cxx_thread=no
7434 fi
7435 rm -fr conftest*
7436fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7438$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439fi
7440CXX="$ac_save_cxx"
7441
7442
7443# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7445$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007446if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007447 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007448else
Matthias Kloseb9621712010-04-24 17:59:49 +00007449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450/* end confdefs.h. */
7451#include <stdlib.h>
7452#include <stdarg.h>
7453#include <string.h>
7454#include <float.h>
7455
7456int
7457main ()
7458{
7459
7460 ;
7461 return 0;
7462}
7463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007464if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007465 ac_cv_header_stdc=yes
7466else
Matthias Kloseb9621712010-04-24 17:59:49 +00007467 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007468fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7470
7471if test $ac_cv_header_stdc = yes; then
7472 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007474/* end confdefs.h. */
7475#include <string.h>
7476
7477_ACEOF
7478if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007479 $EGREP "memchr" >/dev/null 2>&1; then :
7480
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007481else
7482 ac_cv_header_stdc=no
7483fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007484rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007485
7486fi
7487
7488if test $ac_cv_header_stdc = yes; then
7489 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007491/* end confdefs.h. */
7492#include <stdlib.h>
7493
7494_ACEOF
7495if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007496 $EGREP "free" >/dev/null 2>&1; then :
7497
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498else
7499 ac_cv_header_stdc=no
7500fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007501rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502
7503fi
7504
7505if test $ac_cv_header_stdc = yes; then
7506 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007507 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508 :
7509else
Matthias Kloseb9621712010-04-24 17:59:49 +00007510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007511/* end confdefs.h. */
7512#include <ctype.h>
7513#include <stdlib.h>
7514#if ((' ' & 0x0FF) == 0x020)
7515# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7516# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7517#else
7518# define ISLOWER(c) \
7519 (('a' <= (c) && (c) <= 'i') \
7520 || ('j' <= (c) && (c) <= 'r') \
7521 || ('s' <= (c) && (c) <= 'z'))
7522# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7523#endif
7524
7525#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7526int
7527main ()
7528{
7529 int i;
7530 for (i = 0; i < 256; i++)
7531 if (XOR (islower (i), ISLOWER (i))
7532 || toupper (i) != TOUPPER (i))
7533 return 2;
7534 return 0;
7535}
7536_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007537if ac_fn_c_try_run "$LINENO"; then :
7538
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007539else
Matthias Kloseb9621712010-04-24 17:59:49 +00007540 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007541fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7543 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007544fi
7545
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007546fi
7547fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7549$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007550if test $ac_cv_header_stdc = yes; then
7551
Matthias Kloseb9621712010-04-24 17:59:49 +00007552$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007553
7554fi
7555
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007556for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007557fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007558ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05007559sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007560unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007561poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007562sys/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 +01007563sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007564sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007565sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007566sys/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 -07007567libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007568bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007569sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007570do :
7571 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7572ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007573if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007574 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007575#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007576_ACEOF
7577
7578fi
7579
Guido van Rossum627b2d71993-12-24 10:39:16 +00007580done
7581
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007582ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007583for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007584 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7586$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007587if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007588 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007589else
Matthias Kloseb9621712010-04-24 17:59:49 +00007590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007591/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007592#include <sys/types.h>
7593#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007594
Martin v. Löwis11437992002-04-12 09:54:03 +00007595int
7596main ()
7597{
7598if ((DIR *) 0)
7599return 0;
7600 ;
7601 return 0;
7602}
7603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007605 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007610fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007611eval ac_res=\$$as_ac_Header
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7613$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007614if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007615 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007616#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007617_ACEOF
7618
7619ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007620fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007621
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007622done
7623# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7624if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007625 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7626$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007627if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007628 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007629else
Martin v. Löwis11437992002-04-12 09:54:03 +00007630 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007632/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007633
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634/* Override any GCC internal prototype to avoid an error.
7635 Use char because int might match the return type of a GCC
7636 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007637#ifdef __cplusplus
7638extern "C"
7639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007640char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007641int
7642main ()
7643{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007644return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007645 ;
7646 return 0;
7647}
7648_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649for ac_lib in '' dir; do
7650 if test -z "$ac_lib"; then
7651 ac_res="none required"
7652 else
7653 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007654 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007655 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007656 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007659rm -f core conftest.err conftest.$ac_objext \
7660 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007661 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007664done
Victor Stinnere0be4232011-10-25 13:06:09 +02007665if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667else
7668 ac_cv_search_opendir=no
7669fi
7670rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007671LIBS=$ac_func_search_save_LIBS
7672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7674$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007676if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007677 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007678
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007679fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007680
Michael W. Hudson54241132001-12-07 15:38:26 +00007681else
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7683$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007684if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007686else
7687 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007688cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007690
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007691/* Override any GCC internal prototype to avoid an error.
7692 Use char because int might match the return type of a GCC
7693 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007694#ifdef __cplusplus
7695extern "C"
7696#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007697char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007698int
7699main ()
7700{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007701return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ;
7703 return 0;
7704}
7705_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007706for ac_lib in '' x; do
7707 if test -z "$ac_lib"; then
7708 ac_res="none required"
7709 else
7710 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007711 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007712 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007713 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007715fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007716rm -f core conftest.err conftest.$ac_objext \
7717 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007718 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007721done
Victor Stinnere0be4232011-10-25 13:06:09 +02007722if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007724else
7725 ac_cv_search_opendir=no
7726fi
7727rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007728LIBS=$ac_func_search_save_LIBS
7729fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7731$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007732ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007733if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007734 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007735
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007736fi
7737
7738fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007739
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7741$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007742if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007744else
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007746/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007747#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007748int
7749main ()
7750{
7751return makedev(0, 0);
7752 ;
7753 return 0;
7754}
7755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007756if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007757 ac_cv_header_sys_types_h_makedev=yes
7758else
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007760fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007761rm -f core conftest.err conftest.$ac_objext \
7762 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007763
7764fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7766$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007767
7768if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007769ac_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 +02007770if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007771
Matthias Kloseb9621712010-04-24 17:59:49 +00007772$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007773
7774fi
7775
7776
7777
7778 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007779 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 +02007780if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007781
Matthias Kloseb9621712010-04-24 17:59:49 +00007782$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007783
7784fi
7785
7786
7787 fi
7788fi
7789
Michael W. Hudson54241132001-12-07 15:38:26 +00007790
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007791# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7792for ac_header in net/if.h
7793do :
7794 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7795#ifdef STDC_HEADERS
7796# include <stdlib.h>
7797# include <stddef.h>
7798#else
7799# ifdef HAVE_STDLIB_H
7800# include <stdlib.h>
7801# endif
7802#endif
7803#ifdef HAVE_SYS_SOCKET_H
7804# include <sys/socket.h>
7805#endif
7806
7807"
Victor Stinnere0be4232011-10-25 13:06:09 +02007808if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007809 cat >>confdefs.h <<_ACEOF
7810#define HAVE_NET_IF_H 1
7811_ACEOF
7812
7813fi
7814
7815done
7816
7817
Martin v. Löwis11017b12006-01-14 18:12:57 +00007818# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007819for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007820do :
7821 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 +00007822#ifdef HAVE_ASM_TYPES_H
7823#include <asm/types.h>
7824#endif
7825#ifdef HAVE_SYS_SOCKET_H
7826#include <sys/socket.h>
7827#endif
7828
Matthias Kloseb9621712010-04-24 17:59:49 +00007829"
Victor Stinnere0be4232011-10-25 13:06:09 +02007830if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007831 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007832#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007833_ACEOF
7834
7835fi
7836
7837done
7838
7839
Charles-François Natali47413c12011-10-06 19:47:44 +02007840# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007841for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007842do :
7843 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7844ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7845#ifdef HAVE_SYS_SOCKET_H
7846#include <sys/socket.h>
7847#endif
7848
7849"
7850if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7851 cat >>confdefs.h <<_ACEOF
7852#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7853_ACEOF
7854
7855fi
7856
7857done
7858
7859
Guido van Rossum627b2d71993-12-24 10:39:16 +00007860# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007861was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7863$as_echo_n "checking for clock_t in time.h... " >&6; }
7864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007865/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007866#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007867
7868_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007869if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007870 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007871 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007872else
Martin v. Löwis11437992002-04-12 09:54:03 +00007873
7874
Matthias Kloseb9621712010-04-24 17:59:49 +00007875$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007876
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007877
Guido van Rossum627b2d71993-12-24 10:39:16 +00007878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007879rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007880
Matthias Kloseb9621712010-04-24 17:59:49 +00007881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7882$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007883
Matthias Kloseb9621712010-04-24 17:59:49 +00007884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7885$as_echo_n "checking for makedev... " >&6; }
7886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007887/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007888
Jesus Cea740f53a2010-04-28 11:35:30 +00007889#if defined(MAJOR_IN_MKDEV)
7890#include <sys/mkdev.h>
7891#elif defined(MAJOR_IN_SYSMACROS)
7892#include <sys/sysmacros.h>
7893#else
7894#include <sys/types.h>
7895#endif
7896
Neal Norwitz11690112002-07-30 01:08:28 +00007897int
7898main ()
7899{
Jesus Cea740f53a2010-04-28 11:35:30 +00007900
7901 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007902 ;
7903 return 0;
7904}
Matthias Kloseb159a552010-04-25 21:00:44 +00007905
Neal Norwitz11690112002-07-30 01:08:28 +00007906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007907if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007908 ac_cv_has_makedev=yes
7909else
Matthias Kloseb9621712010-04-24 17:59:49 +00007910 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007912rm -f core conftest.err conftest.$ac_objext \
7913 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7915$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007916if test "$ac_cv_has_makedev" = "yes"; then
7917
Matthias Kloseb9621712010-04-24 17:59:49 +00007918$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007919
7920fi
7921
Christian Heimes985ecdc2013-11-20 11:46:18 +01007922# byte swapping
7923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7924$as_echo_n "checking for le64toh... " >&6; }
7925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7926/* end confdefs.h. */
7927
7928#ifdef HAVE_ENDIAN_H
7929#include <endian.h>
7930#elif defined(HAVE_SYS_ENDIAN_H)
7931#include <sys/endian.h>
7932#endif
7933
7934int
7935main ()
7936{
7937
7938 le64toh(1)
7939 ;
7940 return 0;
7941}
7942
7943_ACEOF
7944if ac_fn_c_try_link "$LINENO"; then :
7945 ac_cv_has_le64toh=yes
7946else
7947 ac_cv_has_le64toh=no
7948fi
7949rm -f core conftest.err conftest.$ac_objext \
7950 conftest$ac_exeext conftest.$ac_ext
7951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7952$as_echo "$ac_cv_has_le64toh" >&6; }
7953if test "$ac_cv_has_le64toh" = "yes"; then
7954
7955$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7956
7957fi
7958
Martin v. Löwis399a6892002-10-04 10:22:02 +00007959# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7960# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7961# defined, but the compiler does not support pragma redefine_extname,
7962# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7963# structures (such as rlimit64) without declaring them. As a
7964# work-around, disable LFS on such configurations
7965
7966use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7968$as_echo_n "checking Solaris LFS bug... " >&6; }
7969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007970/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007971
7972#define _LARGEFILE_SOURCE 1
7973#define _FILE_OFFSET_BITS 64
7974#include <sys/resource.h>
7975
Martin v. Löwis399a6892002-10-04 10:22:02 +00007976int
7977main ()
7978{
7979struct rlimit foo;
7980 ;
7981 return 0;
7982}
7983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007985 sol_lfs_bug=no
7986else
Matthias Kloseb9621712010-04-24 17:59:49 +00007987 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7991$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007992if test "$sol_lfs_bug" = "yes"; then
7993 use_lfs=no
7994fi
7995
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007996# Don't use largefile support for GNU/Hurd
7997case $ac_sys_system in GNU*)
7998 use_lfs=no
7999esac
8000
Martin v. Löwis399a6892002-10-04 10:22:02 +00008001if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008002# Two defines needed to enable largefile support on various platforms
8003# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008004case $ac_sys_system/$ac_sys_release in
8005AIX*)
8006
8007$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8008
8009 ;;
8010esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008011
Matthias Kloseb9621712010-04-24 17:59:49 +00008012$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008013
8014
Matthias Kloseb9621712010-04-24 17:59:49 +00008015$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008016
Martin v. Löwis399a6892002-10-04 10:22:02 +00008017fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008018
Guido van Rossum84e7b241996-08-19 21:59:00 +00008019# Add some code to confdefs.h so that the test for off_t works on SCO
8020cat >> confdefs.h <<\EOF
8021#if defined(SCO_DS)
8022#undef _OFF_T
8023#endif
8024EOF
8025
Guido van Rossumef2255b2000-03-10 22:30:29 +00008026# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008027ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008028if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030else
Martin v. Löwis11437992002-04-12 09:54:03 +00008031
8032cat >>confdefs.h <<_ACEOF
8033#define mode_t int
8034_ACEOF
8035
8036fi
8037
Matthias Kloseb9621712010-04-24 17:59:49 +00008038ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008039if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008041else
Martin v. Löwis11437992002-04-12 09:54:03 +00008042
8043cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008044#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008045_ACEOF
8046
8047fi
8048
Matthias Kloseb9621712010-04-24 17:59:49 +00008049ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008050if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008052else
Martin v. Löwis11437992002-04-12 09:54:03 +00008053
8054cat >>confdefs.h <<_ACEOF
8055#define pid_t int
8056_ACEOF
8057
8058fi
8059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008060
Martin v. Löwis11437992002-04-12 09:54:03 +00008061cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008062#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008063_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008064
Matthias Kloseb9621712010-04-24 17:59:49 +00008065ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008066if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008068else
Martin v. Löwis11437992002-04-12 09:54:03 +00008069
8070cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008072_ACEOF
8073
8074fi
8075
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8077$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008078if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008080else
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008082/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008083#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008084
8085_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008086if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008087 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008088 ac_cv_type_uid_t=yes
8089else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008090 ac_cv_type_uid_t=no
8091fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008092rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8096$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008097if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008098
Matthias Kloseb9621712010-04-24 17:59:49 +00008099$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008100
8101
Matthias Kloseb9621712010-04-24 17:59:49 +00008102$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008103
8104fi
8105
Mark Dickinson983bc162012-12-02 12:11:38 +00008106
8107# There are two separate checks for each of the exact-width integer types we
8108# need. First we check whether the type is available using the usual
8109# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
8110# and <stdint.h> where available). We then also use the special type checks of
8111# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
8112# directly, #define's uint32_t to be a suitable type.
8113
8114ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
8115if test "x$ac_cv_type_uint32_t" = xyes; then :
8116
8117$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
8118
8119fi
8120
Matthias Kloseb9621712010-04-24 17:59:49 +00008121ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
8122case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008123 no|yes) ;; #(
8124 *)
8125
Matthias Kloseb9621712010-04-24 17:59:49 +00008126$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008127
8128
8129cat >>confdefs.h <<_ACEOF
8130#define uint32_t $ac_cv_c_uint32_t
8131_ACEOF
8132;;
8133 esac
8134
Mark Dickinson983bc162012-12-02 12:11:38 +00008135
8136ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
8137if test "x$ac_cv_type_uint64_t" = xyes; then :
8138
8139$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
8140
8141fi
8142
Matthias Kloseb9621712010-04-24 17:59:49 +00008143ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
8144case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008145 no|yes) ;; #(
8146 *)
8147
Matthias Kloseb9621712010-04-24 17:59:49 +00008148$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00008149
8150
8151cat >>confdefs.h <<_ACEOF
8152#define uint64_t $ac_cv_c_uint64_t
8153_ACEOF
8154;;
8155 esac
8156
Mark Dickinson983bc162012-12-02 12:11:38 +00008157
8158ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
8159if test "x$ac_cv_type_int32_t" = xyes; then :
8160
8161$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
8162
8163fi
8164
Matthias Kloseb9621712010-04-24 17:59:49 +00008165ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
8166case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008167 no|yes) ;; #(
8168 *)
8169
8170cat >>confdefs.h <<_ACEOF
8171#define int32_t $ac_cv_c_int32_t
8172_ACEOF
8173;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00008174esac
8175
Mark Dickinson983bc162012-12-02 12:11:38 +00008176
8177ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
8178if test "x$ac_cv_type_int64_t" = xyes; then :
8179
8180$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
8181
8182fi
8183
Matthias Kloseb9621712010-04-24 17:59:49 +00008184ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
8185case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00008186 no|yes) ;; #(
8187 *)
8188
8189cat >>confdefs.h <<_ACEOF
8190#define int64_t $ac_cv_c_int64_t
8191_ACEOF
8192;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008193esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00008194
Mark Dickinson983bc162012-12-02 12:11:38 +00008195
Matthias Kloseb9621712010-04-24 17:59:49 +00008196ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008197if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008198
Matthias Kloseb9621712010-04-24 17:59:49 +00008199$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008200
8201fi
8202
Stefan Krah1919b7e2012-03-21 18:25:23 +01008203ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8204if test "x$ac_cv_type___uint128_t" = xyes; then :
8205
8206$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8207
8208fi
8209
Jack Jansendd19cf82001-12-06 22:36:17 +00008210
Michael W. Hudson54241132001-12-07 15:38:26 +00008211# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008212# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213# The cast to long int works around a bug in the HP C Compiler
8214# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8215# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8216# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8218$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008219if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008220 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008221else
Matthias Kloseb9621712010-04-24 17:59:49 +00008222 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008223
Martin v. Löwis11437992002-04-12 09:54:03 +00008224else
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 if test "$ac_cv_type_int" = yes; then
8226 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8227$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008228as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008229See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008230 else
8231 ac_cv_sizeof_int=0
8232 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008233fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008234
Martin v. Löwis11437992002-04-12 09:54:03 +00008235fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8237$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238
8239
8240
Martin v. Löwis11437992002-04-12 09:54:03 +00008241cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008242#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008243_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008244
8245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008246# The cast to long int works around a bug in the HP C Compiler
8247# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8248# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8249# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8251$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008252if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008253 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008254else
Matthias Kloseb9621712010-04-24 17:59:49 +00008255 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008256
Martin v. Löwis11437992002-04-12 09:54:03 +00008257else
Matthias Kloseb9621712010-04-24 17:59:49 +00008258 if test "$ac_cv_type_long" = yes; then
8259 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8260$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008261as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008262See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263 else
8264 ac_cv_sizeof_long=0
8265 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008266fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008267
Martin v. Löwis11437992002-04-12 09:54:03 +00008268fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8270$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008271
8272
8273
Martin v. Löwis11437992002-04-12 09:54:03 +00008274cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008275#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008276_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008277
8278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279# The cast to long int works around a bug in the HP C Compiler
8280# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8281# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8282# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8284$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008285if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008286 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008287else
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 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 +00008289
Martin v. Löwis11437992002-04-12 09:54:03 +00008290else
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 if test "$ac_cv_type_void_p" = yes; then
8292 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008294as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008295See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296 else
8297 ac_cv_sizeof_void_p=0
8298 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008299fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008300
Martin v. Löwis11437992002-04-12 09:54:03 +00008301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008302{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8303$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304
8305
8306
Martin v. Löwis11437992002-04-12 09:54:03 +00008307cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008308#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008309_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008310
8311
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008312# The cast to long int works around a bug in the HP C Compiler
8313# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8314# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8315# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8317$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008318if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008320else
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 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 +00008322
Martin v. Löwis11437992002-04-12 09:54:03 +00008323else
Matthias Kloseb9621712010-04-24 17:59:49 +00008324 if test "$ac_cv_type_short" = yes; then
8325 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8326$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008327as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008328See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329 else
8330 ac_cv_sizeof_short=0
8331 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008332fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008333
Martin v. Löwis11437992002-04-12 09:54:03 +00008334fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8336$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008337
8338
8339
Martin v. Löwis11437992002-04-12 09:54:03 +00008340cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008341#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008342_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008343
8344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008345# The cast to long int works around a bug in the HP C Compiler
8346# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8347# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8348# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8350$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008351if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008352 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008353else
Matthias Kloseb9621712010-04-24 17:59:49 +00008354 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 +00008355
Martin v. Löwis11437992002-04-12 09:54:03 +00008356else
Matthias Kloseb9621712010-04-24 17:59:49 +00008357 if test "$ac_cv_type_float" = yes; then
8358 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8359$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008360as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008361See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008362 else
8363 ac_cv_sizeof_float=0
8364 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008365fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008366
Martin v. Löwis11437992002-04-12 09:54:03 +00008367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8369$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008370
8371
8372
Martin v. Löwis11437992002-04-12 09:54:03 +00008373cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008374#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008375_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008376
8377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378# The cast to long int works around a bug in the HP C Compiler
8379# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8380# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8381# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8383$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008384if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008386else
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 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 +00008388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389else
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 if test "$ac_cv_type_double" = yes; then
8391 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008393as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008394See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395 else
8396 ac_cv_sizeof_double=0
8397 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8402$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403
8404
8405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008407#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008408_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008409
8410
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411# The cast to long int works around a bug in the HP C Compiler
8412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8414# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8416$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008417if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008419else
Matthias Kloseb9621712010-04-24 17:59:49 +00008420 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 +00008421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422else
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 if test "$ac_cv_type_fpos_t" = yes; then
8424 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8425$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008426as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008427See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428 else
8429 ac_cv_sizeof_fpos_t=0
8430 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008432
Martin v. Löwis11437992002-04-12 09:54:03 +00008433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8435$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436
8437
8438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008440#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008441_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008442
Michael W. Hudson54241132001-12-07 15:38:26 +00008443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444# The cast to long int works around a bug in the HP C Compiler
8445# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8446# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8447# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8449$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008450if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008451 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008452else
Matthias Kloseb9621712010-04-24 17:59:49 +00008453 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 +00008454
Martin v. Löwis18e16552006-02-15 17:27:45 +00008455else
Matthias Kloseb9621712010-04-24 17:59:49 +00008456 if test "$ac_cv_type_size_t" = yes; then
8457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008459as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008460See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461 else
8462 ac_cv_sizeof_size_t=0
8463 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008464fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008465
Martin v. Löwis18e16552006-02-15 17:27:45 +00008466fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8468$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469
8470
8471
Martin v. Löwis18e16552006-02-15 17:27:45 +00008472cat >>confdefs.h <<_ACEOF
8473#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8474_ACEOF
8475
8476
Christian Heimes400adb02008-02-01 08:12:03 +00008477# The cast to long int works around a bug in the HP C Compiler
8478# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8479# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8480# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8482$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008483if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008485else
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 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 +00008487
Christian Heimes400adb02008-02-01 08:12:03 +00008488else
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 if test "$ac_cv_type_pid_t" = yes; then
8490 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008492as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008493See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008494 else
8495 ac_cv_sizeof_pid_t=0
8496 fi
8497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008498
Christian Heimes400adb02008-02-01 08:12:03 +00008499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8501$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008502
8503
8504
8505cat >>confdefs.h <<_ACEOF
8506#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8507_ACEOF
8508
8509
Michael W. Hudson54241132001-12-07 15:38:26 +00008510
Matthias Kloseb9621712010-04-24 17:59:49 +00008511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
8512$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008513have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008515/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008516
Martin v. Löwis11437992002-04-12 09:54:03 +00008517int
8518main ()
8519{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008520long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008521 ;
8522 return 0;
8523}
8524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008525if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008526
8527
Matthias Kloseb9621712010-04-24 17:59:49 +00008528$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008529
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008530 have_long_long=yes
8531
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
8535$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008536if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537# The cast to long int works around a bug in the HP C Compiler
8538# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8539# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8540# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8542$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008543if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008544 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008545else
Matthias Kloseb9621712010-04-24 17:59:49 +00008546 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 +00008547
Martin v. Löwis11437992002-04-12 09:54:03 +00008548else
Matthias Kloseb9621712010-04-24 17:59:49 +00008549 if test "$ac_cv_type_long_long" = yes; then
8550 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8551$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008552as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008553See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008554 else
8555 ac_cv_sizeof_long_long=0
8556 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558
Martin v. Löwis11437992002-04-12 09:54:03 +00008559fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8561$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008562
8563
8564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008566#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008567_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008568
Michael W. Hudson54241132001-12-07 15:38:26 +00008569
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008570fi
8571
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8573$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008574have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008576/* end confdefs.h. */
8577
8578int
8579main ()
8580{
8581long double x; x = (long double)0;
8582 ;
8583 return 0;
8584}
8585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008586if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008587
8588
Matthias Kloseb9621712010-04-24 17:59:49 +00008589$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008590
8591 have_long_double=yes
8592
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008593fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8596$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008597if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008598# The cast to long int works around a bug in the HP C Compiler
8599# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8600# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8601# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8603$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008604if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008605 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008606else
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 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 +00008608
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008609else
Matthias Kloseb9621712010-04-24 17:59:49 +00008610 if test "$ac_cv_type_long_double" = yes; then
8611 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8612$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008613as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008614See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008615 else
8616 ac_cv_sizeof_long_double=0
8617 fi
8618fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008619
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8622$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008623
8624
8625
8626cat >>confdefs.h <<_ACEOF
8627#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8628_ACEOF
8629
8630
8631fi
8632
8633
Matthias Kloseb9621712010-04-24 17:59:49 +00008634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8635$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008636have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008638/* end confdefs.h. */
8639
8640int
8641main ()
8642{
8643_Bool x; x = (_Bool)0;
8644 ;
8645 return 0;
8646}
8647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008648if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008649
8650
Matthias Kloseb9621712010-04-24 17:59:49 +00008651$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008652
8653 have_c99_bool=yes
8654
Thomas Woutersb2137042007-02-01 18:02:27 +00008655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8658$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008659if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008660# The cast to long int works around a bug in the HP C Compiler
8661# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8662# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8663# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8665$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008666if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008667 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008668else
Matthias Kloseb9621712010-04-24 17:59:49 +00008669 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 +00008670
Thomas Woutersb2137042007-02-01 18:02:27 +00008671else
Matthias Kloseb9621712010-04-24 17:59:49 +00008672 if test "$ac_cv_type__Bool" = yes; then
8673 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008675as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008676See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008677 else
8678 ac_cv_sizeof__Bool=0
8679 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008681
Thomas Woutersb2137042007-02-01 18:02:27 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8684$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008685
8686
8687
Thomas Woutersb2137042007-02-01 18:02:27 +00008688cat >>confdefs.h <<_ACEOF
8689#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8690_ACEOF
8691
8692
8693fi
8694
Matthias Kloseb9621712010-04-24 17:59:49 +00008695ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008696 #include <stdint.h>
8697 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008698 #ifdef HAVE_INTTYPES_H
8699 #include <inttypes.h>
8700 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008701"
Victor Stinnere0be4232011-10-25 13:06:09 +02008702if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008703
8704cat >>confdefs.h <<_ACEOF
8705#define HAVE_UINTPTR_T 1
8706_ACEOF
8707
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708# The cast to long int works around a bug in the HP C Compiler
8709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8711# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8713$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008714if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008715 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008716else
Matthias Kloseb9621712010-04-24 17:59:49 +00008717 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 +00008718
Martin v. Löwis11437992002-04-12 09:54:03 +00008719else
Matthias Kloseb9621712010-04-24 17:59:49 +00008720 if test "$ac_cv_type_uintptr_t" = yes; then
8721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008723as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008724See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008725 else
8726 ac_cv_sizeof_uintptr_t=0
8727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008729
Martin v. Löwis11437992002-04-12 09:54:03 +00008730fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8732$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733
8734
8735
Martin v. Löwis11437992002-04-12 09:54:03 +00008736cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008737#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008738_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008739
Michael W. Hudson54241132001-12-07 15:38:26 +00008740
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008741fi
8742
Thomas Wouters89f507f2006-12-13 04:49:30 +00008743
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008744# The cast to long int works around a bug in the HP C Compiler
8745# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8746# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8747# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8749$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008750if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008751 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008752else
Matthias Kloseb9621712010-04-24 17:59:49 +00008753 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008754#ifdef HAVE_SYS_TYPES_H
8755#include <sys/types.h>
8756#endif
8757
Matthias Kloseb9621712010-04-24 17:59:49 +00008758"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008759
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008760else
Matthias Kloseb9621712010-04-24 17:59:49 +00008761 if test "$ac_cv_type_off_t" = yes; then
8762 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008764as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008765See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008766 else
8767 ac_cv_sizeof_off_t=0
8768 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8773$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008774
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008775
8776
Martin v. Löwis11437992002-04-12 09:54:03 +00008777cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008778#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008779_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008780
Michael W. Hudson54241132001-12-07 15:38:26 +00008781
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008782
Matthias Kloseb9621712010-04-24 17:59:49 +00008783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8784$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008785if test "$have_long_long" = yes
8786then
8787if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008788 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008789
Matthias Kloseb9621712010-04-24 17:59:49 +00008790$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008791
Matthias Kloseb9621712010-04-24 17:59:49 +00008792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8793$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008794else
Matthias Kloseb9621712010-04-24 17:59:49 +00008795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8796$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008797fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008798else
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8800$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008801fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008802
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008803# The cast to long int works around a bug in the HP C Compiler
8804# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8805# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8806# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8808$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008809if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008811else
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008813#ifdef HAVE_SYS_TYPES_H
8814#include <sys/types.h>
8815#endif
8816#ifdef HAVE_TIME_H
8817#include <time.h>
8818#endif
8819
Matthias Kloseb9621712010-04-24 17:59:49 +00008820"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008821
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008822else
Matthias Kloseb9621712010-04-24 17:59:49 +00008823 if test "$ac_cv_type_time_t" = yes; then
8824 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8825$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008826as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008827See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008828 else
8829 ac_cv_sizeof_time_t=0
8830 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008831fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008832
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008834{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8835$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008836
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837
8838
Martin v. Löwis11437992002-04-12 09:54:03 +00008839cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008840#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008841_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008842
Michael W. Hudson54241132001-12-07 15:38:26 +00008843
8844
Trent Mick635f6fb2000-08-23 21:33:05 +00008845# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008846ac_save_cc="$CC"
8847if test "$ac_cv_kpthread" = "yes"
8848then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008849elif test "$ac_cv_kthread" = "yes"
8850then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008851elif test "$ac_cv_pthread" = "yes"
8852then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008853fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008854
Matthias Kloseb9621712010-04-24 17:59:49 +00008855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8856$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008857have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008860
8861 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008862int
8863main ()
8864{
Guido van Rossum12580492000-09-24 16:47:19 +00008865pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008866 ;
8867 return 0;
8868}
Matthias Kloseb159a552010-04-25 21:00:44 +00008869
Martin v. Löwis11437992002-04-12 09:54:03 +00008870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008871if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008872 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8876$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008877if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008878 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008879# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8880# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8881# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8883$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008884if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008886else
Matthias Kloseb9621712010-04-24 17:59:49 +00008887 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008888#ifdef HAVE_PTHREAD_H
8889#include <pthread.h>
8890#endif
8891
Matthias Kloseb9621712010-04-24 17:59:49 +00008892"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008893
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008894else
Matthias Kloseb9621712010-04-24 17:59:49 +00008895 if test "$ac_cv_type_pthread_t" = yes; then
8896 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8897$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008898as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008899See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008900 else
8901 ac_cv_sizeof_pthread_t=0
8902 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008904
Trent Mick635f6fb2000-08-23 21:33:05 +00008905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8907$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008908
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008909
8910
Martin v. Löwis11437992002-04-12 09:54:03 +00008911cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008912#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008913_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008914
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008915
Trent Mick635f6fb2000-08-23 21:33:05 +00008916fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008917CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008918
Michael W. Hudson54241132001-12-07 15:38:26 +00008919
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008920case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008921 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008922 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8923 ;;
8924 Darwin/*)
8925 OTHER_LIBTOOL_OPT=""
8926 ;;
8927esac
8928
8929
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008930
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008931case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008932 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008933 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8934 if test "${enable_universalsdk}"; then
8935 :
8936 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008937 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008938 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008939 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008940 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008941 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008942 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008943 if test ${gcc_version} '<' 4.0
8944 then
8945 LIBTOOL_CRUFT="-lcc_dynamic"
8946 else
8947 LIBTOOL_CRUFT=""
8948 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008949 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008950 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008951else
Matthias Kloseb9621712010-04-24 17:59:49 +00008952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008953/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008954
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008955 #include <unistd.h>
8956 int main(int argc, char*argv[])
8957 {
8958 if (sizeof(long) == 4) {
8959 return 0;
8960 } else {
8961 return 1;
8962 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008963 }
8964
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008966if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008967 ac_osx_32bit=yes
8968else
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8972 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008973fi
8974
8975
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008976 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008977 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008978 i386)
8979 MACOSX_DEFAULT_ARCH="i386"
8980 ;;
8981 ppc)
8982 MACOSX_DEFAULT_ARCH="ppc"
8983 ;;
8984 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008985 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008986 ;;
8987 esac
8988 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008989 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008990 i386)
8991 MACOSX_DEFAULT_ARCH="x86_64"
8992 ;;
8993 ppc)
8994 MACOSX_DEFAULT_ARCH="ppc64"
8995 ;;
8996 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008997 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008998 ;;
8999 esac
9000
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009001 fi
9002
9003 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009004 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009005 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009006esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9008$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009009if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009010then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009011 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009013 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009014
Matthias Kloseb9621712010-04-24 17:59:49 +00009015$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009016
Matthias Kloseb9621712010-04-24 17:59:49 +00009017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9018$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009019 if test $enable_shared = "yes"
9020 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009021 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 +00009022 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009023else
Matthias Kloseb9621712010-04-24 17:59:49 +00009024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9025$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009026fi
9027
Matthias Kloseb9621712010-04-24 17:59:49 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9029$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009030case $ac_sys_system/$ac_sys_release in
9031 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009032
Matthias Kloseb9621712010-04-24 17:59:49 +00009033$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009034
Matthias Kloseb9621712010-04-24 17:59:49 +00009035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9036$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009037 ;;
9038 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9040$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009041 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009042esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009043
Guido van Rossum0a516c91994-09-12 10:58:40 +00009044# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009045
Michael W. Hudson54241132001-12-07 15:38:26 +00009046
9047
9048
9049
Benjamin Peterson99f03762010-04-11 22:15:28 +00009050
Thomas Wouters477c8d52006-05-27 19:21:47 +00009051
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009052# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9053# -- usually .so, .sl on HP-UX, .dll on Cygwin
9054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9055$as_echo_n "checking the extension of shared libraries... " >&6; }
9056if test -z "$SHLIB_SUFFIX"; then
9057 case $ac_sys_system in
9058 hp*|HP*)
9059 case `uname -m` in
9060 ia64) SHLIB_SUFFIX=.so;;
9061 *) SHLIB_SUFFIX=.sl;;
9062 esac
9063 ;;
9064 CYGWIN*) SHLIB_SUFFIX=.dll;;
9065 *) SHLIB_SUFFIX=.so;;
9066 esac
9067fi
9068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9069$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009070
Guido van Rossum0a516c91994-09-12 10:58:40 +00009071# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009072# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009073# (Shared libraries in this instance are shared modules to be loaded into
9074# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9076$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009077if test -z "$LDSHARED"
9078then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009079 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009080 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00009081 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009082 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009083 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009084 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009085 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009087 if test "$GCC" = "yes" ; then
9088 LDSHARED='$(CC) -shared'
9089 LDCXXSHARED='$(CXX) -shared'
9090 else
9091 LDSHARED='$(CC) -G'
9092 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009093 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009094 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009095 if test "$GCC" = "yes" ; then
9096 LDSHARED='$(CC) -shared'
9097 LDCXXSHARED='$(CXX) -shared'
9098 else
9099 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009100 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009101 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009102 LDSHARED='$(CC) -bundle'
9103 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009104 if test "$enable_framework" ; then
9105 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009106 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9107 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009108 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009109 else
9110 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009111 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009112 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009113 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009114 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009115 LDSHARED='$(CC) -bundle'
9116 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009117 if test "$enable_framework" ; then
9118 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009119 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9120 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009121 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009122 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009123 # No framework, use the Python app as bundle-loader
9124 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009125 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009126 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009127 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009128 Darwin/*)
9129 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9130 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009131
Ned Deily36820b62014-06-25 13:44:22 -07009132 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9133 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9134 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9135 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9136 if test ${dep_target_major} -eq 10 && \
9137 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009138 then
Ned Deily36820b62014-06-25 13:44:22 -07009139 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009140 LDSHARED='$(CC) -bundle'
9141 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009142 if test "$enable_framework" ; then
9143 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009144 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9145 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009146 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009147 else
9148 # No framework, use the Python app as bundle-loader
9149 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9150 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009151 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009152 fi
Ned Deily36820b62014-06-25 13:44:22 -07009153 else
9154 # building for OS X 10.3 and later
9155 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9156 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9157 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009158 fi
9159 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009160 Linux*|GNU*|QNX*)
9161 LDSHARED='$(CC) -shared'
9162 LDCXXSHARED='$(CXX) -shared';;
9163 BSD/OS*/4*)
9164 LDSHARED="gcc -shared"
9165 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009166 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009167 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009168 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009169 LDSHARED='$(CC) -shared'
9170 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009171 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009172 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009173 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009174 OpenBSD*)
9175 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9176 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009177 LDSHARED='$(CC) -shared $(CCSHARED)'
9178 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009179 else
9180 case `uname -r` in
9181 [01].* | 2.[0-7] | 2.[0-7].*)
9182 LDSHARED="ld -Bshareable ${LDFLAGS}"
9183 ;;
9184 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009185 LDSHARED='$(CC) -shared $(CCSHARED)'
9186 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009187 ;;
9188 esac
9189 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009190 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009191 LDSHARED='$(CC) -shared'
9192 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009193 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009194 if test "$GCC" = "yes" ; then
9195 LDSHARED='$(CC) -shared'
9196 LDCXXSHARED='$(CXX) -shared'
9197 else
9198 LDSHARED='$(CC) -G'
9199 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009200 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009201 SCO_SV*)
9202 LDSHARED='$(CC) -Wl,-G,-Bexport'
9203 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9204 CYGWIN*)
9205 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9206 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009207 *) LDSHARED="ld";;
9208 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9211$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009212LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009213BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009214# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009215# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9217$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009218if test -z "$CCSHARED"
9219then
Guido van Rossum07397971997-04-29 21:49:50 +00009220 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009221 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009222 then CCSHARED="-fPIC";
9223 elif test `uname -p` = sparc;
9224 then CCSHARED="-xcode=pic32";
9225 else CCSHARED="-Kpic";
9226 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009227 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009228 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009229 else CCSHARED="+z";
9230 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009231 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009232 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009233 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009234 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009235 if test "$GCC" = "yes"
9236 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009237 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009238 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009239 SCO_SV*)
9240 if test "$GCC" = "yes"
9241 then CCSHARED="-fPIC"
9242 else CCSHARED="-Kpic -belf"
9243 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009244 IRIX*/6*) case $CC in
9245 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009246 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009247 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009248 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9251$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009252# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009253# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9255$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009256if test -z "$LINKFORSHARED"
9257then
Guido van Rossum07397971997-04-29 21:49:50 +00009258 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009259 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009260 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009261 LINKFORSHARED="-Wl,-E -Wl,+s";;
9262# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009263 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009264 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009265 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009267 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009268
9269 # Issue #18075: the default maximum stack size (8MBytes) is too
9270 # small for the default recursion limit. Increase the stack size
9271 # to ensure that tests don't crash
9272 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9273
Jack Jansene578a632001-08-15 01:27:14 +00009274 if test "$enable_framework"
9275 then
Jack Jansenda49e192005-01-07 13:08:22 +00009276 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009277 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009278 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009279 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009280 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009281 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009282 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009283 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9284 then
9285 LINKFORSHARED="-Wl,--export-dynamic"
9286 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009287 SunOS/5*) case $CC in
9288 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009289 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009290 then
9291 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009292 fi;;
9293 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009294 CYGWIN*)
9295 if test $enable_shared = "no"
9296 then
9297 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9298 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009299 QNX*)
9300 # -Wl,-E causes the symbols to be added to the dynamic
9301 # symbol table so that they can be found when a module
9302 # is loaded. -N 2048K causes the stack size to be set
9303 # to 2048 kilobytes so that the stack doesn't overflow
9304 # when running test_compile.py.
9305 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009306 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009307fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9309$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009310
Michael W. Hudson54241132001-12-07 15:38:26 +00009311
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009312
Matthias Kloseb9621712010-04-24 17:59:49 +00009313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9314$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009315if test ! "$LIBRARY" = "$LDLIBRARY"
9316then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009317 case $ac_sys_system in
9318 CYGWIN*)
9319 # Cygwin needs CCSHARED when building extension DLLs
9320 # but not when building the interpreter DLL.
9321 CFLAGSFORSHARED='';;
9322 *)
9323 CFLAGSFORSHARED='$(CCSHARED)'
9324 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9327$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009328
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009329# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9330# library (with --enable-shared).
9331# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009332# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9333# if it is not required, since it creates a dependency of the shared library
9334# to LIBS. This, in turn, means that applications linking the shared libpython
9335# don't need to link LIBS explicitly. The default should be only changed
9336# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009337
Matthias Kloseb9621712010-04-24 17:59:49 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9339$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009340case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009341 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009342 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009343esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9345$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009346
9347
Guido van Rossum627b2d71993-12-24 10:39:16 +00009348# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9350$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009351if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009352 $as_echo_n "(cached) " >&6
9353else
9354 ac_check_lib_save_LIBS=$LIBS
9355LIBS="-lsendfile $LIBS"
9356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9357/* end confdefs.h. */
9358
9359/* Override any GCC internal prototype to avoid an error.
9360 Use char because int might match the return type of a GCC
9361 builtin and then its argument prototype would still apply. */
9362#ifdef __cplusplus
9363extern "C"
9364#endif
9365char sendfile ();
9366int
9367main ()
9368{
9369return sendfile ();
9370 ;
9371 return 0;
9372}
9373_ACEOF
9374if ac_fn_c_try_link "$LINENO"; then :
9375 ac_cv_lib_sendfile_sendfile=yes
9376else
9377 ac_cv_lib_sendfile_sendfile=no
9378fi
9379rm -f core conftest.err conftest.$ac_objext \
9380 conftest$ac_exeext conftest.$ac_ext
9381LIBS=$ac_check_lib_save_LIBS
9382fi
9383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9384$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009385if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009386 cat >>confdefs.h <<_ACEOF
9387#define HAVE_LIBSENDFILE 1
9388_ACEOF
9389
9390 LIBS="-lsendfile $LIBS"
9391
9392fi
9393
Matthias Kloseb9621712010-04-24 17:59:49 +00009394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9395$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009396if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009397 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009398else
Martin v. Löwis11437992002-04-12 09:54:03 +00009399 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009400LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009402/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009403
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404/* Override any GCC internal prototype to avoid an error.
9405 Use char because int might match the return type of a GCC
9406 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009407#ifdef __cplusplus
9408extern "C"
9409#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009410char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009411int
9412main ()
9413{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 ;
9416 return 0;
9417}
9418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009419if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009420 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009421else
Matthias Kloseb9621712010-04-24 17:59:49 +00009422 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009423fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009424rm -f core conftest.err conftest.$ac_objext \
9425 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009426LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009427fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9429$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009430if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 cat >>confdefs.h <<_ACEOF
9432#define HAVE_LIBDL 1
9433_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009434
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009435 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009437fi
9438 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9440$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009441if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009443else
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009445LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009446cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009448
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009449/* Override any GCC internal prototype to avoid an error.
9450 Use char because int might match the return type of a GCC
9451 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009452#ifdef __cplusplus
9453extern "C"
9454#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009455char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009456int
9457main ()
9458{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009460 ;
9461 return 0;
9462}
9463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009464if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009465 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009466else
Matthias Kloseb9621712010-04-24 17:59:49 +00009467 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009468fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009469rm -f core conftest.err conftest.$ac_objext \
9470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009471LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9474$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009475if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 cat >>confdefs.h <<_ACEOF
9477#define HAVE_LIBDLD 1
9478_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009479
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009480 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009481
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009482fi
9483 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009484
Georg Brandlb1441c72009-01-03 22:33:39 +00009485# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009486if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9488$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009489if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009490 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009491else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009492 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009494/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009495
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496/* Override any GCC internal prototype to avoid an error.
9497 Use char because int might match the return type of a GCC
9498 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009499#ifdef __cplusplus
9500extern "C"
9501#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009502char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009503int
9504main ()
9505{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009507 ;
9508 return 0;
9509}
9510_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511for ac_lib in '' pthread rt posix4; do
9512 if test -z "$ac_lib"; then
9513 ac_res="none required"
9514 else
9515 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009516 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009517 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009518 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009521rm -f core conftest.err conftest.$ac_objext \
9522 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009523 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009524 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526done
Victor Stinnere0be4232011-10-25 13:06:09 +02009527if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009528
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529else
9530 ac_cv_search_sem_init=no
9531fi
9532rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009533LIBS=$ac_func_search_save_LIBS
9534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9536$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009538if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009540
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009541fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009542 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009543 # posix4 on Solaris 2.6
9544 # pthread (first!) on Linux
9545fi
9546
Martin v. Löwis19d17342003-06-14 21:03:05 +00009547# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9549$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009550if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009551 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009552else
9553 ac_check_lib_save_LIBS=$LIBS
9554LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009556/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558/* Override any GCC internal prototype to avoid an error.
9559 Use char because int might match the return type of a GCC
9560 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009561#ifdef __cplusplus
9562extern "C"
9563#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009564char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009565int
9566main ()
9567{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009569 ;
9570 return 0;
9571}
9572_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009573if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009574 ac_cv_lib_intl_textdomain=yes
9575else
Matthias Kloseb9621712010-04-24 17:59:49 +00009576 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009577fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009578rm -f core conftest.err conftest.$ac_objext \
9579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009580LIBS=$ac_check_lib_save_LIBS
9581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9583$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009584if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009585
Matthias Kloseb9621712010-04-24 17:59:49 +00009586$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009587
Brett Cannonc6d936e2009-06-07 20:09:53 +00009588 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009589fi
9590
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009591
9592# checks for system dependent C++ extensions support
9593case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009594 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9595$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009597/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009598
Georg Brandl59e87bd2011-02-15 19:48:59 +00009599 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009600int
9601main ()
9602{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009603loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009604 ;
9605 return 0;
9606}
Matthias Kloseb159a552010-04-25 21:00:44 +00009607
Martin v. Löwis11437992002-04-12 09:54:03 +00009608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009609if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009610
Matthias Kloseb159a552010-04-25 21:00:44 +00009611
Matthias Kloseb9621712010-04-24 17:59:49 +00009612$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009613
Matthias Kloseb159a552010-04-25 21:00:44 +00009614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009615$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009616
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009617else
Matthias Kloseb159a552010-04-25 21:00:44 +00009618
9619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009620$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009621
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009622fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009623rm -f core conftest.err conftest.$ac_objext \
9624 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009625 *) ;;
9626esac
9627
Christian Heimes985ecdc2013-11-20 11:46:18 +01009628# check for systems that require aligned memory access
9629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9630$as_echo_n "checking aligned memory access is required... " >&6; }
9631if test "$cross_compiling" = yes; then :
9632 aligned_required=yes
9633else
9634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9635/* end confdefs.h. */
9636
9637int main()
9638{
9639 char s[16];
9640 int i, *p1, *p2;
9641 for (i=0; i < 16; i++)
9642 s[i] = i;
9643 p1 = (int*)(s+1);
9644 p2 = (int*)(s+2);
9645 if (*p1 == *p2)
9646 return 1;
9647 return 0;
9648}
9649
9650_ACEOF
9651if ac_fn_c_try_run "$LINENO"; then :
9652 aligned_required=no
9653else
9654 aligned_required=yes
9655fi
9656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9657 conftest.$ac_objext conftest.beam conftest.$ac_ext
9658fi
9659
9660
9661if test "$aligned_required" = yes ; then
9662
9663$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9664
9665fi
9666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9667$as_echo "$aligned_required" >&6; }
9668
9669
9670# str, bytes and memoryview hash algorithm
9671
9672
9673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9674$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9675
9676# Check whether --with-hash_algorithm was given.
9677if test "${with_hash_algorithm+set}" = set; then :
9678 withval=$with_hash_algorithm;
9679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9680$as_echo "$withval" >&6; }
9681case "$withval" in
9682 siphash24)
9683 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9684
9685 ;;
9686 fnv)
9687 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9688
9689 ;;
9690 *)
9691 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9692 ;;
9693esac
9694
9695else
9696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9697$as_echo "default" >&6; }
9698fi
9699
9700
Charles-François Natalid30b0222014-05-08 23:08:51 +01009701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9702$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9703
9704# Check whether --with-address_sanitizer was given.
9705if test "${with_address_sanitizer+set}" = set; then :
9706 withval=$with_address_sanitizer;
9707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9708$as_echo "$withval" >&6; }
9709BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9710LDFLAGS="-fsanitize=address $LDFLAGS"
9711
9712else
9713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9714$as_echo "no" >&6; }
9715fi
9716
9717
Guido van Rossum70c7f481998-03-26 18:44:10 +00009718# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9720$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009721if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009723else
Martin v. Löwis11437992002-04-12 09:54:03 +00009724 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009725LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009729/* Override any GCC internal prototype to avoid an error.
9730 Use char because int might match the return type of a GCC
9731 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009732#ifdef __cplusplus
9733extern "C"
9734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009735char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009736int
9737main ()
9738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009739return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ;
9741 return 0;
9742}
9743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009744if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009746else
Matthias Kloseb9621712010-04-24 17:59:49 +00009747 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009749rm -f core conftest.err conftest.$ac_objext \
9750 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009751LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009752fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9754$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009755if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009756 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009757fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009758 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9760$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009761if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009762 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009763else
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009765LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769/* Override any GCC internal prototype to avoid an error.
9770 Use char because int might match the return type of a GCC
9771 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009772#ifdef __cplusplus
9773extern "C"
9774#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009775char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009776int
9777main ()
9778{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009779return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009780 ;
9781 return 0;
9782}
9783_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009784if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009785 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009786else
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009789rm -f core conftest.err conftest.$ac_objext \
9790 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009791LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009792fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9794$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009795if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009796 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009797fi
9798 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009799
Matthias Kloseb9621712010-04-24 17:59:49 +00009800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9801$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009803# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009804if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9807$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009808LIBS="$withval $LIBS"
9809
9810else
Matthias Kloseb9621712010-04-24 17:59:49 +00009811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9812$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009813fi
9814
Guido van Rossum7f43da71994-08-01 12:15:30 +00009815
Victor Stinner8291b5e2015-03-20 16:03:14 +01009816
9817
9818
9819
9820
9821
9822
9823if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9824 if test -n "$ac_tool_prefix"; then
9825 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9826set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9828$as_echo_n "checking for $ac_word... " >&6; }
9829if ${ac_cv_path_PKG_CONFIG+:} false; then :
9830 $as_echo_n "(cached) " >&6
9831else
9832 case $PKG_CONFIG in
9833 [\\/]* | ?:[\\/]*)
9834 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9835 ;;
9836 *)
9837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9838for as_dir in $PATH
9839do
9840 IFS=$as_save_IFS
9841 test -z "$as_dir" && as_dir=.
9842 for ac_exec_ext in '' $ac_executable_extensions; do
9843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9844 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9846 break 2
9847 fi
9848done
9849 done
9850IFS=$as_save_IFS
9851
9852 ;;
9853esac
9854fi
9855PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9856if test -n "$PKG_CONFIG"; then
9857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9858$as_echo "$PKG_CONFIG" >&6; }
9859else
9860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9861$as_echo "no" >&6; }
9862fi
9863
9864
9865fi
9866if test -z "$ac_cv_path_PKG_CONFIG"; then
9867 ac_pt_PKG_CONFIG=$PKG_CONFIG
9868 # Extract the first word of "pkg-config", so it can be a program name with args.
9869set dummy pkg-config; ac_word=$2
9870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9871$as_echo_n "checking for $ac_word... " >&6; }
9872if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9873 $as_echo_n "(cached) " >&6
9874else
9875 case $ac_pt_PKG_CONFIG in
9876 [\\/]* | ?:[\\/]*)
9877 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9878 ;;
9879 *)
9880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9881for as_dir in $PATH
9882do
9883 IFS=$as_save_IFS
9884 test -z "$as_dir" && as_dir=.
9885 for ac_exec_ext in '' $ac_executable_extensions; do
9886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9887 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9889 break 2
9890 fi
9891done
9892 done
9893IFS=$as_save_IFS
9894
9895 ;;
9896esac
9897fi
9898ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9899if test -n "$ac_pt_PKG_CONFIG"; then
9900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9901$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9902else
9903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904$as_echo "no" >&6; }
9905fi
9906
9907 if test "x$ac_pt_PKG_CONFIG" = x; then
9908 PKG_CONFIG=""
9909 else
9910 case $cross_compiling:$ac_tool_warned in
9911yes:)
9912{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9913$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9914ac_tool_warned=yes ;;
9915esac
9916 PKG_CONFIG=$ac_pt_PKG_CONFIG
9917 fi
9918else
9919 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9920fi
9921
9922fi
9923if test -n "$PKG_CONFIG"; then
9924 _pkg_min_version=0.9.0
9925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9926$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9927 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9929$as_echo "yes" >&6; }
9930 else
9931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9932$as_echo "no" >&6; }
9933 PKG_CONFIG=""
9934 fi
9935fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009936
9937# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9939$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009940
9941# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009942if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009943 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009944else
9945 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009946fi
9947
9948
Matthias Kloseb9621712010-04-24 17:59:49 +00009949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9950$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009951
9952# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9954$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009955
9956# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009957if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009958 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009959else
9960 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009961fi
9962
9963
9964if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009965 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9966else
9967 LIBFFI_INCLUDEDIR=""
9968fi
9969
9970
Matthias Kloseb9621712010-04-24 17:59:49 +00009971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9972$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009973
Stefan Krah60187b52012-03-23 19:06:27 +01009974# Check for use of the system libmpdec library
9975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9976$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9977
9978# Check whether --with-system_libmpdec was given.
9979if test "${with_system_libmpdec+set}" = set; then :
9980 withval=$with_system_libmpdec;
9981else
9982 with_system_libmpdec="no"
9983fi
9984
9985
9986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9987$as_echo "$with_system_libmpdec" >&6; }
9988
Benjamin Peterson076ed002010-10-31 17:11:02 +00009989# Check for support for loadable sqlite extensions
9990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9991$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9992# Check whether --enable-loadable-sqlite-extensions was given.
9993if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9994 enableval=$enable_loadable_sqlite_extensions;
9995else
9996 enable_loadable_sqlite_extensions="no"
9997fi
9998
9999
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10001$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10002
Ned Deilyd819b932013-09-06 01:07:05 -070010003# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10004
10005
10006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10007$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10008
10009# Check whether --with-tcltk-includes was given.
10010if test "${with_tcltk_includes+set}" = set; then :
10011 withval=$with_tcltk_includes;
10012else
10013 with_tcltk_includes="default"
10014fi
10015
10016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10017$as_echo "$with_tcltk_includes" >&6; }
10018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10019$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10020
10021# Check whether --with-tcltk-libs was given.
10022if test "${with_tcltk_libs+set}" = set; then :
10023 withval=$with_tcltk_libs;
10024else
10025 with_tcltk_libs="default"
10026fi
10027
10028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10029$as_echo "$with_tcltk_libs" >&6; }
10030if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10031then
10032 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10033 then
10034 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10035 fi
10036 TCLTK_INCLUDES=""
10037 TCLTK_LIBS=""
10038else
10039 TCLTK_INCLUDES="$with_tcltk_includes"
10040 TCLTK_LIBS="$with_tcltk_libs"
10041fi
10042
Matthias Klose55708cc2009-04-30 08:06:49 +000010043# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10045$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010046
10047# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010048if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010049 withval=$with_dbmliborder;
10050if test x$with_dbmliborder = xyes
10051then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010052as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010053else
10054 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10055 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10056 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010057 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010058 fi
10059 done
10060fi
10061fi
10062
Matthias Kloseb9621712010-04-24 17:59:49 +000010063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10064$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010065
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010066# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010067
10068
Matthias Kloseb9621712010-04-24 17:59:49 +000010069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
10070$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010071
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010072# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010073if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074 withval=$with_signal_module;
10075fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010076
10077
10078if test -z "$with_signal_module"
10079then with_signal_module="yes"
10080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
10082$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010083
10084if test "${with_signal_module}" = "yes"; then
10085 USE_SIGNAL_MODULE=""
10086 SIGNAL_OBJS=""
10087else
10088 USE_SIGNAL_MODULE="#"
10089 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10090fi
10091
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010092# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010093
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010094USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010096
Martin v. Löwis11437992002-04-12 09:54:03 +000010097
10098# Templates for things AC_DEFINEd more than once.
10099# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010100
10101
Martin v. Löwis11437992002-04-12 09:54:03 +000010102
Matthias Kloseb9621712010-04-24 17:59:49 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10104$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010107if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108 withval=$with_threads;
10109fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010110
10111
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010112# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010113
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010114# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010115if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010116 withval=$with_thread; with_threads=$with_thread
10117fi
10118
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010119
10120if test -z "$with_threads"
10121then with_threads="yes"
10122fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10124$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010125
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010126
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010127if test "$with_threads" = "no"
10128then
10129 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010130elif test "$ac_cv_pthread_is_default" = yes
10131then
Matthias Kloseb9621712010-04-24 17:59:49 +000010132 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010133
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010134 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010135 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010136
10137 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010138 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010139elif test "$ac_cv_kpthread" = "yes"
10140then
10141 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010142 if test "$ac_cv_cxx_thread" = "yes"; then
10143 CXX="$CXX -Kpthread"
10144 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010145 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010146
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010147 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010148 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010149elif test "$ac_cv_kthread" = "yes"
10150then
10151 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010152 if test "$ac_cv_cxx_thread" = "yes"; then
10153 CXX="$CXX -Kthread"
10154 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010155 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010156
10157 posix_threads=yes
10158 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010159elif test "$ac_cv_pthread" = "yes"
10160then
10161 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010162 if test "$ac_cv_cxx_thread" = "yes"; then
10163 CXX="$CXX -pthread"
10164 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010165 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010166
10167 posix_threads=yes
10168 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010169else
10170 if test ! -z "$with_threads" -a -d "$with_threads"
10171 then LDFLAGS="$LDFLAGS -L$with_threads"
10172 fi
10173 if test ! -z "$withval" -a -d "$withval"
10174 then LDFLAGS="$LDFLAGS -L$withval"
10175 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010176
10177 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010178 # define _POSIX_THREADS in unistd.h. Some apparently don't
10179 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10181$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010183/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010184
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010185#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010186#ifdef _POSIX_THREADS
10187yes
10188#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010189
10190_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010191if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010192 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010193 unistd_defines_pthreads=yes
10194else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010195 unistd_defines_pthreads=no
10196fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010197rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010198
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10200$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010201
Matthias Kloseb9621712010-04-24 17:59:49 +000010202 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010203
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010204 # Just looking for pthread_create in libpthread is not enough:
10205 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10206 # So we really have to include pthread.h, and then link.
10207 _libs=$LIBS
10208 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10210$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010212/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010213
10214#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010215#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010216
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010217void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010218int
10219main ()
10220{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010221
10222pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 ;
10224 return 0;
10225}
10226_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010227if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010228
Matthias Kloseb9621712010-04-24 17:59:49 +000010229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10230$as_echo "yes" >&6; }
10231 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010232
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010233 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010234 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010235else
Martin v. Löwis11437992002-04-12 09:54:03 +000010236
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010237 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010239if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010240 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010241
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010242 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010243 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010244else
Guido van Rossumad678af1998-10-02 14:42:15 +000010245
Matthias Kloseb9621712010-04-24 17:59:49 +000010246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10247$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010248if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010249 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010250else
Martin v. Löwis11437992002-04-12 09:54:03 +000010251 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010252LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010253cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256/* Override any GCC internal prototype to avoid an error.
10257 Use char because int might match the return type of a GCC
10258 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010259#ifdef __cplusplus
10260extern "C"
10261#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010262char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010263int
10264main ()
10265{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010266return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010267 ;
10268 return 0;
10269}
10270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010271if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010272 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010273else
Matthias Kloseb9621712010-04-24 17:59:49 +000010274 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010276rm -f core conftest.err conftest.$ac_objext \
10277 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010278LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10281$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010282if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010283 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010284
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010285 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010286 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010287 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010288else
Greg Steinadf63d62000-07-05 10:38:09 +000010289
Matthias Kloseb9621712010-04-24 17:59:49 +000010290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10291$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010292if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010294else
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010296LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010298/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010300/* Override any GCC internal prototype to avoid an error.
10301 Use char because int might match the return type of a GCC
10302 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010303#ifdef __cplusplus
10304extern "C"
10305#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010306char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010307int
10308main ()
10309{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010310return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010311 ;
10312 return 0;
10313}
10314_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010315if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010316 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010317else
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010320rm -f core conftest.err conftest.$ac_objext \
10321 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010322LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010324{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10325$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010326if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010327 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010328
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010329 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010330 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010331 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010332else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010333
Matthias Kloseb9621712010-04-24 17:59:49 +000010334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10335$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010336if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010337 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010338else
Martin v. Löwis11437992002-04-12 09:54:03 +000010339 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010340LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010343
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010344/* Override any GCC internal prototype to avoid an error.
10345 Use char because int might match the return type of a GCC
10346 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010347#ifdef __cplusplus
10348extern "C"
10349#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010350char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010351int
10352main ()
10353{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010354return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010355 ;
10356 return 0;
10357}
10358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010359if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010361else
Matthias Kloseb9621712010-04-24 17:59:49 +000010362 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010364rm -f core conftest.err conftest.$ac_objext \
10365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010366LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010367fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10369$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010370if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010371 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010372
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010373 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010374 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010375 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010376else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010377
Matthias Kloseb9621712010-04-24 17:59:49 +000010378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10379$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010380if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010381 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010382else
Martin v. Löwis11437992002-04-12 09:54:03 +000010383 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010384LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010388/* Override any GCC internal prototype to avoid an error.
10389 Use char because int might match the return type of a GCC
10390 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010391#ifdef __cplusplus
10392extern "C"
10393#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010394char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010395int
10396main ()
10397{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010399 ;
10400 return 0;
10401}
10402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010403if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010405else
Matthias Kloseb9621712010-04-24 17:59:49 +000010406 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010407fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010408rm -f core conftest.err conftest.$ac_objext \
10409 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010410LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010411fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10413$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010414if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010415 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010416
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010417 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010418 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010419 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010420else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010421
Martin v. Löwis130fb172001-07-19 11:00:41 +000010422 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010423fi
10424
Guido van Rossum627b2d71993-12-24 10:39:16 +000010425
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010426fi
10427
Guido van Rossum0be3e491997-05-22 20:33:33 +000010428fi
10429
Guido van Rossum49545951997-12-02 19:28:29 +000010430fi
10431
Guido van Rossumb93a8621998-05-07 13:27:32 +000010432fi
10433
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010434fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010435rm -f core conftest.err conftest.$ac_objext \
10436 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010437
Matthias Kloseb9621712010-04-24 17:59:49 +000010438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10439$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010440if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010442else
Martin v. Löwis11437992002-04-12 09:54:03 +000010443 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010444LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010446/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010447
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010448/* Override any GCC internal prototype to avoid an error.
10449 Use char because int might match the return type of a GCC
10450 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010451#ifdef __cplusplus
10452extern "C"
10453#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010454char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010455int
10456main ()
10457{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 ;
10460 return 0;
10461}
10462_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010463if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010465else
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010467fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010468rm -f core conftest.err conftest.$ac_objext \
10469 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010470LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010471fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10473$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010474if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010475 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010476
Martin v. Löwis130fb172001-07-19 11:00:41 +000010477 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010478 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010479 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010480fi
10481
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010482
Neal Norwitza978ab02002-11-02 16:58:05 +000010483 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10485$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010486if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010487 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010488else
Martin v. Löwis11437992002-04-12 09:54:03 +000010489 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010490LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010494/* Override any GCC internal prototype to avoid an error.
10495 Use char because int might match the return type of a GCC
10496 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010497#ifdef __cplusplus
10498extern "C"
10499#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010500char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010501int
10502main ()
10503{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010504return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 ;
10506 return 0;
10507}
10508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010509if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010510 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010511else
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010513fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010514rm -f core conftest.err conftest.$ac_objext \
10515 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010516LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010517fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10519$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010520if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010522
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010523 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010524 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010525 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010526fi
10527
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010528 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010529fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010530
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010531if test "$posix_threads" = "yes"; then
10532 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010533
Matthias Kloseb9621712010-04-24 17:59:49 +000010534$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010535
10536 fi
10537
10538 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10539 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010540 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010541$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010542
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010543 ;;
10544 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010545$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010546
10547 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010548 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010549$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010550
10551 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010552 esac
10553
Matthias Kloseb9621712010-04-24 17:59:49 +000010554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10555$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010556 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010557 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010558else
Matthias Kloseb9621712010-04-24 17:59:49 +000010559 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010560 ac_cv_pthread_system_supported=no
10561else
Matthias Kloseb9621712010-04-24 17:59:49 +000010562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010563/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010564
10565 #include <stdio.h>
10566 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010567 void *foo(void *parm) {
10568 return NULL;
10569 }
10570 main() {
10571 pthread_attr_t attr;
10572 pthread_t id;
10573 if (pthread_attr_init(&attr)) exit(-1);
10574 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10575 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10576 exit(0);
10577 }
10578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010579if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010580 ac_cv_pthread_system_supported=yes
10581else
Matthias Kloseb9621712010-04-24 17:59:49 +000010582 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10585 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010586fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010588
Guido van Rossum627b2d71993-12-24 10:39:16 +000010589fi
10590
Matthias Kloseb9621712010-04-24 17:59:49 +000010591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10592$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010593 if test "$ac_cv_pthread_system_supported" = "yes"; then
10594
Matthias Kloseb9621712010-04-24 17:59:49 +000010595$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010596
10597 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 for ac_func in pthread_sigmask
10599do :
10600 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010601if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010602 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010603#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010604_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010605 case $ac_sys_system in
10606 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010607
Matthias Kloseb9621712010-04-24 17:59:49 +000010608$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010609
10610 ;;
10611 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010612fi
10613done
10614
Christian Heimesf77b4b22013-08-21 13:26:05 +020010615 for ac_func in pthread_atfork
10616do :
10617 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10618if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10619 cat >>confdefs.h <<_ACEOF
10620#define HAVE_PTHREAD_ATFORK 1
10621_ACEOF
10622
10623fi
10624done
10625
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010626fi
10627
10628
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010629# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010630
Matthias Kloseb9621712010-04-24 17:59:49 +000010631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10632$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010633# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010634if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010636 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10638$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010639 ipv6=no
10640 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010641 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10642$as_echo "yes" >&6; }
10643 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010644
10645 ipv6=yes
10646 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010647 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010648else
Martin v. Löwis11437992002-04-12 09:54:03 +000010649
Matthias Kloseb9621712010-04-24 17:59:49 +000010650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010651/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010652 /* AF_INET6 available check */
10653#include <sys/types.h>
10654#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010655int
10656main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010657{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010658int domain = AF_INET6;
10659 ;
10660 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010661}
Martin v. Löwis11437992002-04-12 09:54:03 +000010662_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010663if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010664
Matthias Kloseb9621712010-04-24 17:59:49 +000010665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10666$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010667 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010668
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010669else
Matthias Kloseb159a552010-04-25 21:00:44 +000010670
Matthias Kloseb9621712010-04-24 17:59:49 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10672$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010673 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010674
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010675fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010676rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010678if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10680$as_echo_n "checking if RFC2553 API is available... " >&6; }
10681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010682/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010683
10684 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010685#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010686int
10687main ()
10688{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010689struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010690 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010691 ;
10692 return 0;
10693}
Matthias Kloseb159a552010-04-25 21:00:44 +000010694
Martin v. Löwis11437992002-04-12 09:54:03 +000010695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010696if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010697
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010699$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010700 ipv6=yes
10701
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010702else
Matthias Kloseb159a552010-04-25 21:00:44 +000010703
10704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010705$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010706 ipv6=no
10707
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010710fi
10711
10712if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010714
10715fi
10716
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010717fi
10718
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010719
10720ipv6type=unknown
10721ipv6lib=none
10722ipv6trylibc=no
10723
10724if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10726$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010727 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10728 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010729 case $i in
10730 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010732/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010733
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734#include <netinet/in.h>
10735#ifdef IPV6_INRIA_VERSION
10736yes
10737#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010738_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010740 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010741 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010742fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010743rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010744
10745 ;;
10746 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010748/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010749
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010750#include <netinet/in.h>
10751#ifdef __KAME__
10752yes
10753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010754_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010756 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010757 ipv6type=$i;
10758 ipv6lib=inet6
10759 ipv6libdir=/usr/local/v6/lib
10760 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010762rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010763
10764 ;;
10765 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010767/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010768
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010769#include <features.h>
10770#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10771yes
10772#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010773_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010774if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010775 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010776 ipv6type=$i;
10777 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010778fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010779rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010780
10781 ;;
10782 linux-inet6)
10783 if test -d /usr/inet6; then
10784 ipv6type=$i
10785 ipv6lib=inet6
10786 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010787 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010788 fi
10789 ;;
10790 solaris)
10791 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010792 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010793 ipv6type=$i
10794 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010795 fi
10796 fi
10797 ;;
10798 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010800/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010801
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010802#include <sys/param.h>
10803#ifdef _TOSHIBA_INET6
10804yes
10805#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010806_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010808 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010809 ipv6type=$i;
10810 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010811 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010812fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010813rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010814
10815 ;;
10816 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010818/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010819
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820#include </usr/local/v6/include/sys/v6config.h>
10821#ifdef __V6D__
10822yes
10823#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010824_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010827 ipv6type=$i;
10828 ipv6lib=v6;
10829 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010830 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010831fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010832rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010833
10834 ;;
10835 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010837/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010838
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010839#include <sys/param.h>
10840#ifdef _ZETA_MINAMI_INET6
10841yes
10842#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010843_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010845 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010846 ipv6type=$i;
10847 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010848 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010850rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010851
10852 ;;
10853 esac
10854 if test "$ipv6type" != "unknown"; then
10855 break
10856 fi
10857 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10859$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860fi
10861
10862if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10863 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10864 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10865 echo "using lib$ipv6lib"
10866 else
10867 if test $ipv6trylibc = "yes"; then
10868 echo "using libc"
10869 else
10870 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10871 echo "You need to fetch lib$ipv6lib.a from appropriate"
10872 echo 'ipv6 kit and compile beforehand.'
10873 exit 1
10874 fi
10875 fi
10876fi
10877
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10879$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10881/* end confdefs.h. */
10882 /* CAN_RAW_FD_FRAMES available check */
10883#include <linux/can/raw.h>
10884int
10885main ()
10886{
10887int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10888 ;
10889 return 0;
10890}
10891_ACEOF
10892if ac_fn_c_try_compile "$LINENO"; then :
10893
10894
10895$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10896
10897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10898$as_echo "yes" >&6; }
10899
10900else
10901
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10903$as_echo "no" >&6; }
10904
10905fi
10906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10907
Matthias Kloseb9621712010-04-24 17:59:49 +000010908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10909$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010911/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010912
10913 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010914int
10915main ()
10916{
10917FSIORefNum fRef = 0
10918 ;
10919 return 0;
10920}
Matthias Kloseb159a552010-04-25 21:00:44 +000010921
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010923if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010924
Matthias Kloseb159a552010-04-25 21:00:44 +000010925
Matthias Kloseb9621712010-04-24 17:59:49 +000010926$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010927
Matthias Kloseb9621712010-04-24 17:59:49 +000010928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10929$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010930
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010931else
Matthias Kloseb159a552010-04-25 21:00:44 +000010932
Matthias Kloseb9621712010-04-24 17:59:49 +000010933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10934$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010935
10936fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10938
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010939# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10941$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010943# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010944if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010945 withval=$with_doc_strings;
10946fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010947
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010948
10949if test -z "$with_doc_strings"
10950then with_doc_strings="yes"
10951fi
10952if test "$with_doc_strings" != "no"
10953then
10954
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010956
10957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10959$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010960
Antoine Pitrou042b1282010-08-13 21:15:58 +000010961# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10963$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010966if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010967 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010968if test "$withval" != no
10969then
10970
Matthias Kloseb9621712010-04-24 17:59:49 +000010971$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10974$as_echo "yes" >&6; }
10975else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10976$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010977fi
10978else
Matthias Kloseb9621712010-04-24 17:59:49 +000010979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10980$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010981fi
10982
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010983
10984# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10986$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010988# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010989if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990 withval=$with_pymalloc;
10991fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010992
Neil Schemenauera35c6882001-02-27 04:45:05 +000010993
Neil Schemenauer16c22972002-03-22 15:34:49 +000010994if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010995then
10996 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010997fi
10998if test "$with_pymalloc" != "no"
10999then
Martin v. Löwis11437992002-04-12 09:54:03 +000011000
Matthias Kloseb9621712010-04-24 17:59:49 +000011001$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011002
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011003 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011004fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11006$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011007
Benjamin Peterson05159c42009-12-03 03:01:27 +000011008# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11010$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011011
11012# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011013if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011014 withval=$with_valgrind;
11015else
11016 with_valgrind=no
11017fi
11018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11020$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011021if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 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 +020011023if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011024
Matthias Kloseb9621712010-04-24 17:59:49 +000011025$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011026
11027else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011028 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011029
11030fi
11031
11032
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011033 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011034fi
11035
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011036# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011037
Guido van Rossum98935bf2001-09-05 19:13:16 +000011038DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011039
Guido van Rossume97ee181999-12-20 21:27:22 +000011040# the dlopen() function means we might want to use dynload_shlib.o. some
11041# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011042for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011043do :
11044 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011045if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011046 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011047#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011048_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011049
Guido van Rossume97ee181999-12-20 21:27:22 +000011050fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011051done
Guido van Rossume97ee181999-12-20 21:27:22 +000011052
Michael W. Hudson54241132001-12-07 15:38:26 +000011053
Guido van Rossume97ee181999-12-20 21:27:22 +000011054# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11055# loading of modules.
11056
Matthias Kloseb9621712010-04-24 17:59:49 +000011057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11058$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011059if test -z "$DYNLOADFILE"
11060then
11061 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011062 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11063 if test "$ac_cv_func_dlopen" = yes
11064 then DYNLOADFILE="dynload_shlib.o"
11065 else DYNLOADFILE="dynload_aix.o"
11066 fi
11067 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011068 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011069 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11070 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011071 *)
11072 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11073 # out any dynamic loading
11074 if test "$ac_cv_func_dlopen" = yes
11075 then DYNLOADFILE="dynload_shlib.o"
11076 else DYNLOADFILE="dynload_stub.o"
11077 fi
11078 ;;
11079 esac
11080fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11082$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011083if test "$DYNLOADFILE" != "dynload_stub.o"
11084then
Martin v. Löwis11437992002-04-12 09:54:03 +000011085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011087
11088fi
11089
Neil Schemenauer4e425612001-06-19 15:44:15 +000011090# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11091
Michael W. Hudson54241132001-12-07 15:38:26 +000011092
Matthias Kloseb9621712010-04-24 17:59:49 +000011093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11094$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011095if test -z "$MACHDEP_OBJS"
11096then
Jack Jansene578a632001-08-15 01:27:14 +000011097 MACHDEP_OBJS=$extra_machdep_objs
11098else
11099 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011100fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011101if test -z "$MACHDEP_OBJS"; then
11102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11103$as_echo "none" >&6; }
11104else
11105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11106$as_echo "$MACHDEP_OBJS" >&6; }
11107fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011108
Guido van Rossum627b2d71993-12-24 10:39:16 +000011109# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011110for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011111 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011112 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011113 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011114 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011115 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070011116 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011117 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
11118 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011119 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011120 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011121 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011122 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011123 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011124 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011125 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11126 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011127 sigaction sigaltstack siginterrupt sigpending sigrelse \
11128 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011129 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011130 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011131 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011132do :
11133 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11134ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011135if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011136 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011137#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011138_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011139
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011140fi
11141done
11142
Michael W. Hudson54241132001-12-07 15:38:26 +000011143
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011144ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11145 #include <dirent.h>
11146"
11147if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11148
11149$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11150
11151fi
11152
11153
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011154# For some functions, having a definition is not sufficient, since
11155# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11157$as_echo_n "checking for chroot... " >&6; }
11158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011159/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011160#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011161int
11162main ()
11163{
11164void *x=chroot
11165 ;
11166 return 0;
11167}
11168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011172
Matthias Kloseb159a552010-04-25 21:00:44 +000011173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011174$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011175else
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11177$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011178
11179fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11182$as_echo_n "checking for link... " >&6; }
11183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011184/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011185#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011186int
11187main ()
11188{
11189void *x=link
11190 ;
11191 return 0;
11192}
11193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011194if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011195
Matthias Kloseb9621712010-04-24 17:59:49 +000011196$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011197
Matthias Kloseb159a552010-04-25 21:00:44 +000011198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011199$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011200else
Matthias Kloseb9621712010-04-24 17:59:49 +000011201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11202$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011203
11204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11207$as_echo_n "checking for symlink... " >&6; }
11208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011209/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011210#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011211int
11212main ()
11213{
11214void *x=symlink
11215 ;
11216 return 0;
11217}
11218_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011219if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011222
Matthias Kloseb159a552010-04-25 21:00:44 +000011223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011224$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011225else
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11227$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011228
11229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11232$as_echo_n "checking for fchdir... " >&6; }
11233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011235#include <unistd.h>
11236int
11237main ()
11238{
11239void *x=fchdir
11240 ;
11241 return 0;
11242}
11243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011244if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011245
Matthias Kloseb9621712010-04-24 17:59:49 +000011246$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011247
Matthias Kloseb159a552010-04-25 21:00:44 +000011248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011249$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011250else
Matthias Kloseb9621712010-04-24 17:59:49 +000011251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11252$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011253
11254fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11257$as_echo_n "checking for fsync... " >&6; }
11258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011259/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011260#include <unistd.h>
11261int
11262main ()
11263{
11264void *x=fsync
11265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011270
Matthias Kloseb9621712010-04-24 17:59:49 +000011271$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011272
Matthias Kloseb159a552010-04-25 21:00:44 +000011273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011274$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011275else
Matthias Kloseb9621712010-04-24 17:59:49 +000011276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11277$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011278
11279fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11282$as_echo_n "checking for fdatasync... " >&6; }
11283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011284/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011285#include <unistd.h>
11286int
11287main ()
11288{
11289void *x=fdatasync
11290 ;
11291 return 0;
11292}
11293_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011294if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011295
Matthias Kloseb9621712010-04-24 17:59:49 +000011296$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011297
Matthias Kloseb159a552010-04-25 21:00:44 +000011298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011299$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011300else
Matthias Kloseb9621712010-04-24 17:59:49 +000011301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11302$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011303
11304fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11307$as_echo_n "checking for epoll... " >&6; }
11308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011309/* end confdefs.h. */
11310#include <sys/epoll.h>
11311int
11312main ()
11313{
11314void *x=epoll_create
11315 ;
11316 return 0;
11317}
11318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011319if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011320
Matthias Kloseb9621712010-04-24 17:59:49 +000011321$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011322
Matthias Kloseb159a552010-04-25 21:00:44 +000011323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011324$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011325else
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11327$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011328
11329fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11332$as_echo_n "checking for epoll_create1... " >&6; }
11333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11334/* end confdefs.h. */
11335#include <sys/epoll.h>
11336int
11337main ()
11338{
11339void *x=epoll_create1
11340 ;
11341 return 0;
11342}
11343_ACEOF
11344if ac_fn_c_try_compile "$LINENO"; then :
11345
11346$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11347
11348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11349$as_echo "yes" >&6; }
11350else
11351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11352$as_echo "no" >&6; }
11353
11354fi
11355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11357$as_echo_n "checking for kqueue... " >&6; }
11358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011359/* end confdefs.h. */
11360
11361#include <sys/types.h>
11362#include <sys/event.h>
11363
11364int
11365main ()
11366{
11367int x=kqueue()
11368 ;
11369 return 0;
11370}
11371_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011372if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011373
Matthias Kloseb9621712010-04-24 17:59:49 +000011374$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011375
Matthias Kloseb159a552010-04-25 21:00:44 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011377$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011378else
Matthias Kloseb9621712010-04-24 17:59:49 +000011379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11380$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011381
11382fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11385$as_echo_n "checking for prlimit... " >&6; }
11386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11387/* end confdefs.h. */
11388
11389#include <sys/time.h>
11390#include <sys/resource.h>
11391
11392int
11393main ()
11394{
11395void *x=prlimit
11396 ;
11397 return 0;
11398}
11399_ACEOF
11400if ac_fn_c_try_compile "$LINENO"; then :
11401
11402$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11403
11404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11405$as_echo "yes" >&6; }
11406else
11407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
11409
11410fi
11411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11412
Martin v. Löwisd5843682002-11-21 20:41:28 +000011413# On some systems (eg. FreeBSD 5), we would find a definition of the
11414# functions ctermid_r, setgroups in the library, but no prototype
11415# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11416# address to avoid compiler warnings and potential miscompilations
11417# because of the missing prototypes.
11418
Matthias Kloseb9621712010-04-24 17:59:49 +000011419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11420$as_echo_n "checking for ctermid_r... " >&6; }
11421cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011422/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011423
Martin v. Löwisd5843682002-11-21 20:41:28 +000011424#include <stdio.h>
11425
Martin v. Löwisd5843682002-11-21 20:41:28 +000011426int
11427main ()
11428{
11429void* p = ctermid_r
11430 ;
11431 return 0;
11432}
11433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011435
Matthias Kloseb9621712010-04-24 17:59:49 +000011436$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011437
Matthias Kloseb159a552010-04-25 21:00:44 +000011438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011439$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011440else
Matthias Kloseb9621712010-04-24 17:59:49 +000011441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11442$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011443
11444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11446
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11448$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011449if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011450 $as_echo_n "(cached) " >&6
11451else
11452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011453/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011454#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011455int
11456main ()
11457{
11458void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011459
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011460 ;
11461 return 0;
11462}
11463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011464if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011465 ac_cv_flock_decl=yes
11466else
11467 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011468
11469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011471
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011472fi
11473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11474$as_echo "$ac_cv_flock_decl" >&6; }
11475if test "x${ac_cv_flock_decl}" = xyes; then
11476 for ac_func in flock
11477do :
11478 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011479if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011480 cat >>confdefs.h <<_ACEOF
11481#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011482_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011483
Antoine Pitroua3000072010-09-07 14:52:42 +000011484else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011486$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011487if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011488 $as_echo_n "(cached) " >&6
11489else
11490 ac_check_lib_save_LIBS=$LIBS
11491LIBS="-lbsd $LIBS"
11492cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11493/* end confdefs.h. */
11494
11495/* Override any GCC internal prototype to avoid an error.
11496 Use char because int might match the return type of a GCC
11497 builtin and then its argument prototype would still apply. */
11498#ifdef __cplusplus
11499extern "C"
11500#endif
11501char flock ();
11502int
11503main ()
11504{
11505return flock ();
11506 ;
11507 return 0;
11508}
11509_ACEOF
11510if ac_fn_c_try_link "$LINENO"; then :
11511 ac_cv_lib_bsd_flock=yes
11512else
11513 ac_cv_lib_bsd_flock=no
11514fi
11515rm -f core conftest.err conftest.$ac_objext \
11516 conftest$ac_exeext conftest.$ac_ext
11517LIBS=$ac_check_lib_save_LIBS
11518fi
11519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11520$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011521if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011522 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011523
11524
11525$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11526
11527
11528fi
11529
11530
11531fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011532done
11533
Antoine Pitroua3000072010-09-07 14:52:42 +000011534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011535
Matthias Kloseb9621712010-04-24 17:59:49 +000011536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11537$as_echo_n "checking for getpagesize... " >&6; }
11538cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011539/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011540
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011541#include <unistd.h>
11542
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011543int
11544main ()
11545{
11546void* p = getpagesize
11547 ;
11548 return 0;
11549}
11550_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011551if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011552
Matthias Kloseb9621712010-04-24 17:59:49 +000011553$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011554
Matthias Kloseb159a552010-04-25 21:00:44 +000011555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011556$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011557else
Matthias Kloseb9621712010-04-24 17:59:49 +000011558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11559$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011560
11561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011563
Victor Stinner984890f2011-11-24 13:53:38 +010011564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11565$as_echo_n "checking for broken unsetenv... " >&6; }
11566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11567/* end confdefs.h. */
11568
11569#include <stdlib.h>
11570
11571int
11572main ()
11573{
11574int res = unsetenv("DUMMY")
11575 ;
11576 return 0;
11577}
11578_ACEOF
11579if ac_fn_c_try_compile "$LINENO"; then :
11580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11581$as_echo "no" >&6; }
11582else
11583
11584$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11585
11586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11587$as_echo "yes" >&6; }
11588
11589fi
11590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11591
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011592for ac_prog in true
11593do
11594 # Extract the first word of "$ac_prog", so it can be a program name with args.
11595set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11597$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011598if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011599 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011600else
11601 if test -n "$TRUE"; then
11602 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11603else
11604as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11605for as_dir in $PATH
11606do
11607 IFS=$as_save_IFS
11608 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011609 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011610 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011611 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011612 $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 +000011613 break 2
11614 fi
11615done
Matthias Kloseb9621712010-04-24 17:59:49 +000011616 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011618
11619fi
11620fi
11621TRUE=$ac_cv_prog_TRUE
11622if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11624$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011625else
Matthias Kloseb9621712010-04-24 17:59:49 +000011626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11627$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011628fi
11629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011630
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011631 test -n "$TRUE" && break
11632done
11633test -n "$TRUE" || TRUE="/bin/true"
11634
11635
Matthias Kloseb9621712010-04-24 17:59:49 +000011636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11637$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011638if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011640else
11641 ac_check_lib_save_LIBS=$LIBS
11642LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011643cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011644/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646/* Override any GCC internal prototype to avoid an error.
11647 Use char because int might match the return type of a GCC
11648 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011649#ifdef __cplusplus
11650extern "C"
11651#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011652char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011653int
11654main ()
11655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011657 ;
11658 return 0;
11659}
11660_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011661if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011662 ac_cv_lib_c_inet_aton=yes
11663else
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011665fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011666rm -f core conftest.err conftest.$ac_objext \
11667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011668LIBS=$ac_check_lib_save_LIBS
11669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11671$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011672if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011673 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011674else
Matthias Kloseb9621712010-04-24 17:59:49 +000011675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11676$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011677if ${ac_cv_lib_resolv_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="-lresolv $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_resolv_inet_aton=yes
11702else
Matthias Kloseb9621712010-04-24 17:59:49 +000011703 ac_cv_lib_resolv_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_resolv_inet_aton" >&5
11710$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011711if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011712 cat >>confdefs.h <<_ACEOF
11713#define HAVE_LIBRESOLV 1
11714_ACEOF
11715
11716 LIBS="-lresolv $LIBS"
11717
11718fi
11719
11720
11721fi
11722
11723
Christian Heimesd0764e22007-12-04 15:00:33 +000011724# On Tru64, chflags seems to be present, but calling it will
11725# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11727$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011728if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011729 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011730else
Matthias Kloseb9621712010-04-24 17:59:49 +000011731 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011732 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011733else
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011735/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011736
Christian Heimesd0764e22007-12-04 15:00:33 +000011737#include <sys/stat.h>
11738#include <unistd.h>
11739int main(int argc, char*argv[])
11740{
11741 if(chflags(argv[0], 0) != 0)
11742 return 1;
11743 return 0;
11744}
Ned Deily3eb67d52011-06-28 00:00:28 -070011745
Christian Heimesd0764e22007-12-04 15:00:33 +000011746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011747if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011748 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011749else
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011751fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011754fi
11755
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011756
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011757fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11759$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011760if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011761 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011762if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011763 ac_cv_have_chflags="yes"
11764else
11765 ac_cv_have_chflags="no"
11766fi
11767
11768fi
11769if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011770
Matthias Kloseb9621712010-04-24 17:59:49 +000011771$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011772
11773fi
11774
Matthias Kloseb9621712010-04-24 17:59:49 +000011775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11776$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011777if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011778 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011779else
Matthias Kloseb9621712010-04-24 17:59:49 +000011780 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011781 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011782else
Matthias Kloseb9621712010-04-24 17:59:49 +000011783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011784/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011785
Christian Heimesd0764e22007-12-04 15:00:33 +000011786#include <sys/stat.h>
11787#include <unistd.h>
11788int main(int argc, char*argv[])
11789{
11790 if(lchflags(argv[0], 0) != 0)
11791 return 1;
11792 return 0;
11793}
Ned Deily3eb67d52011-06-28 00:00:28 -070011794
Christian Heimesd0764e22007-12-04 15:00:33 +000011795_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011796if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011797 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011798else
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011800fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011803fi
11804
11805
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11808$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011809if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011810 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011811if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011812 ac_cv_have_lchflags="yes"
11813else
11814 ac_cv_have_lchflags="no"
11815fi
11816
11817fi
11818if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011819
Matthias Kloseb9621712010-04-24 17:59:49 +000011820$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011821
11822fi
11823
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011824case $ac_sys_system/$ac_sys_release in
11825Darwin/*)
11826 _CUR_CFLAGS="${CFLAGS}"
11827 _CUR_LDFLAGS="${LDFLAGS}"
11828 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11829 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11830 ;;
11831esac
11832
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11834$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011835if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011837else
11838 ac_check_lib_save_LIBS=$LIBS
11839LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011840cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011841/* end confdefs.h. */
11842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011843/* Override any GCC internal prototype to avoid an error.
11844 Use char because int might match the return type of a GCC
11845 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011846#ifdef __cplusplus
11847extern "C"
11848#endif
11849char inflateCopy ();
11850int
11851main ()
11852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011853return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011854 ;
11855 return 0;
11856}
11857_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011858if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011859 ac_cv_lib_z_inflateCopy=yes
11860else
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011862fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011863rm -f core conftest.err conftest.$ac_objext \
11864 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011865LIBS=$ac_check_lib_save_LIBS
11866fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11868$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011869if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011870
Matthias Kloseb9621712010-04-24 17:59:49 +000011871$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011872
11873fi
11874
11875
11876case $ac_sys_system/$ac_sys_release in
11877Darwin/*)
11878 CFLAGS="${_CUR_CFLAGS}"
11879 LDFLAGS="${_CUR_LDFLAGS}"
11880 ;;
11881esac
11882
Matthias Kloseb9621712010-04-24 17:59:49 +000011883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11884$as_echo_n "checking for hstrerror... " >&6; }
11885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011886/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011887
Martin v. Löwise9416172003-05-03 10:12:45 +000011888#include <netdb.h>
11889
Martin v. Löwise9416172003-05-03 10:12:45 +000011890int
11891main ()
11892{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011893void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011894 ;
11895 return 0;
11896}
11897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011898if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011901
Matthias Kloseb159a552010-04-25 21:00:44 +000011902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011903$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011904else
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11906$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011907
11908fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011909rm -f core conftest.err conftest.$ac_objext \
11910 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011911
Matthias Kloseb9621712010-04-24 17:59:49 +000011912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11913$as_echo_n "checking for inet_aton... " >&6; }
11914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011915/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011916
Martin v. Löwis86d66262006-02-17 08:40:11 +000011917#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011918#include <sys/socket.h>
11919#include <netinet/in.h>
11920#include <arpa/inet.h>
11921
Martin v. Löwise9416172003-05-03 10:12:45 +000011922int
11923main ()
11924{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011925void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011926 ;
11927 return 0;
11928}
11929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011930if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011931
Matthias Kloseb9621712010-04-24 17:59:49 +000011932$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011933
Matthias Kloseb159a552010-04-25 21:00:44 +000011934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011935$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011936else
Matthias Kloseb9621712010-04-24 17:59:49 +000011937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11938$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011939
11940fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011941rm -f core conftest.err conftest.$ac_objext \
11942 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011943
Matthias Kloseb9621712010-04-24 17:59:49 +000011944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11945$as_echo_n "checking for inet_pton... " >&6; }
11946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011947/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011948
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011949#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011950#include <sys/socket.h>
11951#include <netinet/in.h>
11952#include <arpa/inet.h>
11953
Martin v. Löwise9416172003-05-03 10:12:45 +000011954int
11955main ()
11956{
11957void* p = inet_pton
11958 ;
11959 return 0;
11960}
11961_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011962if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011963
Matthias Kloseb9621712010-04-24 17:59:49 +000011964$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011965
Matthias Kloseb159a552010-04-25 21:00:44 +000011966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011967$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011968else
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11970$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011971
11972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011974
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011975# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11977$as_echo_n "checking for setgroups... " >&6; }
11978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011979/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011980
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011981#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011982#ifdef HAVE_GRP_H
11983#include <grp.h>
11984#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011985
Martin v. Löwisd5843682002-11-21 20:41:28 +000011986int
11987main ()
11988{
11989void* p = setgroups
11990 ;
11991 return 0;
11992}
11993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011994if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011995
Matthias Kloseb9621712010-04-24 17:59:49 +000011996$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011997
Matthias Kloseb159a552010-04-25 21:00:44 +000011998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011999$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012000else
Matthias Kloseb9621712010-04-24 17:59:49 +000012001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12002$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012003
12004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012006
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012007# check for openpty and forkpty
12008
12009for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012010do :
12011 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012012if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012013 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012014#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012015_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012016
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012017else
Matthias Kloseb9621712010-04-24 17:59:49 +000012018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12019$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012020if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012021 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012022else
Martin v. Löwis11437992002-04-12 09:54:03 +000012023 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012024LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012025cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012028/* Override any GCC internal prototype to avoid an error.
12029 Use char because int might match the return type of a GCC
12030 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012031#ifdef __cplusplus
12032extern "C"
12033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012034char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012035int
12036main ()
12037{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012038return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012039 ;
12040 return 0;
12041}
12042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012043if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012044 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012045else
Matthias Kloseb9621712010-04-24 17:59:49 +000012046 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012047fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012048rm -f core conftest.err conftest.$ac_objext \
12049 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012050LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012051fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12053$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012054if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012055 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012056 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012057else
Matthias Kloseb9621712010-04-24 17:59:49 +000012058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12059$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012062else
12063 ac_check_lib_save_LIBS=$LIBS
12064LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012065cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012066/* end confdefs.h. */
12067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012068/* Override any GCC internal prototype to avoid an error.
12069 Use char because int might match the return type of a GCC
12070 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012071#ifdef __cplusplus
12072extern "C"
12073#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012074char openpty ();
12075int
12076main ()
12077{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012079 ;
12080 return 0;
12081}
12082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012083if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012084 ac_cv_lib_bsd_openpty=yes
12085else
Matthias Kloseb9621712010-04-24 17:59:49 +000012086 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012087fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012088rm -f core conftest.err conftest.$ac_objext \
12089 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012090LIBS=$ac_check_lib_save_LIBS
12091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12093$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012094if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012096 LIBS="$LIBS -lbsd"
12097fi
12098
12099
12100fi
12101
Fred Drake8cef4cf2000-06-28 16:40:38 +000012102
12103fi
12104done
12105
12106for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012107do :
12108 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012109if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012110 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012111#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012112_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012113
Fred Drake8cef4cf2000-06-28 16:40:38 +000012114else
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12116$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012117if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012119else
Martin v. Löwis11437992002-04-12 09:54:03 +000012120 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012121LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012125/* Override any GCC internal prototype to avoid an error.
12126 Use char because int might match the return type of a GCC
12127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012128#ifdef __cplusplus
12129extern "C"
12130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012131char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012132int
12133main ()
12134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012136 ;
12137 return 0;
12138}
12139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012140if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012141 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012142else
Matthias Kloseb9621712010-04-24 17:59:49 +000012143 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012145rm -f core conftest.err conftest.$ac_objext \
12146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012147LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12150$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012151if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012152 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012153 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012154else
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12156$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012157if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012159else
12160 ac_check_lib_save_LIBS=$LIBS
12161LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012163/* end confdefs.h. */
12164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165/* Override any GCC internal prototype to avoid an error.
12166 Use char because int might match the return type of a GCC
12167 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012168#ifdef __cplusplus
12169extern "C"
12170#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012171char forkpty ();
12172int
12173main ()
12174{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012175return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012176 ;
12177 return 0;
12178}
12179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012180if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012181 ac_cv_lib_bsd_forkpty=yes
12182else
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012185rm -f core conftest.err conftest.$ac_objext \
12186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012187LIBS=$ac_check_lib_save_LIBS
12188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12190$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012191if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012193 LIBS="$LIBS -lbsd"
12194fi
12195
12196
12197fi
12198
Fred Drake8cef4cf2000-06-28 16:40:38 +000012199
12200fi
12201done
12202
Jack Jansendd19cf82001-12-06 22:36:17 +000012203
Christian Heimesb186d002008-03-18 15:15:01 +000012204# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012205for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012206do :
12207 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012208if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012209 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012210#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012211_ACEOF
12212
12213fi
12214done
12215
12216
Michael W. Hudson54241132001-12-07 15:38:26 +000012217# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012218for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012219do :
12220 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12221ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012222if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012224#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012225_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012226
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012227fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012228done
12229
Michael W. Hudson54241132001-12-07 15:38:26 +000012230
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012231ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012232if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012233 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012234
Martin v. Löwis1142de32002-03-29 16:28:31 +000012235else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012236 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012237 *" dup2.$ac_objext "* ) ;;
12238 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012239 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012240esac
12241
Martin v. Löwis1142de32002-03-29 16:28:31 +000012242fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012243
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012244ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012245if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012246 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12247
12248else
12249 case " $LIBOBJS " in
12250 *" strdup.$ac_objext "* ) ;;
12251 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12252 ;;
12253esac
12254
12255fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012256
12257
12258for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012259do :
12260 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012261if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012262 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012263#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012266/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012267#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012268int
12269main ()
12270{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012271getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012272 ;
12273 return 0;
12274}
12275_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012276if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012277
Matthias Kloseb9621712010-04-24 17:59:49 +000012278$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012279
Guido van Rossum627b2d71993-12-24 10:39:16 +000012280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012282
Guido van Rossum627b2d71993-12-24 10:39:16 +000012283fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012284done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012285
Jack Jansen150753c2003-03-29 22:07:47 +000012286for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012287do :
12288 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012289if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012290 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012291#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012292_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012294/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012295#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012296int
12297main ()
12298{
12299setpgrp(0,0);
12300 ;
12301 return 0;
12302}
12303_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012305
Matthias Kloseb9621712010-04-24 17:59:49 +000012306$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012307
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012308fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012310
12311fi
12312done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012313
Thomas Wouters3a584202000-08-05 23:28:51 +000012314for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012315do :
12316 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012317if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012318 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012319#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012322/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012323#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012324int
12325main ()
12326{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012327gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012328 ;
12329 return 0;
12330}
12331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012332if ac_fn_c_try_compile "$LINENO"; then :
12333
Guido van Rossum627b2d71993-12-24 10:39:16 +000012334else
Skip Montanaro6dead952003-09-25 14:50:04 +000012335
Matthias Kloseb9621712010-04-24 17:59:49 +000012336$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012337
Martin v. Löwis11437992002-04-12 09:54:03 +000012338
Guido van Rossum627b2d71993-12-24 10:39:16 +000012339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012341
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012342fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012343done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012344
Michael W. Hudson54241132001-12-07 15:38:26 +000012345
Victor Stinnere0be4232011-10-25 13:06:09 +020012346for ac_func in clock_gettime
12347do :
12348 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12349if test "x$ac_cv_func_clock_gettime" = xyes; then :
12350 cat >>confdefs.h <<_ACEOF
12351#define HAVE_CLOCK_GETTIME 1
12352_ACEOF
12353
12354else
12355
12356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12357$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12358if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12359 $as_echo_n "(cached) " >&6
12360else
12361 ac_check_lib_save_LIBS=$LIBS
12362LIBS="-lrt $LIBS"
12363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12364/* end confdefs.h. */
12365
12366/* Override any GCC internal prototype to avoid an error.
12367 Use char because int might match the return type of a GCC
12368 builtin and then its argument prototype would still apply. */
12369#ifdef __cplusplus
12370extern "C"
12371#endif
12372char clock_gettime ();
12373int
12374main ()
12375{
12376return clock_gettime ();
12377 ;
12378 return 0;
12379}
12380_ACEOF
12381if ac_fn_c_try_link "$LINENO"; then :
12382 ac_cv_lib_rt_clock_gettime=yes
12383else
12384 ac_cv_lib_rt_clock_gettime=no
12385fi
12386rm -f core conftest.err conftest.$ac_objext \
12387 conftest$ac_exeext conftest.$ac_ext
12388LIBS=$ac_check_lib_save_LIBS
12389fi
12390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12391$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12392if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12393
Victor Stinner7efb8332014-08-29 15:41:08 +020012394 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012395 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12396
12397
12398$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12399
12400
12401fi
12402
12403
12404fi
12405done
12406
12407
12408for ac_func in clock_getres
12409do :
12410 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12411if test "x$ac_cv_func_clock_getres" = xyes; then :
12412 cat >>confdefs.h <<_ACEOF
12413#define HAVE_CLOCK_GETRES 1
12414_ACEOF
12415
12416else
12417
12418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12419$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12420if ${ac_cv_lib_rt_clock_getres+:} false; then :
12421 $as_echo_n "(cached) " >&6
12422else
12423 ac_check_lib_save_LIBS=$LIBS
12424LIBS="-lrt $LIBS"
12425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12426/* end confdefs.h. */
12427
12428/* Override any GCC internal prototype to avoid an error.
12429 Use char because int might match the return type of a GCC
12430 builtin and then its argument prototype would still apply. */
12431#ifdef __cplusplus
12432extern "C"
12433#endif
12434char clock_getres ();
12435int
12436main ()
12437{
12438return clock_getres ();
12439 ;
12440 return 0;
12441}
12442_ACEOF
12443if ac_fn_c_try_link "$LINENO"; then :
12444 ac_cv_lib_rt_clock_getres=yes
12445else
12446 ac_cv_lib_rt_clock_getres=no
12447fi
12448rm -f core conftest.err conftest.$ac_objext \
12449 conftest$ac_exeext conftest.$ac_ext
12450LIBS=$ac_check_lib_save_LIBS
12451fi
12452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12453$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12454if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12455
12456 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12457
12458
12459fi
12460
12461
12462fi
12463done
12464
12465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12467$as_echo_n "checking for major... " >&6; }
12468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012469/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012470
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012471#if defined(MAJOR_IN_MKDEV)
12472#include <sys/mkdev.h>
12473#elif defined(MAJOR_IN_SYSMACROS)
12474#include <sys/sysmacros.h>
12475#else
12476#include <sys/types.h>
12477#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012478
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012479int
12480main ()
12481{
12482
12483 makedev(major(0),minor(0));
12484
12485 ;
12486 return 0;
12487}
12488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012489if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012490
12491
Matthias Kloseb9621712010-04-24 17:59:49 +000012492$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012493
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12495$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012496
12497else
Skip Montanaro6dead952003-09-25 14:50:04 +000012498
Matthias Kloseb9621712010-04-24 17:59:49 +000012499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12500$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012501
12502fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012503rm -f core conftest.err conftest.$ac_objext \
12504 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012505
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012506# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012507# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12509$as_echo_n "checking for getaddrinfo... " >&6; }
12510cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012511/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012512
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012513#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012514#include <sys/socket.h>
12515#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012516#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012517
Martin v. Löwis11437992002-04-12 09:54:03 +000012518int
12519main ()
12520{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012521getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012522 ;
12523 return 0;
12524}
12525_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012526if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012527 have_getaddrinfo=yes
12528else
Matthias Kloseb9621712010-04-24 17:59:49 +000012529 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012530fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012531rm -f core conftest.err conftest.$ac_objext \
12532 conftest$ac_exeext conftest.$ac_ext
12533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12534$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012535if test $have_getaddrinfo = yes
12536then
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12538$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012539 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012541else
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012543
12544if test "${enable_ipv6+set}" = set; then
12545 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12546else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012547 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012548fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012549else
Matthias Kloseb9621712010-04-24 17:59:49 +000012550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012551/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012552
Stefan Krah19c21392012-11-22 23:47:32 +010012553#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012554#include <sys/types.h>
12555#include <netdb.h>
12556#include <string.h>
12557#include <sys/socket.h>
12558#include <netinet/in.h>
12559
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012560int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012561{
12562 int passive, gaierr, inet4 = 0, inet6 = 0;
12563 struct addrinfo hints, *ai, *aitop;
12564 char straddr[INET6_ADDRSTRLEN], strport[16];
12565
12566 for (passive = 0; passive <= 1; passive++) {
12567 memset(&hints, 0, sizeof(hints));
12568 hints.ai_family = AF_UNSPEC;
12569 hints.ai_flags = passive ? AI_PASSIVE : 0;
12570 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012571 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012572 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12573 (void)gai_strerror(gaierr);
12574 goto bad;
12575 }
12576 for (ai = aitop; ai; ai = ai->ai_next) {
12577 if (ai->ai_addr == NULL ||
12578 ai->ai_addrlen == 0 ||
12579 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12580 straddr, sizeof(straddr), strport, sizeof(strport),
12581 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12582 goto bad;
12583 }
12584 switch (ai->ai_family) {
12585 case AF_INET:
12586 if (strcmp(strport, "54321") != 0) {
12587 goto bad;
12588 }
12589 if (passive) {
12590 if (strcmp(straddr, "0.0.0.0") != 0) {
12591 goto bad;
12592 }
12593 } else {
12594 if (strcmp(straddr, "127.0.0.1") != 0) {
12595 goto bad;
12596 }
12597 }
12598 inet4++;
12599 break;
12600 case AF_INET6:
12601 if (strcmp(strport, "54321") != 0) {
12602 goto bad;
12603 }
12604 if (passive) {
12605 if (strcmp(straddr, "::") != 0) {
12606 goto bad;
12607 }
12608 } else {
12609 if (strcmp(straddr, "::1") != 0) {
12610 goto bad;
12611 }
12612 }
12613 inet6++;
12614 break;
12615 case AF_UNSPEC:
12616 goto bad;
12617 break;
12618 default:
12619 /* another family support? */
12620 break;
12621 }
12622 }
12623 }
12624
12625 if (!(inet4 == 0 || inet4 == 2))
12626 goto bad;
12627 if (!(inet6 == 0 || inet6 == 2))
12628 goto bad;
12629
12630 if (aitop)
12631 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012632 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012633
12634 bad:
12635 if (aitop)
12636 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012637 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012638}
12639
Martin v. Löwis11437992002-04-12 09:54:03 +000012640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012641if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012642 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012643else
Matthias Kloseb9621712010-04-24 17:59:49 +000012644 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012645fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012646rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12647 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012650fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012651
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012653
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12655$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12656
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012657if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012658then
12659 if test $ipv6 = yes
12660 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012661 echo 'Fatal: You must get working getaddrinfo() function.'
12662 echo ' or you can specify "--disable-ipv6"'.
12663 exit 1
12664 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012665else
Martin v. Löwis11437992002-04-12 09:54:03 +000012666
Matthias Kloseb9621712010-04-24 17:59:49 +000012667$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012668
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012669fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012670
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012671for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012672do :
12673 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012674if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012675 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012676#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012677_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012678
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012679fi
12680done
12681
Michael W. Hudson54241132001-12-07 15:38:26 +000012682
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12685$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012686if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012688else
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012690/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012691#include <sys/types.h>
12692#include <sys/time.h>
12693#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012694
Martin v. Löwis11437992002-04-12 09:54:03 +000012695int
12696main ()
12697{
12698if ((struct tm *) 0)
12699return 0;
12700 ;
12701 return 0;
12702}
12703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012704if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012705 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012706else
Matthias Kloseb9621712010-04-24 17:59:49 +000012707 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012708fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12712$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012713if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012714
Matthias Kloseb9621712010-04-24 17:59:49 +000012715$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012716
12717fi
12718
Matthias Kloseb9621712010-04-24 17:59:49 +000012719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12720$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012721if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723else
Matthias Kloseb9621712010-04-24 17:59:49 +000012724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012725/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726#include <sys/types.h>
12727#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012728
Martin v. Löwis11437992002-04-12 09:54:03 +000012729int
12730main ()
12731{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012732struct tm tm;
12733 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012734 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012735 ;
12736 return 0;
12737}
12738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012739if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012740 ac_cv_struct_tm=time.h
12741else
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012745fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12747$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012748if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012751
12752fi
12753
Matthias Kloseb9621712010-04-24 17:59:49 +000012754ac_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 +000012755#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012756
Matthias Kloseb9621712010-04-24 17:59:49 +000012757"
Victor Stinnere0be4232011-10-25 13:06:09 +020012758if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012759
12760cat >>confdefs.h <<_ACEOF
12761#define HAVE_STRUCT_TM_TM_ZONE 1
12762_ACEOF
12763
12764
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012765fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012766
Martin v. Löwis11437992002-04-12 09:54:03 +000012767if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12768
Matthias Kloseb9621712010-04-24 17:59:49 +000012769$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012770
12771else
Matthias Kloseb9621712010-04-24 17:59:49 +000012772 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12773"
Victor Stinnere0be4232011-10-25 13:06:09 +020012774if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012776else
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012778fi
12779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012780cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012781#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782_ACEOF
12783
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12785$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012786if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012787 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012788else
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012790/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012791#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792#if !HAVE_DECL_TZNAME
12793extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012794#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012795
Martin v. Löwis11437992002-04-12 09:54:03 +000012796int
12797main ()
12798{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012800 ;
12801 return 0;
12802}
12803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012804if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012805 ac_cv_var_tzname=yes
12806else
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012808fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012809rm -f core conftest.err conftest.$ac_objext \
12810 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12813$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012814 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012817
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012818 fi
12819fi
12820
Matthias Kloseb9621712010-04-24 17:59:49 +000012821ac_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 +020012822if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012823
12824cat >>confdefs.h <<_ACEOF
12825#define HAVE_STRUCT_STAT_ST_RDEV 1
12826_ACEOF
12827
12828
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012829fi
12830
Matthias Kloseb9621712010-04-24 17:59:49 +000012831ac_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 +020012832if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012833
Martin v. Löwis11437992002-04-12 09:54:03 +000012834cat >>confdefs.h <<_ACEOF
12835#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12836_ACEOF
12837
12838
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012839fi
12840
Matthias Kloseb9621712010-04-24 17:59:49 +000012841ac_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 +020012842if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012843
12844cat >>confdefs.h <<_ACEOF
12845#define HAVE_STRUCT_STAT_ST_FLAGS 1
12846_ACEOF
12847
12848
12849fi
12850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851ac_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 +020012852if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012853
12854cat >>confdefs.h <<_ACEOF
12855#define HAVE_STRUCT_STAT_ST_GEN 1
12856_ACEOF
12857
12858
12859fi
12860
Matthias Kloseb9621712010-04-24 17:59:49 +000012861ac_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 +020012862if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012863
12864cat >>confdefs.h <<_ACEOF
12865#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12866_ACEOF
12867
12868
12869fi
12870
Matthias Kloseb9621712010-04-24 17:59:49 +000012871ac_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 +020012872if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012873
Martin v. Löwis11437992002-04-12 09:54:03 +000012874cat >>confdefs.h <<_ACEOF
12875#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12876_ACEOF
12877
12878
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012879fi
12880
Stefan Krah267b6392016-04-26 01:09:18 +020012881ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12882 #include <sys/types.h>
12883 #include <pwd.h>
12884
12885"
12886if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12887
12888cat >>confdefs.h <<_ACEOF
12889#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12890_ACEOF
12891
12892
12893fi
12894ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12895 #include <sys/types.h>
12896 #include <pwd.h>
12897
12898"
12899if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12900
12901cat >>confdefs.h <<_ACEOF
12902#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12903_ACEOF
12904
12905
12906fi
12907
Michael W. Hudson54241132001-12-07 15:38:26 +000012908
Matthias Kloseb9621712010-04-24 17:59:49 +000012909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12910$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012911if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012912 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012913else
Matthias Kloseb159a552010-04-25 21:00:44 +000012914
Matthias Kloseb9621712010-04-24 17:59:49 +000012915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012916/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012917#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012918int
12919main ()
12920{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012921return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012922 ;
12923 return 0;
12924}
12925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012926if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012927 ac_cv_header_time_altzone=yes
12928else
Matthias Kloseb9621712010-04-24 17:59:49 +000012929 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012933fi
12934
Matthias Kloseb9621712010-04-24 17:59:49 +000012935{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12936$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012937if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012938
Matthias Kloseb9621712010-04-24 17:59:49 +000012939$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012940
12941fi
12942
Guido van Rossumda88dad1995-01-26 00:46:29 +000012943was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12945$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12946cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012947/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012948
12949#include <sys/types.h>
12950#include <sys/select.h>
12951#include <sys/time.h>
12952
Martin v. Löwis11437992002-04-12 09:54:03 +000012953int
12954main ()
12955{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012956;
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 ;
12958 return 0;
12959}
12960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012961if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012962
12963
Matthias Kloseb9621712010-04-24 17:59:49 +000012964$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012965
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012966 was_it_defined=yes
12967
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12971$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012972
Matthias Kloseb9621712010-04-24 17:59:49 +000012973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12974$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012975if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012976 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012977else
Matthias Kloseb9621712010-04-24 17:59:49 +000012978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012979/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012980#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012981int
12982main ()
12983{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012984struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012985 ;
12986 return 0;
12987}
12988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012989if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012990 ac_cv_struct_addrinfo=yes
12991else
Matthias Kloseb9621712010-04-24 17:59:49 +000012992 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12995fi
12996
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12998$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012999if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013000
Matthias Kloseb9621712010-04-24 17:59:49 +000013001$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013002
13003fi
13004
Matthias Kloseb9621712010-04-24 17:59:49 +000013005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13006$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013007if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013008 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013009else
Matthias Kloseb9621712010-04-24 17:59:49 +000013010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013011/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013012
13013# include <sys/types.h>
13014# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013015int
13016main ()
13017{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013018struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013019 ;
13020 return 0;
13021}
13022_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013023if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013024 ac_cv_struct_sockaddr_storage=yes
13025else
Matthias Kloseb9621712010-04-24 17:59:49 +000013026 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013027fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13029fi
13030
Matthias Kloseb9621712010-04-24 17:59:49 +000013031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13032$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013033if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013034
Matthias Kloseb9621712010-04-24 17:59:49 +000013035$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013036
13037fi
13038
Guido van Rossum627b2d71993-12-24 10:39:16 +000013039# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013040
Matthias Kloseb9621712010-04-24 17:59:49 +000013041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13042$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013043if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013044 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013045else
Matthias Kloseb9621712010-04-24 17:59:49 +000013046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013047/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013048$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013049int
13050main ()
13051{
13052static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013053test_array [0] = 0;
13054return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013055
13056 ;
13057 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013058}
Martin v. Löwis11437992002-04-12 09:54:03 +000013059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013060if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013061 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013062else
Matthias Kloseb9621712010-04-24 17:59:49 +000013063 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013066fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13068$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013069if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013070 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013071
13072fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13075$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013076if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013077 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013078else
Matthias Kloseb9621712010-04-24 17:59:49 +000013079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013080/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013081
Martin v. Löwis11437992002-04-12 09:54:03 +000013082int
13083main ()
13084{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013085
Martin v. Löwis11437992002-04-12 09:54:03 +000013086#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013087 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013088 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013089 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013090 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013091 char const *const *pcpcc;
13092 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 /* NEC SVR4.0.2 mips cc rejects this. */
13094 struct point {int x, y;};
13095 static struct point const zero = {0,0};
13096 /* AIX XL C 1.02.0.0 rejects this.
13097 It does not let you subtract one const X* pointer from another in
13098 an arm of an if-expression whose if-part is not a constant
13099 expression */
13100 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013101 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013103 ++pcpcc;
13104 ppc = (char**) pcpcc;
13105 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013106 { /* SCO 3.2v4 cc rejects this sort of thing. */
13107 char tx;
13108 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013109 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013110
Martin v. Löwis11437992002-04-12 09:54:03 +000013111 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013113 }
13114 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13115 int x[] = {25, 17};
13116 const int *foo = &x[0];
13117 ++foo;
13118 }
13119 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13120 typedef const int *iptr;
13121 iptr p = 0;
13122 ++p;
13123 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013124 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013126 struct s { int j; const int *ap[3]; } bx;
13127 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013128 }
13129 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13130 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013134#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013135
Martin v. Löwis11437992002-04-12 09:54:03 +000013136 ;
13137 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013138}
Martin v. Löwis11437992002-04-12 09:54:03 +000013139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013140if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013141 ac_cv_c_const=yes
13142else
Matthias Kloseb9621712010-04-24 17:59:49 +000013143 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13148$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013149if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013150
Matthias Kloseb9621712010-04-24 17:59:49 +000013151$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013152
13153fi
13154
Michael W. Hudson54241132001-12-07 15:38:26 +000013155
Guido van Rossumda88dad1995-01-26 00:46:29 +000013156works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13158$as_echo_n "checking for working volatile... " >&6; }
13159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013160/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013161
Martin v. Löwis11437992002-04-12 09:54:03 +000013162int
13163main ()
13164{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013165volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013166 ;
13167 return 0;
13168}
13169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013170if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013171 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013172else
Skip Montanaro6dead952003-09-25 14:50:04 +000013173
Matthias Kloseb9621712010-04-24 17:59:49 +000013174$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013175
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013176
Guido van Rossum627b2d71993-12-24 10:39:16 +000013177fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13180$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013181
Guido van Rossumda88dad1995-01-26 00:46:29 +000013182works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13184$as_echo_n "checking for working signed char... " >&6; }
13185cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013186/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013187
Martin v. Löwis11437992002-04-12 09:54:03 +000013188int
13189main ()
13190{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013191signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013192 ;
13193 return 0;
13194}
13195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013196if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013197 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013198else
Skip Montanaro6dead952003-09-25 14:50:04 +000013199
Matthias Kloseb9621712010-04-24 17:59:49 +000013200$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013201
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013202
Guido van Rossum7f43da71994-08-01 12:15:30 +000013203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13206$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013207
Guido van Rossumda88dad1995-01-26 00:46:29 +000013208have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13210$as_echo_n "checking for prototypes... " >&6; }
13211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013212/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013213int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013214int
13215main ()
13216{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013217return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013218 ;
13219 return 0;
13220}
13221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013223
Matthias Kloseb9621712010-04-24 17:59:49 +000013224$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013225
Matthias Kloseb159a552010-04-25 21:00:44 +000013226 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13230$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013231
Guido van Rossumda88dad1995-01-26 00:46:29 +000013232works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13234$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13235cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013236/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013237
13238#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013239int foo(int x, ...) {
13240 va_list va;
13241 va_start(va, x);
13242 va_arg(va, int);
13243 va_arg(va, char *);
13244 va_arg(va, double);
13245 return 0;
13246}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013247
Martin v. Löwis11437992002-04-12 09:54:03 +000013248int
13249main ()
13250{
Guido van Rossum90eea071996-08-30 20:58:57 +000013251return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013252 ;
13253 return 0;
13254}
13255_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013256if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013257
13258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013260
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013261 works=yes
13262
Guido van Rossum627b2d71993-12-24 10:39:16 +000013263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13266$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013267
Martin v. Löwisd6320502004-08-12 13:45:08 +000013268# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13270$as_echo_n "checking for socketpair... " >&6; }
13271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013272/* end confdefs.h. */
13273
13274#include <sys/types.h>
13275#include <sys/socket.h>
13276
13277int
13278main ()
13279{
13280void *x=socketpair
13281 ;
13282 return 0;
13283}
13284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013285if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013286
Matthias Kloseb9621712010-04-24 17:59:49 +000013287$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013288
Matthias Kloseb159a552010-04-25 21:00:44 +000013289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013290$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13293$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013294
13295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013297
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013298# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13300$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013302/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013303#include <sys/types.h>
13304#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013305int
13306main ()
13307{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013308struct sockaddr x;
13309x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013310 ;
13311 return 0;
13312}
13313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013314if ac_fn_c_try_compile "$LINENO"; then :
13315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13316$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Matthias Kloseb9621712010-04-24 17:59:49 +000013318$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013319
13320else
Matthias Kloseb9621712010-04-24 17:59:49 +000013321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13322$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013323
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013326
Guido van Rossumda88dad1995-01-26 00:46:29 +000013327va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13329$as_echo_n "checking whether va_list is an array... " >&6; }
13330cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013331/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013332
13333#ifdef HAVE_STDARG_PROTOTYPES
13334#include <stdarg.h>
13335#else
13336#include <varargs.h>
13337#endif
13338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339int
13340main ()
13341{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013342va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013343 ;
13344 return 0;
13345}
13346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013347if ac_fn_c_try_compile "$LINENO"; then :
13348
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013349else
Skip Montanaro6dead952003-09-25 14:50:04 +000013350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013353
Guido van Rossumda88dad1995-01-26 00:46:29 +000013354 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013355
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13359$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013360
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013361# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
13363
Matthias Kloseb9621712010-04-24 17:59:49 +000013364ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013365if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013366
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013368
Matthias Kloseb9621712010-04-24 17:59:49 +000013369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13370$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013371 OLD_CFLAGS=$CFLAGS
13372 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013374/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013375
13376# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013377
Martin v. Löwis11437992002-04-12 09:54:03 +000013378int
13379main ()
13380{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013381
13382 char *name;
13383 struct hostent *he, *res;
13384 char buffer[2048];
13385 int buflen = 2048;
13386 int h_errnop;
13387
13388 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013389
13390 ;
13391 return 0;
13392}
13393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013395
Matthias Kloseb9621712010-04-24 17:59:49 +000013396 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013397
Martin v. Löwis11437992002-04-12 09:54:03 +000013398
Matthias Kloseb9621712010-04-24 17:59:49 +000013399$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013400
Matthias Kloseb9621712010-04-24 17:59:49 +000013401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13402$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013403
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013404else
Skip Montanaro6dead952003-09-25 14:50:04 +000013405
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13407$as_echo "no" >&6; }
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13409$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013411/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013412
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013413# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013414
Martin v. Löwis11437992002-04-12 09:54:03 +000013415int
13416main ()
13417{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013418
13419 char *name;
13420 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013421 char buffer[2048];
13422 int buflen = 2048;
13423 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013424
Matthias Kloseb159a552010-04-25 21:00:44 +000013425 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013426
13427 ;
13428 return 0;
13429}
13430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013431if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013434
Martin v. Löwis11437992002-04-12 09:54:03 +000013435
Matthias Kloseb159a552010-04-25 21:00:44 +000013436$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013437
Matthias Kloseb9621712010-04-24 17:59:49 +000013438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13439$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013441else
Skip Montanaro6dead952003-09-25 14:50:04 +000013442
Matthias Kloseb9621712010-04-24 17:59:49 +000013443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13444$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13446$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13448/* end confdefs.h. */
13449
13450# include <netdb.h>
13451
13452int
13453main ()
13454{
13455
13456 char *name;
13457 struct hostent *he;
13458 struct hostent_data data;
13459
13460 (void) gethostbyname_r(name, he, &data);
13461
13462 ;
13463 return 0;
13464}
13465_ACEOF
13466if ac_fn_c_try_compile "$LINENO"; then :
13467
13468 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13469
13470
13471$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13472
13473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13474$as_echo "yes" >&6; }
13475
13476else
13477
13478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13479$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013480
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013483
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013486
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013489 CFLAGS=$OLD_CFLAGS
13490
13491else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013492
Matthias Kloseb9621712010-04-24 17:59:49 +000013493 for ac_func in gethostbyname
13494do :
13495 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013496if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013497 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013498#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013499_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013500
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013501fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013502done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013503
Michael W. Hudson54241132001-12-07 15:38:26 +000013504
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013505fi
13506
Michael W. Hudson54241132001-12-07 15:38:26 +000013507
13508
13509
13510
13511
13512
Guido van Rossum627b2d71993-12-24 10:39:16 +000013513# checks for system services
13514# (none yet)
13515
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013516# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013517ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013518if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013519
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013520else
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13522$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013523if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013525else
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013527LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013530
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013531/* Override any GCC internal prototype to avoid an error.
13532 Use char because int might match the return type of a GCC
13533 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013534#ifdef __cplusplus
13535extern "C"
13536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013537char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013538int
13539main ()
13540{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 ;
13543 return 0;
13544}
13545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013546if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013548else
Matthias Kloseb9621712010-04-24 17:59:49 +000013549 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013550fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013551rm -f core conftest.err conftest.$ac_objext \
13552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013553LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13556$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013557if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013558 cat >>confdefs.h <<_ACEOF
13559#define HAVE_LIBIEEE 1
13560_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013561
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013562 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013563
Guido van Rossum627b2d71993-12-24 10:39:16 +000013564fi
13565
Michael W. Hudson54241132001-12-07 15:38:26 +000013566
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013567fi
13568
Michael W. Hudson54241132001-12-07 15:38:26 +000013569
Guido van Rossum7f253911997-05-09 02:42:48 +000013570# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13572$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013574# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013575if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013576 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013577if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013578then
13579
Matthias Kloseb9621712010-04-24 17:59:49 +000013580$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13583$as_echo "yes" >&6; }
13584else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13585$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013586fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013587else
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13589$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013590fi
13591
Guido van Rossum7f253911997-05-09 02:42:48 +000013592
Guido van Rossum7f43da71994-08-01 12:15:30 +000013593# check for --with-libm=...
13594
Guido van Rossum563e7081996-09-10 18:20:48 +000013595case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013596Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013597*) LIBM=-lm
13598esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13600$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013601
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013602# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013603if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013605if test "$withval" = no
13606then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13608$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013609elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013610then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13612$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013613else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013614fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013615else
Matthias Kloseb9621712010-04-24 17:59:49 +000013616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13617$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013618fi
13619
Guido van Rossum7f43da71994-08-01 12:15:30 +000013620
13621# check for --with-libc=...
13622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13624$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013627if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013628 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013629if test "$withval" = no
13630then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13632$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013633elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013634then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13636$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013637else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013638fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013639else
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13641$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013642fi
13643
Guido van Rossum7f43da71994-08-01 12:15:30 +000013644
Stefan Krah1919b7e2012-03-21 18:25:23 +010013645# **************************************
13646# * Check for gcc x64 inline assembler *
13647# **************************************
13648
13649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13650$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13652/* end confdefs.h. */
13653
13654int
13655main ()
13656{
13657
13658 __asm__ __volatile__ ("movq %rcx, %rax");
13659
13660 ;
13661 return 0;
13662}
13663_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013664if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013665 have_gcc_asm_for_x64=yes
13666else
13667 have_gcc_asm_for_x64=no
13668fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013669rm -f core conftest.err conftest.$ac_objext \
13670 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13672$as_echo "$have_gcc_asm_for_x64" >&6; }
13673if test "$have_gcc_asm_for_x64" = yes
13674then
13675
13676$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13677
13678fi
13679
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013680# **************************************************
13681# * Check for various properties of floating point *
13682# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013683
Matthias Kloseb9621712010-04-24 17:59:49 +000013684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13685$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013686if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013687 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013688else
13689
Matthias Kloseb9621712010-04-24 17:59:49 +000013690if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013691 ac_cv_little_endian_double=no
13692else
Matthias Kloseb9621712010-04-24 17:59:49 +000013693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013694/* end confdefs.h. */
13695
13696#include <string.h>
13697int main() {
13698 double x = 9006104071832581.0;
13699 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13700 return 0;
13701 else
13702 return 1;
13703}
13704
13705_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013706if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013707 ac_cv_little_endian_double=yes
13708else
Matthias Kloseb9621712010-04-24 17:59:49 +000013709 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013710fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13712 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013713fi
13714
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013715fi
13716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13718$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013719if test "$ac_cv_little_endian_double" = yes
13720then
13721
Matthias Kloseb9621712010-04-24 17:59:49 +000013722$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013723
13724fi
13725
Matthias Kloseb9621712010-04-24 17:59:49 +000013726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13727$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013728if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013729 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013730else
13731
Matthias Kloseb9621712010-04-24 17:59:49 +000013732if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013733 ac_cv_big_endian_double=no
13734else
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013736/* end confdefs.h. */
13737
13738#include <string.h>
13739int main() {
13740 double x = 9006104071832581.0;
13741 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13742 return 0;
13743 else
13744 return 1;
13745}
13746
13747_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013748if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013749 ac_cv_big_endian_double=yes
13750else
Matthias Kloseb9621712010-04-24 17:59:49 +000013751 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013752fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13754 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013755fi
13756
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013757fi
13758
Matthias Kloseb9621712010-04-24 17:59:49 +000013759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13760$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013761if test "$ac_cv_big_endian_double" = yes
13762then
13763
Matthias Kloseb9621712010-04-24 17:59:49 +000013764$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013765
13766fi
13767
13768# Some ARM platforms use a mixed-endian representation for doubles.
13769# While Python doesn't currently have full support for these platforms
13770# (see e.g., issue 1762561), we can at least make sure that float <-> string
13771# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13773$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013774if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013776else
13777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779 ac_cv_mixed_endian_double=no
13780else
Matthias Kloseb9621712010-04-24 17:59:49 +000013781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013782/* end confdefs.h. */
13783
13784#include <string.h>
13785int main() {
13786 double x = 9006104071832581.0;
13787 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13788 return 0;
13789 else
13790 return 1;
13791}
13792
13793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013795 ac_cv_mixed_endian_double=yes
13796else
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013801fi
13802
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013803fi
13804
Matthias Kloseb9621712010-04-24 17:59:49 +000013805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13806$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013807if test "$ac_cv_mixed_endian_double" = yes
13808then
13809
Matthias Kloseb9621712010-04-24 17:59:49 +000013810$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013811
13812fi
13813
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013814# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013815# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013816# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013817# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013818# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013819# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013820
13821# This inline assembler syntax may also work for suncc and icc,
13822# so we try it on all platforms.
13823
Matthias Kloseb9621712010-04-24 17:59:49 +000013824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13825$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013827/* end confdefs.h. */
13828
13829int
13830main ()
13831{
13832
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013833 unsigned short cw;
13834 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13835 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013836
13837 ;
13838 return 0;
13839}
13840_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013841if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013842 have_gcc_asm_for_x87=yes
13843else
Matthias Kloseb9621712010-04-24 17:59:49 +000013844 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013845fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013846rm -f core conftest.err conftest.$ac_objext \
13847 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13849$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013850if test "$have_gcc_asm_for_x87" = yes
13851then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013854
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013855fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013856
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13858$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13860/* end confdefs.h. */
13861
13862int
13863main ()
13864{
13865
13866 unsigned int fpcr;
13867 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13868 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13869
13870 ;
13871 return 0;
13872}
13873_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013874if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013875 have_gcc_asm_for_mc68881=yes
13876else
13877 have_gcc_asm_for_mc68881=no
13878fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013879rm -f core conftest.err conftest.$ac_objext \
13880 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13882$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13883if test "$have_gcc_asm_for_mc68881" = yes
13884then
13885
13886$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13887
13888fi
13889
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013890# Detect whether system arithmetic is subject to x87-style double
13891# rounding issues. The result of this test has little meaning on non
13892# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13893# mode is round-to-nearest and double rounding issues are present, and
13894# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13896$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013897# $BASECFLAGS may affect the result
13898ac_save_cc="$CC"
13899CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013900if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013901 ac_cv_x87_double_rounding=no
13902else
Matthias Kloseb9621712010-04-24 17:59:49 +000013903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013904/* end confdefs.h. */
13905
13906#include <stdlib.h>
13907#include <math.h>
13908int main() {
13909 volatile double x, y, z;
13910 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13911 x = 0.99999999999999989; /* 1-2**-53 */
13912 y = 1./x;
13913 if (y != 1.)
13914 exit(0);
13915 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13916 x = 1e16;
13917 y = 2.99999;
13918 z = x + y;
13919 if (z != 1e16+4.)
13920 exit(0);
13921 /* both tests show evidence of double rounding */
13922 exit(1);
13923}
13924
13925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013926if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013927 ac_cv_x87_double_rounding=no
13928else
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013933fi
13934
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013935CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13937$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013938if test "$ac_cv_x87_double_rounding" = yes
13939then
13940
Matthias Kloseb9621712010-04-24 17:59:49 +000013941$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013942
13943fi
13944
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013945# ************************************
13946# * Check for mathematical functions *
13947# ************************************
13948
13949LIBS_SAVE=$LIBS
13950LIBS="$LIBS $LIBM"
13951
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013952for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13953do :
13954 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13955ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013956if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013957 cat >>confdefs.h <<_ACEOF
13958#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13959_ACEOF
13960
13961fi
13962done
13963
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013964for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013965do :
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
13976ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13977"
Victor Stinnere0be4232011-10-25 13:06:09 +020013978if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013979 ac_have_decl=1
13980else
13981 ac_have_decl=0
13982fi
13983
13984cat >>confdefs.h <<_ACEOF
13985#define HAVE_DECL_ISINF $ac_have_decl
13986_ACEOF
13987ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13988"
Victor Stinnere0be4232011-10-25 13:06:09 +020013989if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013990 ac_have_decl=1
13991else
13992 ac_have_decl=0
13993fi
13994
13995cat >>confdefs.h <<_ACEOF
13996#define HAVE_DECL_ISNAN $ac_have_decl
13997_ACEOF
13998ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13999"
Victor Stinnere0be4232011-10-25 13:06:09 +020014000if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014001 ac_have_decl=1
14002else
14003 ac_have_decl=0
14004fi
14005
14006cat >>confdefs.h <<_ACEOF
14007#define HAVE_DECL_ISFINITE $ac_have_decl
14008_ACEOF
14009
14010
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014011# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14012# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14014$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014015if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014016 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014017else
14018
Matthias Kloseb9621712010-04-24 17:59:49 +000014019if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014020 ac_cv_tanh_preserves_zero_sign=no
14021else
Matthias Kloseb9621712010-04-24 17:59:49 +000014022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014023/* end confdefs.h. */
14024
14025#include <math.h>
14026#include <stdlib.h>
14027int main() {
14028 /* return 0 if either negative zeros don't exist
14029 on this platform or if negative zeros exist
14030 and tanh(-0.) == -0. */
14031 if (atan2(0., -1.) == atan2(-0., -1.) ||
14032 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14033 else exit(1);
14034}
14035
14036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014037if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014038 ac_cv_tanh_preserves_zero_sign=yes
14039else
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14043 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014044fi
14045
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014046fi
14047
Matthias Kloseb9621712010-04-24 17:59:49 +000014048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14049$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014050if test "$ac_cv_tanh_preserves_zero_sign" = yes
14051then
14052
Matthias Kloseb9621712010-04-24 17:59:49 +000014053$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014054
14055fi
14056
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014057if test "$ac_cv_func_log1p" = yes
14058then
14059 # On some versions of AIX, log1p(-0.) returns 0. instead of
14060 # -0. See issue #9920.
14061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14062$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014063 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014064 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014065else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014066
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014067 if test "$cross_compiling" = yes; then :
14068 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014069else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14071/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014072
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014073 #include <math.h>
14074 #include <stdlib.h>
14075 int main() {
14076 /* Fail if the signs of log1p(-0.) and -0. can be
14077 distinguished. */
14078 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14079 return 0;
14080 else
14081 return 1;
14082 }
14083
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014084_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014085if ac_fn_c_try_run "$LINENO"; then :
14086 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014087else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014088 ac_cv_log1p_drops_zero_sign=yes
14089fi
14090rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14091 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014092fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014093
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014094fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014095
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14097$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14098fi
14099if test "$ac_cv_log1p_drops_zero_sign" = yes
14100then
14101
14102$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14103
14104fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014105
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014106LIBS=$LIBS_SAVE
14107
Mark Dickinsona614f042009-11-28 12:48:43 +000014108# For multiprocessing module, check that sem_open
14109# actually works. For FreeBSD versions <= 7.2,
14110# the kernel module that provides POSIX semaphores
14111# isn't loaded by default, so an attempt to call
14112# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14114$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014115if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014116 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014117else
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014119 ac_cv_posix_semaphores_enabled=yes
14120else
Matthias Kloseb9621712010-04-24 17:59:49 +000014121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014122/* end confdefs.h. */
14123
14124#include <unistd.h>
14125#include <fcntl.h>
14126#include <stdio.h>
14127#include <semaphore.h>
14128#include <sys/stat.h>
14129
14130int main(void) {
14131 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14132 if (a == SEM_FAILED) {
14133 perror("sem_open");
14134 return 1;
14135 }
14136 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014137 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014138 return 0;
14139}
14140
14141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014142if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014143 ac_cv_posix_semaphores_enabled=yes
14144else
Matthias Kloseb9621712010-04-24 17:59:49 +000014145 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014146fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14148 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014149fi
14150
14151
Mark Dickinsona614f042009-11-28 12:48:43 +000014152fi
14153
Matthias Kloseb9621712010-04-24 17:59:49 +000014154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14155$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014156if test $ac_cv_posix_semaphores_enabled = no
14157then
14158
Matthias Kloseb9621712010-04-24 17:59:49 +000014159$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014160
14161fi
14162
Mark Dickinson10683072009-04-18 21:18:19 +000014163# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14165$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014166if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014167 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014168else
Matthias Kloseb9621712010-04-24 17:59:49 +000014169 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014170 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014171else
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014173/* end confdefs.h. */
14174
14175#include <unistd.h>
14176#include <fcntl.h>
14177#include <stdio.h>
14178#include <semaphore.h>
14179#include <sys/stat.h>
14180
14181int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014182 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014183 int count;
14184 int res;
14185 if(a==SEM_FAILED){
14186 perror("sem_open");
14187 return 1;
14188
14189 }
14190 res = sem_getvalue(a, &count);
14191 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014192 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014193 return res==-1 ? 1 : 0;
14194}
14195
Mark Dickinson10683072009-04-18 21:18:19 +000014196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014197if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014198 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014199else
Matthias Kloseb9621712010-04-24 17:59:49 +000014200 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014201fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14203 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014204fi
14205
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014206
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014207fi
14208
Matthias Kloseb9621712010-04-24 17:59:49 +000014209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14210$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014211if test $ac_cv_broken_sem_getvalue = yes
14212then
14213
Matthias Kloseb9621712010-04-24 17:59:49 +000014214$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014215
14216fi
14217
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014218ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14219"
14220if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14221 ac_have_decl=1
14222else
14223 ac_have_decl=0
14224fi
14225
14226cat >>confdefs.h <<_ACEOF
14227#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14228_ACEOF
14229ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14230"
14231if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14232 ac_have_decl=1
14233else
14234 ac_have_decl=0
14235fi
14236
14237cat >>confdefs.h <<_ACEOF
14238#define HAVE_DECL_RTLD_NOW $ac_have_decl
14239_ACEOF
14240ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14241"
14242if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14243 ac_have_decl=1
14244else
14245 ac_have_decl=0
14246fi
14247
14248cat >>confdefs.h <<_ACEOF
14249#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14250_ACEOF
14251ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14252"
14253if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14254 ac_have_decl=1
14255else
14256 ac_have_decl=0
14257fi
14258
14259cat >>confdefs.h <<_ACEOF
14260#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14261_ACEOF
14262ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14263"
14264if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14265 ac_have_decl=1
14266else
14267 ac_have_decl=0
14268fi
14269
14270cat >>confdefs.h <<_ACEOF
14271#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14272_ACEOF
14273ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14274"
14275if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14276 ac_have_decl=1
14277else
14278 ac_have_decl=0
14279fi
14280
14281cat >>confdefs.h <<_ACEOF
14282#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14283_ACEOF
14284ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14285"
14286if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14287 ac_have_decl=1
14288else
14289 ac_have_decl=0
14290fi
14291
14292cat >>confdefs.h <<_ACEOF
14293#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14294_ACEOF
14295
14296
Mark Dickinsonbd792642009-03-18 20:06:12 +000014297# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14299$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014300# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014301if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014302 enableval=$enable_big_digits; case $enable_big_digits in
14303yes)
14304 enable_big_digits=30 ;;
14305no)
14306 enable_big_digits=15 ;;
1430715|30)
14308 ;;
14309*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014310 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 +000014311esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14313$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014314
14315cat >>confdefs.h <<_ACEOF
14316#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14317_ACEOF
14318
14319
14320else
Matthias Kloseb9621712010-04-24 17:59:49 +000014321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14322$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014323fi
14324
14325
Guido van Rossumef2255b2000-03-10 22:30:29 +000014326# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014327ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014328if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014329
14330
Matthias Kloseb9621712010-04-24 17:59:49 +000014331$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014332
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014333 wchar_h="yes"
14334
Guido van Rossumef2255b2000-03-10 22:30:29 +000014335else
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014337
14338fi
14339
Michael W. Hudson54241132001-12-07 15:38:26 +000014340
Martin v. Löwis11437992002-04-12 09:54:03 +000014341
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014342# determine wchar_t size
14343if test "$wchar_h" = yes
14344then
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014346# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14347# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14348# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14350$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014351if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014353else
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14355"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
Martin v. Löwis11437992002-04-12 09:54:03 +000014357else
Matthias Kloseb9621712010-04-24 17:59:49 +000014358 if test "$ac_cv_type_wchar_t" = yes; then
14359 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14360$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014361as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014362See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014363 else
14364 ac_cv_sizeof_wchar_t=0
14365 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014366fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014367
Martin v. Löwis11437992002-04-12 09:54:03 +000014368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14370$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371
14372
14373
Martin v. Löwis11437992002-04-12 09:54:03 +000014374cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014375#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014376_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014377
Michael W. Hudson54241132001-12-07 15:38:26 +000014378
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014379fi
14380
Matthias Kloseb9621712010-04-24 17:59:49 +000014381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14382$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014383have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014385/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014386
14387#include <tcl.h>
14388#if TCL_UTF_MAX != 6
14389# error "NOT UCS4_TCL"
14390#endif
14391int
14392main ()
14393{
14394
14395 ;
14396 return 0;
14397}
14398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014399if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014400
14401
Matthias Kloseb9621712010-04-24 17:59:49 +000014402$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014403
14404 have_ucs4_tcl=yes
14405
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14409$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014410
Skip Montanaro6dead952003-09-25 14:50:04 +000014411# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014412if test "$wchar_h" = yes
14413then
14414 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14416$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014417 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014418 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014419else
14420
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014422 ac_cv_wchar_t_signed=yes
14423else
Matthias Kloseb9621712010-04-24 17:59:49 +000014424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014425/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014426
14427 #include <wchar.h>
14428 int main()
14429 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014430 /* Success: exit code 0 */
14431 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014432 }
14433
14434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014435if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014436 ac_cv_wchar_t_signed=yes
14437else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014439fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14441 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014442fi
14443
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014444fi
14445
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14447$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014448fi
14449
Georg Brandl52d168a2008-01-07 18:10:24 +000014450# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014451if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014452 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014453then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014454 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014457
Georg Brandl52d168a2008-01-07 18:10:24 +000014458else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014459 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014460fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14462$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014463
14464# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14466$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014467if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014469else
Matthias Kloseb9621712010-04-24 17:59:49 +000014470 ac_cv_c_bigendian=unknown
14471 # See if we're dealing with a universal compiler.
14472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14473/* end confdefs.h. */
14474#ifndef __APPLE_CC__
14475 not a universal capable compiler
14476 #endif
14477 typedef int dummy;
14478
Skip Montanaro6dead952003-09-25 14:50:04 +000014479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014480if ac_fn_c_try_compile "$LINENO"; then :
14481
14482 # Check for potential -arch flags. It is not universal unless
14483 # there are at least two -arch flags with different values.
14484 ac_arch=
14485 ac_prev=
14486 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14487 if test -n "$ac_prev"; then
14488 case $ac_word in
14489 i?86 | x86_64 | ppc | ppc64)
14490 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14491 ac_arch=$ac_word
14492 else
14493 ac_cv_c_bigendian=universal
14494 break
14495 fi
14496 ;;
14497 esac
14498 ac_prev=
14499 elif test "x$ac_word" = "x-arch"; then
14500 ac_prev=arch
14501 fi
14502 done
14503fi
14504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14505 if test $ac_cv_c_bigendian = unknown; then
14506 # See if sys/param.h defines the BYTE_ORDER macro.
14507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014508/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014509#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014511
Martin v. Löwis11437992002-04-12 09:54:03 +000014512int
14513main ()
14514{
Matthias Kloseb9621712010-04-24 17:59:49 +000014515#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14516 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14517 && LITTLE_ENDIAN)
14518 bogus endian macros
14519 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014520
14521 ;
14522 return 0;
14523}
14524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014525if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014526 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014528/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014529#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014530 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014531
Martin v. Löwis11437992002-04-12 09:54:03 +000014532int
14533main ()
14534{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014535#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014536 not big endian
14537 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014538
14539 ;
14540 return 0;
14541}
14542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014543if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014544 ac_cv_c_bigendian=yes
14545else
Matthias Kloseb9621712010-04-24 17:59:49 +000014546 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014549fi
14550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14551 fi
14552 if test $ac_cv_c_bigendian = unknown; then
14553 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014555/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014556#include <limits.h>
14557
Martin v. Löwis11437992002-04-12 09:54:03 +000014558int
14559main ()
14560{
Matthias Kloseb9621712010-04-24 17:59:49 +000014561#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14562 bogus endian macros
14563 #endif
14564
Martin v. Löwis11437992002-04-12 09:54:03 +000014565 ;
14566 return 0;
14567}
14568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014569if ac_fn_c_try_compile "$LINENO"; then :
14570 # It does; now see whether it defined to _BIG_ENDIAN or not.
14571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14572/* end confdefs.h. */
14573#include <limits.h>
14574
14575int
14576main ()
14577{
14578#ifndef _BIG_ENDIAN
14579 not big endian
14580 #endif
14581
14582 ;
14583 return 0;
14584}
14585_ACEOF
14586if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014587 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014588else
Matthias Kloseb9621712010-04-24 17:59:49 +000014589 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014590fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14592fi
14593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14594 fi
14595 if test $ac_cv_c_bigendian = unknown; then
14596 # Compile a test program.
14597 if test "$cross_compiling" = yes; then :
14598 # Try to guess by grepping values from an object file.
14599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14600/* end confdefs.h. */
14601short int ascii_mm[] =
14602 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14603 short int ascii_ii[] =
14604 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14605 int use_ascii (int i) {
14606 return ascii_mm[i] + ascii_ii[i];
14607 }
14608 short int ebcdic_ii[] =
14609 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14610 short int ebcdic_mm[] =
14611 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14612 int use_ebcdic (int i) {
14613 return ebcdic_mm[i] + ebcdic_ii[i];
14614 }
14615 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014616
Matthias Kloseb9621712010-04-24 17:59:49 +000014617int
14618main ()
14619{
14620return use_ascii (foo) == use_ebcdic (foo);
14621 ;
14622 return 0;
14623}
14624_ACEOF
14625if ac_fn_c_try_compile "$LINENO"; then :
14626 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14627 ac_cv_c_bigendian=yes
14628 fi
14629 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14630 if test "$ac_cv_c_bigendian" = unknown; then
14631 ac_cv_c_bigendian=no
14632 else
14633 # finding both strings is unlikely to happen, but who knows?
14634 ac_cv_c_bigendian=unknown
14635 fi
14636 fi
14637fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014639else
Matthias Kloseb9621712010-04-24 17:59:49 +000014640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014641/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014643int
14644main ()
14645{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014646
Matthias Kloseb9621712010-04-24 17:59:49 +000014647 /* Are we little or big endian? From Harbison&Steele. */
14648 union
14649 {
14650 long int l;
14651 char c[sizeof (long int)];
14652 } u;
14653 u.l = 1;
14654 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014655
14656 ;
14657 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014658}
Martin v. Löwis11437992002-04-12 09:54:03 +000014659_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014660if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014661 ac_cv_c_bigendian=no
14662else
Matthias Kloseb9621712010-04-24 17:59:49 +000014663 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014664fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14666 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014670fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14672$as_echo "$ac_cv_c_bigendian" >&6; }
14673 case $ac_cv_c_bigendian in #(
14674 yes)
14675 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14676;; #(
14677 no)
14678 ;; #(
14679 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014680
Matthias Kloseb9621712010-04-24 17:59:49 +000014681$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014682
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 ;; #(
14684 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014685 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014686 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014687 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014688
Michael W. Hudson54241132001-12-07 15:38:26 +000014689
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014690# ABI version string for Python extension modules. This appears between the
14691# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14692# from the following attributes which affect the ABI of this Python build (in
14693# this order):
14694#
14695# * The Python implementation (always 'cpython-' for us)
14696# * The major and minor version numbers
14697# * --with-pydebug (adds a 'd')
14698# * --with-pymalloc (adds a 'm')
14699# * --with-wide-unicode (adds a 'u')
14700#
14701# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014702# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14703# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014704
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14706$as_echo_n "checking ABIFLAGS... " >&6; }
14707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14708$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14710$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014711SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14713$as_echo "$SOABI" >&6; }
14714
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014715
14716case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014717 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014718 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14719 *)
14720 EXT_SUFFIX=${SHLIB_SUFFIX};;
14721esac
14722
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14724$as_echo_n "checking LDVERSION... " >&6; }
14725LDVERSION='$(VERSION)$(ABIFLAGS)'
14726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14727$as_echo "$LDVERSION" >&6; }
14728
doko@python.org87421192013-01-26 11:39:31 +010014729
doko@ubuntu.com55532312016-06-14 08:55:19 +020014730if test x$PLATFORM_TRIPLET = x; then
14731 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14732else
14733 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14734fi
doko@python.org87421192013-01-26 11:39:31 +010014735
14736
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014737# Check whether right shifting a negative integer extends the sign bit
14738# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14740$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014741if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014743else
Martin v. Löwis11437992002-04-12 09:54:03 +000014744
Matthias Kloseb9621712010-04-24 17:59:49 +000014745if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014746 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014747else
Matthias Kloseb9621712010-04-24 17:59:49 +000014748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014749/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014750
14751int main()
14752{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014753 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014754}
14755
Martin v. Löwis11437992002-04-12 09:54:03 +000014756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014757if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014758 ac_cv_rshift_extends_sign=yes
14759else
Matthias Kloseb9621712010-04-24 17:59:49 +000014760 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014761fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14763 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014764fi
14765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014766fi
14767
Matthias Kloseb9621712010-04-24 17:59:49 +000014768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14769$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014770if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014771then
Martin v. Löwis11437992002-04-12 09:54:03 +000014772
Matthias Kloseb9621712010-04-24 17:59:49 +000014773$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014774
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014775fi
14776
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014777# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14779$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014780if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014781 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014782else
Martin v. Löwis11437992002-04-12 09:54:03 +000014783
Matthias Kloseb9621712010-04-24 17:59:49 +000014784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014785/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014786#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014787int
14788main ()
14789{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014790
14791 FILE *f = fopen("/dev/null", "r");
14792 flockfile(f);
14793 getc_unlocked(f);
14794 funlockfile(f);
14795
Martin v. Löwis11437992002-04-12 09:54:03 +000014796 ;
14797 return 0;
14798}
14799_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014800if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014801 ac_cv_have_getc_unlocked=yes
14802else
Matthias Kloseb9621712010-04-24 17:59:49 +000014803 ac_cv_have_getc_unlocked=no
14804fi
14805rm -f core conftest.err conftest.$ac_objext \
14806 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014808
Matthias Kloseb9621712010-04-24 17:59:49 +000014809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14810$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014811if test "$ac_cv_have_getc_unlocked" = yes
14812then
Martin v. Löwis11437992002-04-12 09:54:03 +000014813
Matthias Kloseb9621712010-04-24 17:59:49 +000014814$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014815
14816fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014817
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014818# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014819# save the value of LIBS so we don't actually link Python with readline
14820LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014821
Gregory P. Smith18820942008-09-07 06:24:49 +000014822# On some systems we need to link readline to a termcap compatible
14823# library. NOTE: Keep the precedence of listed libraries synchronised
14824# with setup.py.
14825py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14827$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014828for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014829 if test -z "$py_libtermcap"; then
14830 READLINE_LIBS="-lreadline"
14831 else
14832 READLINE_LIBS="-lreadline -l$py_libtermcap"
14833 fi
14834 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014836/* end confdefs.h. */
14837
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014838/* Override any GCC internal prototype to avoid an error.
14839 Use char because int might match the return type of a GCC
14840 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014841#ifdef __cplusplus
14842extern "C"
14843#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014844char readline ();
14845int
14846main ()
14847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014848return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014849 ;
14850 return 0;
14851}
14852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014853if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014854 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014856rm -f core conftest.err conftest.$ac_objext \
14857 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014858 if test $py_cv_lib_readline = yes; then
14859 break
14860 fi
14861done
14862# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14863#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014864if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14866$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014867else
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14869$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014870
Matthias Kloseb9621712010-04-24 17:59:49 +000014871$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014872
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014873fi
14874
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014875# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14877$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014878if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014880else
14881 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014882LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014884/* end confdefs.h. */
14885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886/* Override any GCC internal prototype to avoid an error.
14887 Use char because int might match the return type of a GCC
14888 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014889#ifdef __cplusplus
14890extern "C"
14891#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014892char rl_callback_handler_install ();
14893int
14894main ()
14895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014896return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014897 ;
14898 return 0;
14899}
14900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014901if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014902 ac_cv_lib_readline_rl_callback_handler_install=yes
14903else
Matthias Kloseb9621712010-04-24 17:59:49 +000014904 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014906rm -f core conftest.err conftest.$ac_objext \
14907 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014908LIBS=$ac_check_lib_save_LIBS
14909fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14911$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014912if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014913
Matthias Kloseb9621712010-04-24 17:59:49 +000014914$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014915
14916fi
14917
14918
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014919# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014920cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014921/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014922#include <readline/readline.h>
14923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014924if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014925 have_readline=yes
14926else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014927 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014928
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014929fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014930rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014931if test $have_readline = yes
14932then
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014934/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014935#include <readline/readline.h>
14936
14937_ACEOF
14938if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014939 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014940
Matthias Kloseb9621712010-04-24 17:59:49 +000014941$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014942
14943fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014944rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014945
Matthias Kloseb9621712010-04-24 17:59:49 +000014946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014947/* end confdefs.h. */
14948#include <readline/readline.h>
14949
14950_ACEOF
14951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014952 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014953
Matthias Kloseb9621712010-04-24 17:59:49 +000014954$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014955
14956fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014957rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014958
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014959fi
14960
Martin v. Löwis0daad592001-09-30 21:09:59 +000014961# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14963$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014964if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014965 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014966else
Martin v. Löwis11437992002-04-12 09:54:03 +000014967 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014968LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014972/* Override any GCC internal prototype to avoid an error.
14973 Use char because int might match the return type of a GCC
14974 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014975#ifdef __cplusplus
14976extern "C"
14977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014978char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014979int
14980main ()
14981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014982return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014983 ;
14984 return 0;
14985}
14986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014987if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014989else
Matthias Kloseb9621712010-04-24 17:59:49 +000014990 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014992rm -f core conftest.err conftest.$ac_objext \
14993 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014994LIBS=$ac_check_lib_save_LIBS
14995fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14997$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014998if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014999
Matthias Kloseb9621712010-04-24 17:59:49 +000015000$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015001
Martin v. Löwis0daad592001-09-30 21:09:59 +000015002fi
15003
Michael W. Hudson54241132001-12-07 15:38:26 +000015004
Thomas Wouters89d996e2007-09-08 17:39:28 +000015005# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15007$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015008if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015009 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015010else
15011 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015012LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015014/* end confdefs.h. */
15015
15016/* Override any GCC internal prototype to avoid an error.
15017 Use char because int might match the return type of a GCC
15018 builtin and then its argument prototype would still apply. */
15019#ifdef __cplusplus
15020extern "C"
15021#endif
15022char rl_completion_display_matches_hook ();
15023int
15024main ()
15025{
15026return rl_completion_display_matches_hook ();
15027 ;
15028 return 0;
15029}
15030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015031if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015032 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15033else
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015036rm -f core conftest.err conftest.$ac_objext \
15037 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015038LIBS=$ac_check_lib_save_LIBS
15039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15041$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015042if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015043
Matthias Kloseb9621712010-04-24 17:59:49 +000015044$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015045
15046fi
15047
15048
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015049# also in 4.0, but not in editline
15050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15051$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15052if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15053 $as_echo_n "(cached) " >&6
15054else
15055 ac_check_lib_save_LIBS=$LIBS
15056LIBS="-lreadline $READLINE_LIBS $LIBS"
15057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15058/* end confdefs.h. */
15059
15060/* Override any GCC internal prototype to avoid an error.
15061 Use char because int might match the return type of a GCC
15062 builtin and then its argument prototype would still apply. */
15063#ifdef __cplusplus
15064extern "C"
15065#endif
15066char rl_resize_terminal ();
15067int
15068main ()
15069{
15070return rl_resize_terminal ();
15071 ;
15072 return 0;
15073}
15074_ACEOF
15075if ac_fn_c_try_link "$LINENO"; then :
15076 ac_cv_lib_readline_rl_resize_terminal=yes
15077else
15078 ac_cv_lib_readline_rl_resize_terminal=no
15079fi
15080rm -f core conftest.err conftest.$ac_objext \
15081 conftest$ac_exeext conftest.$ac_ext
15082LIBS=$ac_check_lib_save_LIBS
15083fi
15084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15085$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15086if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15087
15088$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15089
15090fi
15091
15092
Martin v. Löwis0daad592001-09-30 21:09:59 +000015093# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15095$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015096if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015097 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015098else
Martin v. Löwis11437992002-04-12 09:54:03 +000015099 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015100LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104/* Override any GCC internal prototype to avoid an error.
15105 Use char because int might match the return type of a GCC
15106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015107#ifdef __cplusplus
15108extern "C"
15109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015110char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015111int
15112main ()
15113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015115 ;
15116 return 0;
15117}
15118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015120 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015121else
Matthias Kloseb9621712010-04-24 17:59:49 +000015122 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015124rm -f core conftest.err conftest.$ac_objext \
15125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015126LIBS=$ac_check_lib_save_LIBS
15127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15129$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015130if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015131
Matthias Kloseb9621712010-04-24 17:59:49 +000015132$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015133
Guido van Rossum353ae582001-07-10 16:45:32 +000015134fi
15135
Jack Jansendd19cf82001-12-06 22:36:17 +000015136
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015137# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015139/* end confdefs.h. */
15140#include <readline/readline.h>
15141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015142if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015143 have_readline=yes
15144else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015145 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015146
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015147fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015148rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015149if test $have_readline = yes
15150then
Matthias Kloseb9621712010-04-24 17:59:49 +000015151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015152/* end confdefs.h. */
15153#include <readline/readline.h>
15154
15155_ACEOF
15156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015158
Matthias Kloseb9621712010-04-24 17:59:49 +000015159$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015160
15161fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015162rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015163
15164fi
15165
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15167$as_echo_n "checking for append_history in -lreadline... " >&6; }
15168if ${ac_cv_lib_readline_append_history+:} false; then :
15169 $as_echo_n "(cached) " >&6
15170else
15171 ac_check_lib_save_LIBS=$LIBS
15172LIBS="-lreadline $READLINE_LIBS $LIBS"
15173cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15174/* end confdefs.h. */
15175
15176/* Override any GCC internal prototype to avoid an error.
15177 Use char because int might match the return type of a GCC
15178 builtin and then its argument prototype would still apply. */
15179#ifdef __cplusplus
15180extern "C"
15181#endif
15182char append_history ();
15183int
15184main ()
15185{
15186return append_history ();
15187 ;
15188 return 0;
15189}
15190_ACEOF
15191if ac_fn_c_try_link "$LINENO"; then :
15192 ac_cv_lib_readline_append_history=yes
15193else
15194 ac_cv_lib_readline_append_history=no
15195fi
15196rm -f core conftest.err conftest.$ac_objext \
15197 conftest$ac_exeext conftest.$ac_ext
15198LIBS=$ac_check_lib_save_LIBS
15199fi
15200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15201$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15202if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15203
15204$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15205
15206fi
15207
15208
Martin v. Löwis82bca632006-02-10 20:49:30 +000015209# End of readline checks: restore LIBS
15210LIBS=$LIBS_no_readline
15211
Matthias Kloseb9621712010-04-24 17:59:49 +000015212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15213$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015214if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015215 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015216else
Martin v. Löwis11437992002-04-12 09:54:03 +000015217
Matthias Kloseb9621712010-04-24 17:59:49 +000015218if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015219 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015220else
Matthias Kloseb9621712010-04-24 17:59:49 +000015221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015222/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015223
15224int main()
15225{
15226 int val1 = nice(1);
15227 if (val1 != -1 && val1 == nice(2))
15228 exit(0);
15229 exit(1);
15230}
15231
Martin v. Löwis11437992002-04-12 09:54:03 +000015232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015233if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015234 ac_cv_broken_nice=yes
15235else
Matthias Kloseb9621712010-04-24 17:59:49 +000015236 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15239 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015240fi
15241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242fi
15243
Matthias Kloseb9621712010-04-24 17:59:49 +000015244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15245$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015246if test "$ac_cv_broken_nice" = yes
15247then
Martin v. Löwis11437992002-04-12 09:54:03 +000015248
Matthias Kloseb9621712010-04-24 17:59:49 +000015249$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015250
15251fi
15252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15254$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015255if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015256 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015257else
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015259 ac_cv_broken_poll=no
15260else
Matthias Kloseb9621712010-04-24 17:59:49 +000015261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015262/* end confdefs.h. */
15263
15264#include <poll.h>
15265
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015266int main()
15267{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015268 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015269 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015270
15271 close (42);
15272
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015273 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015274 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015275 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015276 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015277 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015278 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015279 return 1;
15280}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015281
15282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015283if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015284 ac_cv_broken_poll=yes
15285else
Matthias Kloseb9621712010-04-24 17:59:49 +000015286 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015287fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015291
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015292fi
15293
Matthias Kloseb9621712010-04-24 17:59:49 +000015294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15295$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015296if test "$ac_cv_broken_poll" = yes
15297then
15298
Matthias Kloseb9621712010-04-24 17:59:49 +000015299$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015300
15301fi
15302
Brett Cannon43802422005-02-10 20:48:03 +000015303# 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 +000015304# (which is not required by ISO C or UNIX spec) and/or if we support
15305# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015306ac_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 +000015307#include <$ac_cv_struct_tm>
15308
Matthias Kloseb9621712010-04-24 17:59:49 +000015309"
Victor Stinnere0be4232011-10-25 13:06:09 +020015310if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015311
15312cat >>confdefs.h <<_ACEOF
15313#define HAVE_STRUCT_TM_TM_ZONE 1
15314_ACEOF
15315
15316
15317fi
15318
15319if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15320
Matthias Kloseb9621712010-04-24 17:59:49 +000015321$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015322
15323else
Matthias Kloseb9621712010-04-24 17:59:49 +000015324 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15325"
Victor Stinnere0be4232011-10-25 13:06:09 +020015326if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015327 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015328else
Matthias Kloseb9621712010-04-24 17:59:49 +000015329 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330fi
15331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015333#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334_ACEOF
15335
Matthias Kloseb9621712010-04-24 17:59:49 +000015336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15337$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015338if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015340else
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015342/* end confdefs.h. */
15343#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344#if !HAVE_DECL_TZNAME
15345extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015346#endif
15347
15348int
15349main ()
15350{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015352 ;
15353 return 0;
15354}
15355_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015356if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015357 ac_cv_var_tzname=yes
15358else
Matthias Kloseb9621712010-04-24 17:59:49 +000015359 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015360fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015361rm -f core conftest.err conftest.$ac_objext \
15362 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015363fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15365$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015366 if test $ac_cv_var_tzname = yes; then
15367
Matthias Kloseb9621712010-04-24 17:59:49 +000015368$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015369
15370 fi
15371fi
15372
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015373
Martin v. Löwis1d459062005-03-14 21:23:33 +000015374# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15376$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015377if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015378 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015379else
15380
Matthias Kloseb9621712010-04-24 17:59:49 +000015381if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015382 ac_cv_working_tzset=no
15383else
Matthias Kloseb9621712010-04-24 17:59:49 +000015384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015385/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015386
15387#include <stdlib.h>
15388#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015389#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015390
15391#if HAVE_TZNAME
15392extern char *tzname[];
15393#endif
15394
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015395int main()
15396{
Brett Cannon18367812003-09-19 00:59:16 +000015397 /* Note that we need to ensure that not only does tzset(3)
15398 do 'something' with localtime, but it works as documented
15399 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015400 This includes making sure that tzname is set properly if
15401 tm->tm_zone does not exist since it is the alternative way
15402 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015403
15404 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015405 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015406 */
15407
Martin v. Löwis1d459062005-03-14 21:23:33 +000015408 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015409 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15410
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015411 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015412 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015413 if (localtime(&groundhogday)->tm_hour != 0)
15414 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015415#if HAVE_TZNAME
15416 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15417 if (strcmp(tzname[0], "UTC") ||
15418 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15419 exit(1);
15420#endif
Brett Cannon18367812003-09-19 00:59:16 +000015421
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015422 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015423 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015424 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015425 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015426#if HAVE_TZNAME
15427 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15428 exit(1);
15429#endif
Brett Cannon18367812003-09-19 00:59:16 +000015430
15431 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15432 tzset();
15433 if (localtime(&groundhogday)->tm_hour != 11)
15434 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015435#if HAVE_TZNAME
15436 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15437 exit(1);
15438#endif
15439
15440#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015441 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15442 exit(1);
15443 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15444 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015445#endif
Brett Cannon18367812003-09-19 00:59:16 +000015446
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015447 exit(0);
15448}
15449
15450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015451if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015452 ac_cv_working_tzset=yes
15453else
Matthias Kloseb9621712010-04-24 17:59:49 +000015454 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015455fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15457 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015458fi
15459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460fi
15461
Matthias Kloseb9621712010-04-24 17:59:49 +000015462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15463$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015464if test "$ac_cv_working_tzset" = yes
15465then
15466
Matthias Kloseb9621712010-04-24 17:59:49 +000015467$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015468
15469fi
15470
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015471# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15473$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015474if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015476else
Matthias Kloseb9621712010-04-24 17:59:49 +000015477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015478/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015479#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015480int
15481main ()
15482{
15483
15484struct stat st;
15485st.st_mtim.tv_nsec = 1;
15486
15487 ;
15488 return 0;
15489}
15490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015492 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015493else
Matthias Kloseb9621712010-04-24 17:59:49 +000015494 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15497fi
15498
Matthias Kloseb9621712010-04-24 17:59:49 +000015499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15500$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015501if test "$ac_cv_stat_tv_nsec" = yes
15502then
15503
Matthias Kloseb9621712010-04-24 17:59:49 +000015504$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015505
15506fi
15507
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015508# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15510$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015511if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015513else
Matthias Kloseb9621712010-04-24 17:59:49 +000015514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015515/* end confdefs.h. */
15516#include <sys/stat.h>
15517int
15518main ()
15519{
15520
15521struct stat st;
15522st.st_mtimespec.tv_nsec = 1;
15523
15524 ;
15525 return 0;
15526}
15527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015528if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015529 ac_cv_stat_tv_nsec2=yes
15530else
Matthias Kloseb9621712010-04-24 17:59:49 +000015531 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015532fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15534fi
15535
Matthias Kloseb9621712010-04-24 17:59:49 +000015536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15537$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015538if test "$ac_cv_stat_tv_nsec2" = yes
15539then
15540
Matthias Kloseb9621712010-04-24 17:59:49 +000015541$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015542
15543fi
15544
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015545# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015546ac_save_cppflags="$CPPFLAGS"
15547CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015548
15549for ac_header in curses.h ncurses.h
15550do :
15551 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15552ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15553if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15554 cat >>confdefs.h <<_ACEOF
15555#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15556_ACEOF
15557
15558fi
15559
15560done
15561
15562
15563# On Solaris, term.h requires curses.h
15564for ac_header in term.h
15565do :
15566 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15567#ifdef HAVE_CURSES_H
15568#include <curses.h>
15569#endif
15570
15571"
15572if test "x$ac_cv_header_term_h" = xyes; then :
15573 cat >>confdefs.h <<_ACEOF
15574#define HAVE_TERM_H 1
15575_ACEOF
15576
15577fi
15578
15579done
15580
15581
Jack Jansen666b1e72001-10-31 12:11:48 +000015582# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15584$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015585if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015586 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015587else
Matthias Kloseb9621712010-04-24 17:59:49 +000015588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015589/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015590#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015591int
15592main ()
15593{
Jack Jansen666b1e72001-10-31 12:11:48 +000015594
15595 int rtn;
15596 rtn = mvwdelch(0,0,0);
15597
Martin v. Löwis11437992002-04-12 09:54:03 +000015598 ;
15599 return 0;
15600}
15601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015602if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015603 ac_cv_mvwdelch_is_expression=yes
15604else
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15608fi
15609
Matthias Kloseb9621712010-04-24 17:59:49 +000015610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15611$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015612
15613if test "$ac_cv_mvwdelch_is_expression" = yes
15614then
Martin v. Löwis11437992002-04-12 09:54:03 +000015615
Matthias Kloseb9621712010-04-24 17:59:49 +000015616$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015617
15618fi
15619
Matthias Kloseb9621712010-04-24 17:59:49 +000015620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15621$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015622if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015623 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015624else
Matthias Kloseb9621712010-04-24 17:59:49 +000015625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015626/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015627#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015628int
15629main ()
15630{
Jack Jansen666b1e72001-10-31 12:11:48 +000015631
15632 WINDOW *w;
15633 w->_flags = 0;
15634
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 ;
15636 return 0;
15637}
15638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015639if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015640 ac_cv_window_has_flags=yes
15641else
Matthias Kloseb9621712010-04-24 17:59:49 +000015642 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15645fi
15646
Matthias Kloseb9621712010-04-24 17:59:49 +000015647{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15648$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015649
Jack Jansen666b1e72001-10-31 12:11:48 +000015650
15651if test "$ac_cv_window_has_flags" = yes
15652then
Martin v. Löwis11437992002-04-12 09:54:03 +000015653
Matthias Kloseb9621712010-04-24 17:59:49 +000015654$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015655
15656fi
15657
Matthias Kloseb9621712010-04-24 17:59:49 +000015658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15659$as_echo_n "checking for is_term_resized... " >&6; }
15660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015661/* end confdefs.h. */
15662#include <curses.h>
15663int
15664main ()
15665{
15666void *x=is_term_resized
15667 ;
15668 return 0;
15669}
15670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015671if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015672
Matthias Kloseb9621712010-04-24 17:59:49 +000015673$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015674
Matthias Kloseb159a552010-04-25 21:00:44 +000015675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015676$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015677else
Matthias Kloseb9621712010-04-24 17:59:49 +000015678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15679$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015680
15681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15683
Matthias Kloseb9621712010-04-24 17:59:49 +000015684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15685$as_echo_n "checking for resize_term... " >&6; }
15686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015687/* end confdefs.h. */
15688#include <curses.h>
15689int
15690main ()
15691{
15692void *x=resize_term
15693 ;
15694 return 0;
15695}
15696_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015697if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015698
Matthias Kloseb9621712010-04-24 17:59:49 +000015699$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015700
Matthias Kloseb159a552010-04-25 21:00:44 +000015701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015702$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015703else
Matthias Kloseb9621712010-04-24 17:59:49 +000015704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15705$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015706
15707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15709
Matthias Kloseb9621712010-04-24 17:59:49 +000015710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15711$as_echo_n "checking for resizeterm... " >&6; }
15712cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015713/* end confdefs.h. */
15714#include <curses.h>
15715int
15716main ()
15717{
15718void *x=resizeterm
15719 ;
15720 return 0;
15721}
15722_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015723if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015724
Matthias Kloseb9621712010-04-24 17:59:49 +000015725$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015726
Matthias Kloseb159a552010-04-25 21:00:44 +000015727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015728$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015729else
Matthias Kloseb9621712010-04-24 17:59:49 +000015730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15731$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015732
15733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015735# last curses configure check
15736CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015737
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15739$as_echo "$as_me: checking for device files" >&6;}
15740
15741if test "x$cross_compiling" = xyes; then
15742 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15744$as_echo_n "checking for /dev/ptmx... " >&6; }
15745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15746$as_echo "not set" >&6; }
15747 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15748 fi
15749 if test "${ac_cv_file__dev_ptc+set}" != set; then
15750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15751$as_echo_n "checking for /dev/ptc... " >&6; }
15752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15753$as_echo "not set" >&6; }
15754 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15755 fi
15756fi
15757
Matthias Kloseb9621712010-04-24 17:59:49 +000015758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15759$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015760if ${ac_cv_file__dev_ptmx+:} false; then :
15761 $as_echo_n "(cached) " >&6
15762else
15763 test "$cross_compiling" = yes &&
15764 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15765if test -r "/dev/ptmx"; then
15766 ac_cv_file__dev_ptmx=yes
15767else
15768 ac_cv_file__dev_ptmx=no
15769fi
15770fi
15771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15772$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15773if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015774
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015775fi
15776
15777if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015778
Matthias Kloseb9621712010-04-24 17:59:49 +000015779$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015780
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15783$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015784if ${ac_cv_file__dev_ptc+:} false; then :
15785 $as_echo_n "(cached) " >&6
15786else
15787 test "$cross_compiling" = yes &&
15788 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15789if test -r "/dev/ptc"; then
15790 ac_cv_file__dev_ptc=yes
15791else
15792 ac_cv_file__dev_ptc=no
15793fi
15794fi
15795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15796$as_echo "$ac_cv_file__dev_ptc" >&6; }
15797if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015798
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015799fi
15800
15801if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015802
Matthias Kloseb9621712010-04-24 17:59:49 +000015803$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015804
Neal Norwitz865400f2003-03-21 01:42:58 +000015805fi
15806
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015807if test "$have_long_long" = yes
15808then
Matthias Kloseb9621712010-04-24 17:59:49 +000015809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
15810$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015811 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015813else
Matthias Kloseb9621712010-04-24 17:59:49 +000015814 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015815 ac_cv_have_long_long_format="cross -- assuming no"
15816 if test x$GCC = xyes; then
15817 save_CFLAGS=$CFLAGS
15818 CFLAGS="$CFLAGS -Werror -Wformat"
15819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15820/* end confdefs.h. */
15821
15822 #include <stdio.h>
15823 #include <stddef.h>
15824
15825int
15826main ()
15827{
15828
15829 char *buffer;
15830 sprintf(buffer, "%lld", (long long)123);
15831 sprintf(buffer, "%lld", (long long)-123);
15832 sprintf(buffer, "%llu", (unsigned long long)123);
15833
15834 ;
15835 return 0;
15836}
15837_ACEOF
15838if ac_fn_c_try_compile "$LINENO"; then :
15839 ac_cv_have_long_long_format=yes
15840
15841fi
15842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15843 CFLAGS=$save_CFLAGS
15844 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015845else
Matthias Kloseb9621712010-04-24 17:59:49 +000015846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015847/* end confdefs.h. */
15848
15849 #include <stdio.h>
15850 #include <stddef.h>
15851 #include <string.h>
15852
15853 #ifdef HAVE_SYS_TYPES_H
15854 #include <sys/types.h>
15855 #endif
15856
15857 int main()
15858 {
15859 char buffer[256];
15860
15861 if (sprintf(buffer, "%lld", (long long)123) < 0)
15862 return 1;
15863 if (strcmp(buffer, "123"))
15864 return 1;
15865
15866 if (sprintf(buffer, "%lld", (long long)-123) < 0)
15867 return 1;
15868 if (strcmp(buffer, "-123"))
15869 return 1;
15870
15871 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15872 return 1;
15873 if (strcmp(buffer, "123"))
15874 return 1;
15875
15876 return 0;
15877 }
15878
15879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015880if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015881 ac_cv_have_long_long_format=yes
15882else
Matthias Kloseb9621712010-04-24 17:59:49 +000015883 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15886 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015887fi
15888
15889
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015890fi
15891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
15893$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015894fi
15895
Mark Dickinson89d7d412009-12-31 20:50:59 +000015896if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015897then
15898
Matthias Kloseb9621712010-04-24 17:59:49 +000015899$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015900
15901fi
15902
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015903if test $ac_sys_system = Darwin
15904then
15905 LIBS="$LIBS -framework CoreFoundation"
15906fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015907
Matthias Kloseb9621712010-04-24 17:59:49 +000015908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15909$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015910if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015911 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015912else
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015914 ac_cv_have_size_t_format="cross -- assuming yes"
15915
Thomas Wouters477c8d52006-05-27 19:21:47 +000015916else
Matthias Kloseb9621712010-04-24 17:59:49 +000015917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015918/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015919
Thomas Wouters477c8d52006-05-27 19:21:47 +000015920#include <stdio.h>
15921#include <stddef.h>
15922#include <string.h>
15923
Christian Heimes2c181612007-12-17 20:04:13 +000015924#ifdef HAVE_SYS_TYPES_H
15925#include <sys/types.h>
15926#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015927
15928#ifdef HAVE_SSIZE_T
15929typedef ssize_t Py_ssize_t;
15930#elif SIZEOF_VOID_P == SIZEOF_LONG
15931typedef long Py_ssize_t;
15932#else
15933typedef int Py_ssize_t;
15934#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015935
Christian Heimes2c181612007-12-17 20:04:13 +000015936int main()
15937{
15938 char buffer[256];
15939
Thomas Wouters477c8d52006-05-27 19:21:47 +000015940 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15941 return 1;
15942
Thomas Wouters89f507f2006-12-13 04:49:30 +000015943 if (strcmp(buffer, "123"))
15944 return 1;
15945
15946 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15947 return 1;
15948
15949 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015950 return 1;
15951
15952 return 0;
15953}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015954
Thomas Wouters477c8d52006-05-27 19:21:47 +000015955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015956if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015957 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015958else
Matthias Kloseb9621712010-04-24 17:59:49 +000015959 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015961rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15962 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015963fi
15964
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15967$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015968if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015969
Matthias Kloseb9621712010-04-24 17:59:49 +000015970$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015971
15972fi
15973
Matthias Kloseb9621712010-04-24 17:59:49 +000015974ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015975#ifdef HAVE_SYS_TYPES_H
15976#include <sys/types.h>
15977#endif
15978#ifdef HAVE_SYS_SOCKET_H
15979#include <sys/socket.h>
15980#endif
15981
Matthias Kloseb9621712010-04-24 17:59:49 +000015982"
Victor Stinnere0be4232011-10-25 13:06:09 +020015983if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015984
Martin v. Löwis11437992002-04-12 09:54:03 +000015985else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015986
Matthias Kloseb9621712010-04-24 17:59:49 +000015987$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015988
15989fi
15990
Michael W. Hudson54241132001-12-07 15:38:26 +000015991
Matthias Kloseb9621712010-04-24 17:59:49 +000015992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15993$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015994if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015995 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015996else
Matthias Kloseb9621712010-04-24 17:59:49 +000015997 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015998 ac_cv_broken_mbstowcs=no
15999else
Matthias Kloseb9621712010-04-24 17:59:49 +000016000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016001/* end confdefs.h. */
16002
Stefan Krah19c21392012-11-22 23:47:32 +010016003#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016004#include<stdlib.h>
16005int main() {
16006 size_t len = -1;
16007 const char *str = "text";
16008 len = mbstowcs(NULL, str, 0);
16009 return (len != 4);
16010}
16011
16012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016013if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016014 ac_cv_broken_mbstowcs=no
16015else
Matthias Kloseb9621712010-04-24 17:59:49 +000016016 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016017fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016018rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16019 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016020fi
16021
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016022fi
16023
Matthias Kloseb9621712010-04-24 17:59:49 +000016024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16025$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016026if test "$ac_cv_broken_mbstowcs" = yes
16027then
16028
Matthias Kloseb9621712010-04-24 17:59:49 +000016029$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016030
16031fi
16032
Antoine Pitroub52ec782009-01-25 16:34:23 +000016033# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16035$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016036
16037# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016038if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016039 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016040if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016041then
16042
Matthias Kloseb9621712010-04-24 17:59:49 +000016043$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016044
Matthias Kloseb9621712010-04-24 17:59:49 +000016045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16046$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016047fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016048if test "$withval" = no
16049then
16050
16051$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16052
Matthias Kloseb9621712010-04-24 17:59:49 +000016053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16054$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016055fi
16056
Antoine Pitrou042b1282010-08-13 21:15:58 +000016057else
16058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16059$as_echo "no value specified" >&6; }
16060fi
16061
Antoine Pitroub52ec782009-01-25 16:34:23 +000016062
Matthias Kloseb17289e2012-03-15 19:51:34 +010016063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16064$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16065if ${ac_cv_computed_gotos+:} false; then :
16066 $as_echo_n "(cached) " >&6
16067else
16068 if test "$cross_compiling" = yes; then :
16069 if test "${with_computed_gotos+set}" = set; then
16070 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16071 else
16072 ac_cv_computed_gotos=no
16073 fi
16074else
16075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16076/* end confdefs.h. */
16077
16078int main(int argc, char **argv)
16079{
16080 static void *targets[1] = { &&LABEL1 };
16081 goto LABEL2;
16082LABEL1:
16083 return 0;
16084LABEL2:
16085 goto *targets[0];
16086 return 1;
16087}
16088
16089_ACEOF
16090if ac_fn_c_try_run "$LINENO"; then :
16091 ac_cv_computed_gotos=yes
16092else
16093 ac_cv_computed_gotos=no
16094fi
16095rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16096 conftest.$ac_objext conftest.beam conftest.$ac_ext
16097fi
16098
16099fi
16100
16101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16102$as_echo "$ac_cv_computed_gotos" >&6; }
16103case "$ac_cv_computed_gotos" in yes*)
16104
16105$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16106
16107esac
16108
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016109case $ac_sys_system in
16110AIX*)
16111
16112$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16113 ;;
16114esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016115
Michael W. Hudson54241132001-12-07 15:38:26 +000016116
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016117
16118
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016119for h in `(cd $srcdir;echo Python/thread_*.h)`
16120do
16121 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16122done
16123
Michael W. Hudson54241132001-12-07 15:38:26 +000016124
Ned Deily0db50cf2014-07-25 12:41:31 -070016125SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16127$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016128for dir in $SRCDIRS; do
16129 if test ! -d $dir; then
16130 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016131 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016132done
Matthias Kloseb9621712010-04-24 17:59:49 +000016133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16134$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016135
Stefan Krah1919b7e2012-03-21 18:25:23 +010016136# Availability of -O2:
16137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16138$as_echo_n "checking for -O2... " >&6; }
16139saved_cflags="$CFLAGS"
16140CFLAGS="-O2"
16141cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16142/* end confdefs.h. */
16143
16144int
16145main ()
16146{
16147
16148
16149 ;
16150 return 0;
16151}
16152_ACEOF
16153if ac_fn_c_try_compile "$LINENO"; then :
16154 have_O2=yes
16155else
16156 have_O2=no
16157fi
16158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16160$as_echo "$have_O2" >&6; }
16161CFLAGS="$saved_cflags"
16162
16163# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16164# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16166$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16167saved_cflags="$CFLAGS"
16168CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16169if test "$have_O2" = no; then
16170 CFLAGS=""
16171fi
16172if test "$cross_compiling" = yes; then :
16173 have_glibc_memmove_bug=undefined
16174else
16175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16176/* end confdefs.h. */
16177
16178#include <stdio.h>
16179#include <stdlib.h>
16180#include <string.h>
16181void foo(void *p, void *q) { memmove(p, q, 19); }
16182int main() {
16183 char a[32] = "123456789000000000";
16184 foo(&a[9], a);
16185 if (strcmp(a, "123456789123456789000000000") != 0)
16186 return 1;
16187 foo(a, &a[9]);
16188 if (strcmp(a, "123456789000000000") != 0)
16189 return 1;
16190 return 0;
16191}
16192
16193_ACEOF
16194if ac_fn_c_try_run "$LINENO"; then :
16195 have_glibc_memmove_bug=no
16196else
16197 have_glibc_memmove_bug=yes
16198fi
16199rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16200 conftest.$ac_objext conftest.beam conftest.$ac_ext
16201fi
16202
16203CFLAGS="$saved_cflags"
16204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16205$as_echo "$have_glibc_memmove_bug" >&6; }
16206if test "$have_glibc_memmove_bug" = yes; then
16207
16208$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16209
16210fi
16211
16212if test "$have_gcc_asm_for_x87" = yes; then
16213 # Some versions of gcc miscompile inline asm:
16214 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16215 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16216 case $CC in
16217 *gcc*)
16218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16219$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16220 saved_cflags="$CFLAGS"
16221 CFLAGS="-O2"
16222 if test "$cross_compiling" = yes; then :
16223 have_ipa_pure_const_bug=undefined
16224else
16225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16226/* end confdefs.h. */
16227
16228 __attribute__((noinline)) int
16229 foo(int *p) {
16230 int r;
16231 asm ( "movl \$6, (%1)\n\t"
16232 "xorl %0, %0\n\t"
16233 : "=r" (r) : "r" (p) : "memory"
16234 );
16235 return r;
16236 }
16237 int main() {
16238 int p = 8;
16239 if ((foo(&p) ? : p) != 6)
16240 return 1;
16241 return 0;
16242 }
16243
16244_ACEOF
16245if ac_fn_c_try_run "$LINENO"; then :
16246 have_ipa_pure_const_bug=no
16247else
16248 have_ipa_pure_const_bug=yes
16249fi
16250rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16251 conftest.$ac_objext conftest.beam conftest.$ac_ext
16252fi
16253
16254 CFLAGS="$saved_cflags"
16255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16256$as_echo "$have_ipa_pure_const_bug" >&6; }
16257 if test "$have_ipa_pure_const_bug" = yes; then
16258
16259$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16260
16261 fi
16262 ;;
16263 esac
16264fi
16265
Victor Stinner4f5366e2015-01-09 02:13:19 +010016266# Check for stdatomic.h
16267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16268$as_echo_n "checking for stdatomic.h... " >&6; }
16269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16270/* end confdefs.h. */
16271
16272
16273 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016274 atomic_int value = ATOMIC_VAR_INIT(1);
16275 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016276 int main() {
16277 int loaded_value = atomic_load(&value);
16278 return 0;
16279 }
16280
16281
16282_ACEOF
16283if ac_fn_c_try_link "$LINENO"; then :
16284 have_stdatomic_h=yes
16285else
16286 have_stdatomic_h=no
16287fi
16288rm -f core conftest.err conftest.$ac_objext \
16289 conftest$ac_exeext conftest.$ac_ext
16290
16291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16292$as_echo "$have_stdatomic_h" >&6; }
16293
16294if test "$have_stdatomic_h" = yes; then
16295
16296$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16297
16298fi
16299
16300# Check for GCC >= 4.7 __atomic builtins
16301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16302$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16304/* end confdefs.h. */
16305
16306
16307 volatile int val = 1;
16308 int main() {
16309 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16310 return 0;
16311 }
16312
16313
16314_ACEOF
16315if ac_fn_c_try_link "$LINENO"; then :
16316 have_builtin_atomic=yes
16317else
16318 have_builtin_atomic=no
16319fi
16320rm -f core conftest.err conftest.$ac_objext \
16321 conftest$ac_exeext conftest.$ac_ext
16322
16323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16324$as_echo "$have_builtin_atomic" >&6; }
16325
16326if test "$have_builtin_atomic" = yes; then
16327
16328$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16329
16330fi
16331
Ned Deily322f5ba2013-11-21 23:01:59 -080016332# ensurepip option
16333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16334$as_echo_n "checking for ensurepip... " >&6; }
16335
16336# Check whether --with-ensurepip was given.
16337if test "${with_ensurepip+set}" = set; then :
16338 withval=$with_ensurepip;
16339else
16340 with_ensurepip=upgrade
16341fi
16342
16343case $with_ensurepip in #(
16344 yes|upgrade) :
16345 ENSUREPIP=upgrade ;; #(
16346 install) :
16347 ENSUREPIP=install ;; #(
16348 no) :
16349 ENSUREPIP=no ;; #(
16350 *) :
16351 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16352esac
16353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16354$as_echo "$ENSUREPIP" >&6; }
16355
16356
Victor Stinner35a97c02015-03-08 02:59:09 +010016357# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16359$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16361/* end confdefs.h. */
16362
16363
16364 #include <dirent.h>
16365
16366 int main() {
16367 struct dirent entry;
16368 return entry.d_type == DT_UNKNOWN;
16369 }
16370
16371
16372_ACEOF
16373if ac_fn_c_try_link "$LINENO"; then :
16374 have_dirent_d_type=yes
16375else
16376 have_dirent_d_type=no
16377fi
16378rm -f core conftest.err conftest.$ac_objext \
16379 conftest$ac_exeext conftest.$ac_ext
16380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16381$as_echo "$have_dirent_d_type" >&6; }
16382
16383if test "$have_dirent_d_type" = yes; then
16384
16385$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16386
16387fi
16388
Victor Stinner9eb57c52015-03-19 22:21:49 +010016389# check if the Linux getrandom() syscall is available
16390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16391$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16392cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16393/* end confdefs.h. */
16394
16395
Victor Stinner1b80b242016-04-12 22:34:58 +020016396 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016397 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016398 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016399
16400 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016401 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016402 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016403 const int flags = GRND_NONBLOCK;
16404 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016405 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016406 return 0;
16407 }
16408
16409
16410_ACEOF
16411if ac_fn_c_try_link "$LINENO"; then :
16412 have_getrandom_syscall=yes
16413else
16414 have_getrandom_syscall=no
16415fi
16416rm -f core conftest.err conftest.$ac_objext \
16417 conftest$ac_exeext conftest.$ac_ext
16418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16419$as_echo "$have_getrandom_syscall" >&6; }
16420
16421if test "$have_getrandom_syscall" = yes; then
16422
16423$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16424
16425fi
16426
Victor Stinner3abf44e2015-09-18 15:38:37 +020016427# check if the getrandom() function is available
16428# the test was written for the Solaris function of <sys/random.h>
16429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16430$as_echo_n "checking for the getrandom() function... " >&6; }
16431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16432/* end confdefs.h. */
16433
16434
16435 #include <sys/random.h>
16436
16437 int main() {
16438 char buffer[1];
16439 const size_t buflen = sizeof(buffer);
16440 const int flags = 0;
16441 /* ignore the result, Python checks for ENOSYS at runtime */
16442 (void)getrandom(buffer, buflen, flags);
16443 return 0;
16444 }
16445
16446
16447_ACEOF
16448if ac_fn_c_try_link "$LINENO"; then :
16449 have_getrandom=yes
16450else
16451 have_getrandom=no
16452fi
16453rm -f core conftest.err conftest.$ac_objext \
16454 conftest$ac_exeext conftest.$ac_ext
16455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16456$as_echo "$have_getrandom" >&6; }
16457
16458if test "$have_getrandom" = yes; then
16459
16460$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16461
16462fi
16463
Guido van Rossum627b2d71993-12-24 10:39:16 +000016464# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016465ac_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 +000016466
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016467ac_config_files="$ac_config_files Modules/ld_so_aix"
16468
Martin v. Löwis11437992002-04-12 09:54:03 +000016469cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016470# This file is a shell script that caches the results of configure
16471# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016472# scripts and configure runs, see configure's option --config-cache.
16473# It is not useful on other systems. If it contains results you don't
16474# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016475#
Martin v. Löwis11437992002-04-12 09:54:03 +000016476# config.status only pays attention to the cache file if you give it
16477# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016478#
Skip Montanaro6dead952003-09-25 14:50:04 +000016479# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016480# loading this file, other *unset* `ac_cv_foo' will be assigned the
16481# following values.
16482
16483_ACEOF
16484
Guido van Rossumf78abae1997-01-21 22:02:36 +000016485# The following way of writing the cache mishandles newlines in values,
16486# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016487# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016488# Ultrix sh set writes to stderr and can't be redirected directly,
16489# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016490(
16491 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16492 eval ac_val=\$$ac_var
16493 case $ac_val in #(
16494 *${as_nl}*)
16495 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016496 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16497$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016498 esac
16499 case $ac_var in #(
16500 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016501 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16502 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016503 esac ;;
16504 esac
16505 done
16506
Martin v. Löwis11437992002-04-12 09:54:03 +000016507 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016508 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16509 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016510 # `set' does not quote correctly, so add quotes: double-quote
16511 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016512 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016513 "s/'/'\\\\''/g;
16514 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016515 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016516 *)
16517 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016519 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016520 esac |
16521 sort
16522) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016523 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016524 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016525 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016526 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016527 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16528 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16530 :end' >>confcache
16531if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16532 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016533 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016534 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16535$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016536 if test ! -f "$cache_file" || test -h "$cache_file"; then
16537 cat confcache >"$cache_file"
16538 else
16539 case $cache_file in #(
16540 */* | ?:*)
16541 mv -f confcache "$cache_file"$$ &&
16542 mv -f "$cache_file"$$ "$cache_file" ;; #(
16543 *)
16544 mv -f confcache "$cache_file" ;;
16545 esac
16546 fi
16547 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016548 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016549 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16550$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016551 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016552fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016553rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016554
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016555test "x$prefix" = xNONE && prefix=$ac_default_prefix
16556# Let make expand exec_prefix.
16557test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016558
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016559DEFS=-DHAVE_CONFIG_H
16560
Skip Montanaro6dead952003-09-25 14:50:04 +000016561ac_libobjs=
16562ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016563U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016564for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16565 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016566 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016567 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16569 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016570 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16571 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016572done
16573LIBOBJS=$ac_libobjs
16574
16575LTLIBOBJS=$ac_ltlibobjs
16576
16577
Martin v. Löwis11437992002-04-12 09:54:03 +000016578
Matthias Kloseb9621712010-04-24 17:59:49 +000016579
Victor Stinnere0be4232011-10-25 13:06:09 +020016580: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016581ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016582ac_clean_files_save=$ac_clean_files
16583ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016584{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16585$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16586as_write_fail=0
16587cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016588#! $SHELL
16589# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016590# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016591# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016592# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016593
Martin v. Löwis11437992002-04-12 09:54:03 +000016594debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016595ac_cs_recheck=false
16596ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016597
Matthias Kloseb9621712010-04-24 17:59:49 +000016598SHELL=\${CONFIG_SHELL-$SHELL}
16599export SHELL
16600_ASEOF
16601cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16602## -------------------- ##
16603## M4sh Initialization. ##
16604## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016606# Be more Bourne compatible
16607DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016608if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016609 emulate sh
16610 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016611 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016612 # is contrary to our usage. Disable this feature.
16613 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016614 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016615else
Matthias Kloseb9621712010-04-24 17:59:49 +000016616 case `(set -o) 2>/dev/null` in #(
16617 *posix*) :
16618 set -o posix ;; #(
16619 *) :
16620 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016622fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016623
16624
Matthias Kloseb9621712010-04-24 17:59:49 +000016625as_nl='
16626'
16627export as_nl
16628# Printing a long string crashes Solaris 7 /usr/bin/printf.
16629as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16630as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16631as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16632# Prefer a ksh shell builtin over an external printf program on Solaris,
16633# but without wasting forks for bash or zsh.
16634if test -z "$BASH_VERSION$ZSH_VERSION" \
16635 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16636 as_echo='print -r --'
16637 as_echo_n='print -rn --'
16638elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16639 as_echo='printf %s\n'
16640 as_echo_n='printf %s'
16641else
16642 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16643 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16644 as_echo_n='/usr/ucb/echo -n'
16645 else
16646 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16647 as_echo_n_body='eval
16648 arg=$1;
16649 case $arg in #(
16650 *"$as_nl"*)
16651 expr "X$arg" : "X\\(.*\\)$as_nl";
16652 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16653 esac;
16654 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16655 '
16656 export as_echo_n_body
16657 as_echo_n='sh -c $as_echo_n_body as_echo'
16658 fi
16659 export as_echo_body
16660 as_echo='sh -c $as_echo_body as_echo'
16661fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016662
16663# The user is always right.
16664if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016665 PATH_SEPARATOR=:
16666 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16667 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16668 PATH_SEPARATOR=';'
16669 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672
16673# IFS
16674# We need space, tab and new line, in precisely that order. Quoting is
16675# there to prevent editors from complaining about space-tab.
16676# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16677# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016678IFS=" "" $as_nl"
16679
16680# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016681as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016682case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683 *[\\/]* ) as_myself=$0 ;;
16684 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016685for as_dir in $PATH
16686do
16687 IFS=$as_save_IFS
16688 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016689 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16690 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016691IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016693 ;;
16694esac
16695# We did not find ourselves, most probably we were run as `sh COMMAND'
16696# in which case we are not to be found in the path.
16697if test "x$as_myself" = x; then
16698 as_myself=$0
16699fi
16700if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016701 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16702 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703fi
16704
Matthias Kloseb9621712010-04-24 17:59:49 +000016705# Unset variables that we do not need and which cause bugs (e.g. in
16706# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16707# suppresses any "Segmentation fault" message there. '((' could
16708# trigger a bug in pdksh 5.2.14.
16709for as_var in BASH_ENV ENV MAIL MAILPATH
16710do eval test x\${$as_var+set} = xset \
16711 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016712done
16713PS1='$ '
16714PS2='> '
16715PS4='+ '
16716
16717# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016718LC_ALL=C
16719export LC_ALL
16720LANGUAGE=C
16721export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016722
Matthias Kloseb9621712010-04-24 17:59:49 +000016723# CDPATH.
16724(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16725
16726
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016727# as_fn_error STATUS ERROR [LINENO LOG_FD]
16728# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016729# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16730# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016731# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016732as_fn_error ()
16733{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016734 as_status=$1; test $as_status -eq 0 && as_status=1
16735 if test "$4"; then
16736 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16737 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016738 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016739 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016740 as_fn_exit $as_status
16741} # as_fn_error
16742
16743
16744# as_fn_set_status STATUS
16745# -----------------------
16746# Set $? to STATUS, without forking.
16747as_fn_set_status ()
16748{
16749 return $1
16750} # as_fn_set_status
16751
16752# as_fn_exit STATUS
16753# -----------------
16754# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16755as_fn_exit ()
16756{
16757 set +e
16758 as_fn_set_status $1
16759 exit $1
16760} # as_fn_exit
16761
16762# as_fn_unset VAR
16763# ---------------
16764# Portably unset VAR.
16765as_fn_unset ()
16766{
16767 { eval $1=; unset $1;}
16768}
16769as_unset=as_fn_unset
16770# as_fn_append VAR VALUE
16771# ----------------------
16772# Append the text in VALUE to the end of the definition contained in VAR. Take
16773# advantage of any shell optimizations that allow amortized linear growth over
16774# repeated appends, instead of the typical quadratic growth present in naive
16775# implementations.
16776if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16777 eval 'as_fn_append ()
16778 {
16779 eval $1+=\$2
16780 }'
16781else
16782 as_fn_append ()
16783 {
16784 eval $1=\$$1\$2
16785 }
16786fi # as_fn_append
16787
16788# as_fn_arith ARG...
16789# ------------------
16790# Perform arithmetic evaluation on the ARGs, and store the result in the
16791# global $as_val. Take advantage of shells that can avoid forks. The arguments
16792# must be portable across $(()) and expr.
16793if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16794 eval 'as_fn_arith ()
16795 {
16796 as_val=$(( $* ))
16797 }'
16798else
16799 as_fn_arith ()
16800 {
16801 as_val=`expr "$@" || test $? -eq 1`
16802 }
16803fi # as_fn_arith
16804
16805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806if expr a : '\(a\)' >/dev/null 2>&1 &&
16807 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16808 as_expr=expr
16809else
16810 as_expr=false
16811fi
16812
16813if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16814 as_basename=basename
16815else
16816 as_basename=false
16817fi
16818
Matthias Kloseb9621712010-04-24 17:59:49 +000016819if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16820 as_dirname=dirname
16821else
16822 as_dirname=false
16823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016825as_me=`$as_basename -- "$0" ||
16826$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16827 X"$0" : 'X\(//\)$' \| \
16828 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016829$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016830 sed '/^.*\/\([^/][^/]*\)\/*$/{
16831 s//\1/
16832 q
16833 }
16834 /^X\/\(\/\/\)$/{
16835 s//\1/
16836 q
16837 }
16838 /^X\/\(\/\).*/{
16839 s//\1/
16840 q
16841 }
16842 s/.*/./; q'`
16843
Matthias Kloseb9621712010-04-24 17:59:49 +000016844# Avoid depending upon Character Ranges.
16845as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16846as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16847as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16848as_cr_digits='0123456789'
16849as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016850
16851ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016852case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016853-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016854 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016856 xy) ECHO_C='\c';;
16857 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16858 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859 esac;;
16860*)
16861 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016862esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016863
Martin v. Löwis11437992002-04-12 09:54:03 +000016864rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865if test -d conf$$.dir; then
16866 rm -f conf$$.dir/conf$$.file
16867else
16868 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016869 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016870fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016871if (echo >conf$$.file) 2>/dev/null; then
16872 if ln -s conf$$.file conf$$ 2>/dev/null; then
16873 as_ln_s='ln -s'
16874 # ... but there are two gotchas:
16875 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16876 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016877 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016878 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016879 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016880 elif ln conf$$.file conf$$ 2>/dev/null; then
16881 as_ln_s=ln
16882 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016883 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016884 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016885else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016886 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016888rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16889rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016890
Matthias Kloseb9621712010-04-24 17:59:49 +000016891
16892# as_fn_mkdir_p
16893# -------------
16894# Create "$as_dir" as a directory, including parents if necessary.
16895as_fn_mkdir_p ()
16896{
16897
16898 case $as_dir in #(
16899 -*) as_dir=./$as_dir;;
16900 esac
16901 test -d "$as_dir" || eval $as_mkdir_p || {
16902 as_dirs=
16903 while :; do
16904 case $as_dir in #(
16905 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16906 *) as_qdir=$as_dir;;
16907 esac
16908 as_dirs="'$as_qdir' $as_dirs"
16909 as_dir=`$as_dirname -- "$as_dir" ||
16910$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16911 X"$as_dir" : 'X\(//\)[^/]' \| \
16912 X"$as_dir" : 'X\(//\)$' \| \
16913 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16914$as_echo X"$as_dir" |
16915 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16916 s//\1/
16917 q
16918 }
16919 /^X\(\/\/\)[^/].*/{
16920 s//\1/
16921 q
16922 }
16923 /^X\(\/\/\)$/{
16924 s//\1/
16925 q
16926 }
16927 /^X\(\/\).*/{
16928 s//\1/
16929 q
16930 }
16931 s/.*/./; q'`
16932 test -d "$as_dir" && break
16933 done
16934 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016935 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016936
16937
16938} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016939if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016940 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016941else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016942 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016943 as_mkdir_p=false
16944fi
16945
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016946
16947# as_fn_executable_p FILE
16948# -----------------------
16949# Test if FILE is an executable regular file.
16950as_fn_executable_p ()
16951{
16952 test -f "$1" && test -x "$1"
16953} # as_fn_executable_p
16954as_test_x='test -x'
16955as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016956
16957# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016958as_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 +000016959
16960# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016961as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016962
16963
Martin v. Löwis11437992002-04-12 09:54:03 +000016964exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016965## ----------------------------------- ##
16966## Main body of $CONFIG_STATUS script. ##
16967## ----------------------------------- ##
16968_ASEOF
16969test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016970
Matthias Kloseb9621712010-04-24 17:59:49 +000016971cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16972# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016973# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016974# values after options handling.
16975ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016976This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016977generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016978
16979 CONFIG_FILES = $CONFIG_FILES
16980 CONFIG_HEADERS = $CONFIG_HEADERS
16981 CONFIG_LINKS = $CONFIG_LINKS
16982 CONFIG_COMMANDS = $CONFIG_COMMANDS
16983 $ $0 $@
16984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016985on `(hostname || uname -n) 2>/dev/null | sed 1q`
16986"
16987
Martin v. Löwis11437992002-04-12 09:54:03 +000016988_ACEOF
16989
Matthias Kloseb9621712010-04-24 17:59:49 +000016990case $ac_config_files in *"
16991"*) set x $ac_config_files; shift; ac_config_files=$*;;
16992esac
16993
16994case $ac_config_headers in *"
16995"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16996esac
16997
16998
16999cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017000# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017001config_files="$ac_config_files"
17002config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017004_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017005
Matthias Kloseb9621712010-04-24 17:59:49 +000017006cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017007ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017008\`$as_me' instantiates files and other configuration actions
17009from templates according to the current configuration. Unless the files
17010and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017011
Matthias Kloseb9621712010-04-24 17:59:49 +000017012Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017013
17014 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017015 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017016 --config print configuration, then exit
17017 -q, --quiet, --silent
17018 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017019 -d, --debug don't remove temporary files
17020 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017021 --file=FILE[:TEMPLATE]
17022 instantiate the configuration file FILE
17023 --header=FILE[:TEMPLATE]
17024 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017025
17026Configuration files:
17027$config_files
17028
17029Configuration headers:
17030$config_headers
17031
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017032Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017034_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017035cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17036ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017037ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050017038python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017039configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017040 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017041
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017042Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017043This config.status script is free software; the Free Software Foundation
17044gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045
17046ac_pwd='$ac_pwd'
17047srcdir='$srcdir'
17048INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017049MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017050test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017051_ACEOF
17052
Matthias Kloseb9621712010-04-24 17:59:49 +000017053cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17054# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017055ac_need_defaults=:
17056while test $# != 0
17057do
17058 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017059 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17061 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017062 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017063 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017064 --*=)
17065 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17066 ac_optarg=
17067 ac_shift=:
17068 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017070 ac_option=$1
17071 ac_optarg=$2
17072 ac_shift=shift
17073 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017074 esac
17075
Skip Montanaro6dead952003-09-25 14:50:04 +000017076 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017077 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017078 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17079 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017080 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017081 $as_echo "$ac_cs_version"; exit ;;
17082 --config | --confi | --conf | --con | --co | --c )
17083 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017084 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017085 debug=: ;;
17086 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017087 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017088 case $ac_optarg in
17089 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017090 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017091 esac
17092 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017093 ac_need_defaults=false;;
17094 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017095 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017096 case $ac_optarg in
17097 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17098 esac
17099 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017100 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101 --he | --h)
17102 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017103 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017104Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017105 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017106 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017107 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17108 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17109 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017110
17111 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017112 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017113Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017114
Matthias Kloseb9621712010-04-24 17:59:49 +000017115 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017116 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017117
17118 esac
17119 shift
17120done
17121
Skip Montanaro6dead952003-09-25 14:50:04 +000017122ac_configure_extra_args=
17123
17124if $ac_cs_silent; then
17125 exec 6>/dev/null
17126 ac_configure_extra_args="$ac_configure_extra_args --silent"
17127fi
17128
17129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017130cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017131if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017132 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017133 shift
17134 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17135 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017136 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017137 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017138fi
17139
Martin v. Löwis11437992002-04-12 09:54:03 +000017140_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017141cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017142exec 5>>config.log
17143{
17144 echo
17145 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17146## Running $as_me. ##
17147_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017148 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017149} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017151_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017152cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017153_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017154
Matthias Kloseb9621712010-04-24 17:59:49 +000017155cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017156
17157# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017158for ac_config_target in $ac_config_targets
17159do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160 case $ac_config_target in
17161 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17162 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17163 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017164 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17165 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17167 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017168 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017169 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017170 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017171
Victor Stinnere0be4232011-10-25 13:06:09 +020017172 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017173 esac
17174done
17175
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017176
Martin v. Löwis11437992002-04-12 09:54:03 +000017177# If the user did not use the arguments to specify the items to instantiate,
17178# then the envvar interface is used. Set only those that are not.
17179# We use the long form for the default assignment because of an extremely
17180# bizarre bug on SunOS 4.1.3.
17181if $ac_need_defaults; then
17182 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17183 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17184fi
17185
Skip Montanaro6dead952003-09-25 14:50:04 +000017186# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017187# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017188# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017189# Hook for its removal unless debugging.
17190# Note that there is a small window in which the directory will not be cleaned:
17191# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017192$debug ||
17193{
Victor Stinnere0be4232011-10-25 13:06:09 +020017194 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017196 : "${ac_tmp:=$tmp}"
17197 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017198' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017199 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017200}
Martin v. Löwis11437992002-04-12 09:54:03 +000017201# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017202
Martin v. Löwis11437992002-04-12 09:54:03 +000017203{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017204 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017205 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017206} ||
17207{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017208 tmp=./conf$$-$RANDOM
17209 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017210} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017211ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017212
Matthias Kloseb9621712010-04-24 17:59:49 +000017213# Set up the scripts for CONFIG_FILES section.
17214# No need to generate them if there are no CONFIG_FILES.
17215# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017216if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017217
Matthias Kloseb9621712010-04-24 17:59:49 +000017218
17219ac_cr=`echo X | tr X '\015'`
17220# On cygwin, bash can eat \r inside `` if the user requested igncr.
17221# But we know of no other shell where ac_cr would be empty at this
17222# point, so we can use a bashism as a fallback.
17223if test "x$ac_cr" = x; then
17224 eval ac_cr=\$\'\\r\'
17225fi
17226ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17227if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017228 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017229else
17230 ac_cs_awk_cr=$ac_cr
17231fi
17232
Victor Stinnere0be4232011-10-25 13:06:09 +020017233echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017234_ACEOF
17235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017236
Matthias Kloseb9621712010-04-24 17:59:49 +000017237{
17238 echo "cat >conf$$subs.awk <<_ACEOF" &&
17239 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17240 echo "_ACEOF"
17241} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017242 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17243ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244ac_delim='%!_!# '
17245for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017246 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017247 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017248
Matthias Kloseb9621712010-04-24 17:59:49 +000017249 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17250 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017251 break
17252 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017253 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017254 else
17255 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017256 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257done
Matthias Kloseb9621712010-04-24 17:59:49 +000017258rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017259
Matthias Kloseb9621712010-04-24 17:59:49 +000017260cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017261cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017263sed -n '
17264h
17265s/^/S["/; s/!.*/"]=/
17266p
17267g
17268s/^[^!]*!//
17269:repl
17270t repl
17271s/'"$ac_delim"'$//
17272t delim
17273:nl
17274h
17275s/\(.\{148\}\)..*/\1/
17276t more1
17277s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17278p
17279n
17280b repl
17281:more1
17282s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17283p
17284g
17285s/.\{148\}//
17286t nl
17287:delim
17288h
17289s/\(.\{148\}\)..*/\1/
17290t more2
17291s/["\\]/\\&/g; s/^/"/; s/$/"/
17292p
17293b
17294:more2
17295s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17296p
17297g
17298s/.\{148\}//
17299t delim
17300' <conf$$subs.awk | sed '
17301/^[^""]/{
17302 N
17303 s/\n//
17304}
17305' >>$CONFIG_STATUS || ac_write_fail=1
17306rm -f conf$$subs.awk
17307cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17308_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017309cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017310 for (key in S) S_is_set[key] = 1
17311 FS = ""
17312
17313}
17314{
17315 line = $ 0
17316 nfields = split(line, field, "@")
17317 substed = 0
17318 len = length(field[1])
17319 for (i = 2; i < nfields; i++) {
17320 key = field[i]
17321 keylen = length(key)
17322 if (S_is_set[key]) {
17323 value = S[key]
17324 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17325 len += length(value) + length(field[++i])
17326 substed = 1
17327 } else
17328 len += 1 + keylen
17329 }
17330
17331 print line
17332}
17333
17334_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017336cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17337if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17338 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17339else
17340 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017341fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017342 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017343_ACEOF
17344
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017345# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17346# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017347# trailing colons and then remove the whole line if VPATH becomes empty
17348# (actually we leave an empty line to preserve line numbers).
17349if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017350 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17351h
17352s///
17353s/^/:/
17354s/[ ]*$/:/
17355s/:\$(srcdir):/:/g
17356s/:\${srcdir}:/:/g
17357s/:@srcdir@:/:/g
17358s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017359s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017360x
17361s/\(=[ ]*\).*/\1/
17362G
17363s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364s/^[^=]*=[ ]*$//
17365}'
17366fi
17367
Matthias Kloseb9621712010-04-24 17:59:49 +000017368cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017369fi # test -n "$CONFIG_FILES"
17370
Matthias Kloseb9621712010-04-24 17:59:49 +000017371# Set up the scripts for CONFIG_HEADERS section.
17372# No need to generate them if there are no CONFIG_HEADERS.
17373# This happens for instance with `./config.status Makefile'.
17374if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017375cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017376BEGIN {
17377_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378
Matthias Kloseb9621712010-04-24 17:59:49 +000017379# Transform confdefs.h into an awk script `defines.awk', embedded as
17380# here-document in config.status, that substitutes the proper values into
17381# config.h.in to produce config.h.
17382
17383# Create a delimiter string that does not exist in confdefs.h, to ease
17384# handling of long lines.
17385ac_delim='%!_!# '
17386for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017387 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17388 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017389 break
17390 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017391 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017392 else
17393 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17394 fi
17395done
17396
17397# For the awk script, D is an array of macro values keyed by name,
17398# likewise P contains macro parameters if any. Preserve backslash
17399# newline sequences.
17400
17401ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17402sed -n '
17403s/.\{148\}/&'"$ac_delim"'/g
17404t rset
17405:rset
17406s/^[ ]*#[ ]*define[ ][ ]*/ /
17407t def
17408d
17409:def
17410s/\\$//
17411t bsnl
17412s/["\\]/\\&/g
17413s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17414D["\1"]=" \3"/p
17415s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17416d
17417:bsnl
17418s/["\\]/\\&/g
17419s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17420D["\1"]=" \3\\\\\\n"\\/p
17421t cont
17422s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17423t cont
17424d
17425:cont
17426n
17427s/.\{148\}/&'"$ac_delim"'/g
17428t clear
17429:clear
17430s/\\$//
17431t bsnlc
17432s/["\\]/\\&/g; s/^/"/; s/$/"/p
17433d
17434:bsnlc
17435s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17436b cont
17437' <confdefs.h | sed '
17438s/'"$ac_delim"'/"\\\
17439"/g' >>$CONFIG_STATUS || ac_write_fail=1
17440
17441cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17442 for (key in D) D_is_set[key] = 1
17443 FS = ""
17444}
17445/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17446 line = \$ 0
17447 split(line, arg, " ")
17448 if (arg[1] == "#") {
17449 defundef = arg[2]
17450 mac1 = arg[3]
17451 } else {
17452 defundef = substr(arg[1], 2)
17453 mac1 = arg[2]
17454 }
17455 split(mac1, mac2, "(") #)
17456 macro = mac2[1]
17457 prefix = substr(line, 1, index(line, defundef) - 1)
17458 if (D_is_set[macro]) {
17459 # Preserve the white space surrounding the "#".
17460 print prefix "define", macro P[macro] D[macro]
17461 next
17462 } else {
17463 # Replace #undef with comments. This is necessary, for example,
17464 # in the case of _POSIX_SOURCE, which is predefined and required
17465 # on some systems where configure will not decide to define it.
17466 if (defundef == "undef") {
17467 print "/*", prefix defundef, macro, "*/"
17468 next
17469 }
17470 }
17471}
17472{ print }
17473_ACAWK
17474_ACEOF
17475cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017476 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017477fi # test -n "$CONFIG_HEADERS"
17478
17479
17480eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17481shift
17482for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017483do
17484 case $ac_tag in
17485 :[FHLC]) ac_mode=$ac_tag; continue;;
17486 esac
17487 case $ac_mode$ac_tag in
17488 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017489 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017490 :[FH]-) ac_tag=-:-;;
17491 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17492 esac
17493 ac_save_IFS=$IFS
17494 IFS=:
17495 set x $ac_tag
17496 IFS=$ac_save_IFS
17497 shift
17498 ac_file=$1
17499 shift
17500
17501 case $ac_mode in
17502 :L) ac_source=$1;;
17503 :[FH])
17504 ac_file_inputs=
17505 for ac_f
17506 do
17507 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017508 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509 *) # Look for the file first in the build tree, then in the source tree
17510 # (if the path is not absolute). The absolute path cannot be DOS-style,
17511 # because $ac_f cannot contain `:'.
17512 test -f "$ac_f" ||
17513 case $ac_f in
17514 [\\/$]*) false;;
17515 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17516 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017517 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017518 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017519 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17520 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017521 done
17522
17523 # Let's still pretend it is `configure' which instantiates (i.e., don't
17524 # use $as_me), people would be surprised to read:
17525 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017526 configure_input='Generated from '`
17527 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17528 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017529 if test x"$ac_file" != x-; then
17530 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017531 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17532$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017533 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017534 # Neutralize special characters interpreted by sed in replacement strings.
17535 case $configure_input in #(
17536 *\&* | *\|* | *\\* )
17537 ac_sed_conf_input=`$as_echo "$configure_input" |
17538 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17539 *) ac_sed_conf_input=$configure_input;;
17540 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017541
17542 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017543 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17544 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017545 esac
17546 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017547 esac
17548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017549 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017550$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017551 X"$ac_file" : 'X\(//\)[^/]' \| \
17552 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017554$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17556 s//\1/
17557 q
17558 }
17559 /^X\(\/\/\)[^/].*/{
17560 s//\1/
17561 q
17562 }
17563 /^X\(\/\/\)$/{
17564 s//\1/
17565 q
17566 }
17567 /^X\(\/\).*/{
17568 s//\1/
17569 q
17570 }
17571 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017572 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 ac_builddir=.
17574
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017575case "$ac_dir" in
17576.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17577*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017578 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017579 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017580 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017581 case $ac_top_builddir_sub in
17582 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17583 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17584 esac ;;
17585esac
17586ac_abs_top_builddir=$ac_pwd
17587ac_abs_builddir=$ac_pwd$ac_dir_suffix
17588# for backward compatibility:
17589ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017590
17591case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017592 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017593 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017594 ac_top_srcdir=$ac_top_builddir_sub
17595 ac_abs_top_srcdir=$ac_pwd ;;
17596 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017597 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017598 ac_top_srcdir=$srcdir
17599 ac_abs_top_srcdir=$srcdir ;;
17600 *) # Relative name.
17601 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17602 ac_top_srcdir=$ac_top_build_prefix$srcdir
17603 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017604esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017605ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017606
Martin v. Löwis11437992002-04-12 09:54:03 +000017607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017608 case $ac_mode in
17609 :F)
17610 #
17611 # CONFIG_FILE
17612 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017613
17614 case $INSTALL in
17615 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017616 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017618 ac_MKDIR_P=$MKDIR_P
17619 case $MKDIR_P in
17620 [\\/$]* | ?:[\\/]* ) ;;
17621 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17622 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017623_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017624
Matthias Kloseb9621712010-04-24 17:59:49 +000017625cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017626# If the template does not know about datarootdir, expand it.
17627# FIXME: This hack should be removed a few years after 2.60.
17628ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017629ac_sed_dataroot='
17630/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017631 p
17632 q
17633}
17634/@datadir@/p
17635/@docdir@/p
17636/@infodir@/p
17637/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017638/@mandir@/p'
17639case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640*datarootdir*) ac_datarootdir_seen=yes;;
17641*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017642 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17643$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017645cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646 ac_datarootdir_hack='
17647 s&@datadir@&$datadir&g
17648 s&@docdir@&$docdir&g
17649 s&@infodir@&$infodir&g
17650 s&@localedir@&$localedir&g
17651 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017652 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017653esac
17654_ACEOF
17655
17656# Neutralize VPATH when `$srcdir' = `.'.
17657# Shell code in configure.ac might set extrasub.
17658# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017659cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17660ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017661$extrasub
17662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017663cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017664:t
17665/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017666s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017667s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017668s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017669s&@srcdir@&$ac_srcdir&;t t
17670s&@abs_srcdir@&$ac_abs_srcdir&;t t
17671s&@top_srcdir@&$ac_top_srcdir&;t t
17672s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17673s&@builddir@&$ac_builddir&;t t
17674s&@abs_builddir@&$ac_abs_builddir&;t t
17675s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17676s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017677s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017678$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017679"
Victor Stinnere0be4232011-10-25 13:06:09 +020017680eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17681 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017683test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017684 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17685 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17686 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017687 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017688which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017689$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017690which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017691
Victor Stinnere0be4232011-10-25 13:06:09 +020017692 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017693 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017694 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17695 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017696 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017697 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698 ;;
17699 :H)
17700 #
17701 # CONFIG_HEADER
17702 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017703 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017704 {
17705 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017706 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17707 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017708 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017709 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017710 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17711$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017712 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017713 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017714 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017715 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017716 fi
17717 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017718 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017719 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017720 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017724
17725 esac
17726
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017727
17728 case $ac_file$ac_mode in
17729 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17730
17731 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017732done # for ac_tag
17733
Guido van Rossum627b2d71993-12-24 10:39:16 +000017734
Matthias Kloseb9621712010-04-24 17:59:49 +000017735as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017736_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017737ac_clean_files=$ac_clean_files_save
17738
Matthias Kloseb9621712010-04-24 17:59:49 +000017739test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017740 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017741
Martin v. Löwis11437992002-04-12 09:54:03 +000017742
17743# configure is writing to config.log, and then calls config.status.
17744# config.status does its own redirection, appending to config.log.
17745# Unfortunately, on DOS this fails, as config.log is still kept open
17746# by configure, so config.status won't be able to write to it; its
17747# output is simply discarded. So we exec the FD to /dev/null,
17748# effectively closing config.log, so it can be properly (re)opened and
17749# appended to by config.status. When coming back to configure, we
17750# need to make the FD available again.
17751if test "$no_create" != yes; then
17752 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017753 ac_config_status_args=
17754 test "$silent" = yes &&
17755 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017756 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017757 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017758 exec 5>>config.log
17759 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17760 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017761 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017762fi
17763if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17765$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017766fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017767
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017768
Christian Heimes75ed8902013-11-20 01:11:18 +010017769echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017770if test ! -f Modules/Setup
17771then
17772 cp $srcdir/Modules/Setup.dist Modules/Setup
17773fi
17774
Christian Heimes75ed8902013-11-20 01:11:18 +010017775echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017776if test ! -f Modules/Setup.local
17777then
17778 echo "# Edit this file for local setup changes" >Modules/Setup.local
17779fi
17780
Christian Heimes75ed8902013-11-20 01:11:18 +010017781echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017782$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17783 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017784 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017785mv config.c Modules