blob: 706b58d6853cf0a46924ab5856dc2564bc3f6d82 [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
Brett Cannon63d98bc2016-09-06 17:12:40 -0700677DEF_MAKE_RULE
678DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000679ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000680LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100681MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000682INSTALL_DATA
683INSTALL_SCRIPT
684INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200685ac_ct_READELF
686READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000687ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200688ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000689AR
690RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000691USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000692GNULD
693LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000694LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000695RUNSHARED
696INSTSONAME
697LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000698PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000699BLDLIBRARY
700DLLLIBRARY
701LDLIBRARY
702LIBRARY
703BUILDEXEEXT
704EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200705NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200706MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200707PLATFORM_TRIPLET
doko@ubuntu.com092f6162015-04-15 20:45:33 +0200708PLATDIR
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200709MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200710ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000711MAINCC
712CXX
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200713GREP
714CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000715OBJEXT
716EXEEXT
717ac_ct_CC
718CPPFLAGS
719LDFLAGS
720CFLAGS
721CC
722EXPORT_MACOSX_DEPLOYMENT_TARGET
723CONFIGURE_MACOSX_DEPLOYMENT_TARGET
724SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200725_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000726MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000727FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000728FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800729FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000730FRAMEWORKALTINSTALLLAST
731FRAMEWORKALTINSTALLFIRST
732FRAMEWORKINSTALLLAST
733FRAMEWORKINSTALLFIRST
734PYTHONFRAMEWORKINSTALLDIR
735PYTHONFRAMEWORKPREFIX
736PYTHONFRAMEWORKDIR
737PYTHONFRAMEWORKIDENTIFIER
738PYTHONFRAMEWORK
739LIPO_32BIT_FLAGS
740ARCH_RUN_32BIT
741UNIVERSALSDK
742CONFIG_ARGS
743SOVERSION
744VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000745GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200746PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200747PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100748host_os
749host_vendor
750host_cpu
751host
752build_os
753build_vendor
754build_cpu
755build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500756HAS_HG
757HGBRANCH
758HGTAG
759HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400760BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000761target_alias
762host_alias
763build_alias
764LIBS
765ECHO_T
766ECHO_N
767ECHO_C
768DEFS
769mandir
770localedir
771libdir
772psdir
773pdfdir
774dvidir
775htmldir
776infodir
777docdir
778oldincludedir
779includedir
780localstatedir
781sharedstatedir
782sysconfdir
783datadir
784datarootdir
785libexecdir
786sbindir
787bindir
788program_transform_name
789prefix
790exec_prefix
791PACKAGE_URL
792PACKAGE_BUGREPORT
793PACKAGE_STRING
794PACKAGE_VERSION
795PACKAGE_TARNAME
796PACKAGE_NAME
797PATH_SEPARATOR
798SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000799ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000800ac_user_opts='
801enable_option_checking
802enable_universalsdk
803with_universal_archs
804with_framework_name
805enable_framework
806with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600807with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_cxx_main
809with_suffix
810enable_shared
811enable_profiling
812with_pydebug
Brett Cannon63d98bc2016-09-06 17:12:40 -0700813with_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700814with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100815with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100816with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000817with_libs
818with_system_expat
819with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100820with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000821enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700822with_tcltk_includes
823with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000824with_dbmliborder
825with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000826with_threads
827with_thread
828enable_ipv6
829with_doc_strings
830with_tsc
831with_pymalloc
832with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_fpectl
834with_libm
835with_libc
836enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800838with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000839'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000840 ac_precious_vars='build_alias
841host_alias
842target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100843MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000844CC
845CFLAGS
846LDFLAGS
847LIBS
848CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100849CPP
850PKG_CONFIG
851PKG_CONFIG_PATH
852PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000856ac_init_help=
857ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000858ac_unrecognized_opts=
859ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860# The variables have the same names as the options, with
861# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000862cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865no_recursion=
866prefix=NONE
867program_prefix=NONE
868program_suffix=NONE
869program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000870silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874x_includes=NONE
875x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000876
877# Installation directory options.
878# These are left unexpanded so users can "make install exec_prefix=/foo"
879# and all the variables that are supposed to be based on exec_prefix
880# by default will actually change.
881# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883bindir='${exec_prefix}/bin'
884sbindir='${exec_prefix}/sbin'
885libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886datarootdir='${prefix}/share'
887datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888sysconfdir='${prefix}/etc'
889sharedstatedir='${prefix}/com'
890localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000891includedir='${prefix}/include'
892oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
894infodir='${datarootdir}/info'
895htmldir='${docdir}'
896dvidir='${docdir}'
897pdfdir='${docdir}'
898psdir='${docdir}'
899libdir='${exec_prefix}/lib'
900localedir='${datarootdir}/locale'
901mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000904ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000906do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907 # If the previous option needs an argument, assign it.
908 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000909 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910 ac_prev=
911 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200915 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
916 *=) ac_optarg= ;;
917 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 # Accept the important Cygnus configure options, so we can diagnose typos.
921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_dashdash$ac_option in
923 --)
924 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000925
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926 -bindir | --bindir | --bindi | --bind | --bin | --bi)
927 ac_prev=bindir ;;
928 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000929 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930
931 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000933 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 -cache-file | --cache-file | --cache-fil | --cache-fi \
937 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
938 ac_prev=cache_file ;;
939 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
940 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000941 cache_file=$ac_optarg ;;
942
943 --config-cache | -C)
944 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000945
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000946 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000947 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000950
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000951 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
952 | --dataroo | --dataro | --datar)
953 ac_prev=datarootdir ;;
954 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
955 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
956 datarootdir=$ac_optarg ;;
957
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200962 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt_orig=$ac_useropt
964 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965 case $ac_user_opts in
966 *"
967"enable_$ac_useropt"
968"*) ;;
969 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
970 ac_unrecognized_sep=', ';;
971 esac
972 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000973
974 -docdir | --docdir | --docdi | --doc | --do)
975 ac_prev=docdir ;;
976 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
977 docdir=$ac_optarg ;;
978
979 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
980 ac_prev=dvidir ;;
981 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
982 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
984 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000985 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000986 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200988 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 ac_useropt_orig=$ac_useropt
990 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
991 case $ac_user_opts in
992 *"
993"enable_$ac_useropt"
994"*) ;;
995 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
996 ac_unrecognized_sep=', ';;
997 esac
998 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1001 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1002 | --exec | --exe | --ex)
1003 ac_prev=exec_prefix ;;
1004 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1005 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1006 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 # Obsolete; use --with-gas.
1011 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 -help | --help | --hel | --he | -h)
1014 ac_init_help=long ;;
1015 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1016 ac_init_help=recursive ;;
1017 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1018 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001019
1020 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001025 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1026 ac_prev=htmldir ;;
1027 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1028 | --ht=*)
1029 htmldir=$ac_optarg ;;
1030
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031 -includedir | --includedir | --includedi | --included | --include \
1032 | --includ | --inclu | --incl | --inc)
1033 ac_prev=includedir ;;
1034 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1035 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
1038 -infodir | --infodir | --infodi | --infod | --info | --inf)
1039 ac_prev=infodir ;;
1040 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
1043 -libdir | --libdir | --libdi | --libd)
1044 ac_prev=libdir ;;
1045 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
1048 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1049 | --libexe | --libex | --libe)
1050 ac_prev=libexecdir ;;
1051 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1052 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001055 -localedir | --localedir | --localedi | --localed | --locale)
1056 ac_prev=localedir ;;
1057 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1058 localedir=$ac_optarg ;;
1059
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001061 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062 ac_prev=localstatedir ;;
1063 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001064 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
1067 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1068 ac_prev=mandir ;;
1069 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001071
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001073 # Obsolete; use --without-fp.
1074 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001075
1076 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078 no_create=yes ;;
1079
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001080 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1081 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1082 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001084 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1085 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1086 | --oldin | --oldi | --old | --ol | --o)
1087 ac_prev=oldincludedir ;;
1088 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1089 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1090 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001091 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1094 ac_prev=prefix ;;
1095 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097
1098 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1099 | --program-pre | --program-pr | --program-p)
1100 ac_prev=program_prefix ;;
1101 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1102 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001104
1105 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1106 | --program-suf | --program-su | --program-s)
1107 ac_prev=program_suffix ;;
1108 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1109 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001110 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111
1112 -program-transform-name | --program-transform-name \
1113 | --program-transform-nam | --program-transform-na \
1114 | --program-transform-n | --program-transform- \
1115 | --program-transform | --program-transfor \
1116 | --program-transfo | --program-transf \
1117 | --program-trans | --program-tran \
1118 | --progr-tra | --program-tr | --program-t)
1119 ac_prev=program_transform_name ;;
1120 -program-transform-name=* | --program-transform-name=* \
1121 | --program-transform-nam=* | --program-transform-na=* \
1122 | --program-transform-n=* | --program-transform-=* \
1123 | --program-transform=* | --program-transfor=* \
1124 | --program-transfo=* | --program-transf=* \
1125 | --program-trans=* | --program-tran=* \
1126 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001129 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1130 ac_prev=pdfdir ;;
1131 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1132 pdfdir=$ac_optarg ;;
1133
1134 -psdir | --psdir | --psdi | --psd | --ps)
1135 ac_prev=psdir ;;
1136 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1137 psdir=$ac_optarg ;;
1138
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1140 | -silent | --silent | --silen | --sile | --sil)
1141 silent=yes ;;
1142
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001143 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1144 ac_prev=sbindir ;;
1145 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1146 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001148
1149 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1150 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1151 | --sharedst | --shareds | --shared | --share | --shar \
1152 | --sha | --sh)
1153 ac_prev=sharedstatedir ;;
1154 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1155 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1156 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1157 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160 -site | --site | --sit)
1161 ac_prev=site ;;
1162 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1166 ac_prev=srcdir ;;
1167 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1171 | --syscon | --sysco | --sysc | --sys | --sy)
1172 ac_prev=sysconfdir ;;
1173 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1174 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1183 verbose=yes ;;
1184
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 -version | --version | --versio | --versi | --vers | -V)
1186 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001189 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001190 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001191 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001192 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001193 ac_useropt_orig=$ac_useropt
1194 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195 case $ac_user_opts in
1196 *"
1197"with_$ac_useropt"
1198"*) ;;
1199 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1200 ac_unrecognized_sep=', ';;
1201 esac
1202 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001205 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001208 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220 --x)
1221 # Obsolete; use --with-x.
1222 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
1224 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1225 | --x-incl | --x-inc | --x-in | --x-i)
1226 ac_prev=x_includes ;;
1227 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1228 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1232 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1233 ac_prev=x_libraries ;;
1234 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1235 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001238 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1239Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240 ;;
1241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 *=*)
1243 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1244 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001245 case $ac_envvar in #(
1246 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001247 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001248 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 export $ac_envvar ;;
1251
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001252 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001254 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001257 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 ;;
1259
1260 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261done
1262
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001265 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266fi
1267
Matthias Kloseb9621712010-04-24 17:59:49 +00001268if test -n "$ac_unrecognized_opts"; then
1269 case $enable_option_checking in
1270 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001271 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001272 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1273 esac
1274fi
1275
1276# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1278 datadir sysconfdir sharedstatedir localstatedir includedir \
1279 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Brett Cannon63d98bc2016-09-06 17:12:40 -07001280 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001283 # Remove trailing slashes.
1284 case $ac_val in
1285 */ )
1286 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1287 eval $ac_var=\$ac_val;;
1288 esac
1289 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001290 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 [\\/$]* | ?:[\\/]* ) continue;;
1292 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001293 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001294 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001295done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001296
Martin v. Löwis11437992002-04-12 09:54:03 +00001297# There might be people who depend on the old broken behavior: `$host'
1298# used to hold the argument of --host etc.
1299# FIXME: To remove some day.
1300build=$build_alias
1301host=$host_alias
1302target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304# FIXME: To remove some day.
1305if test "x$host_alias" != x; then
1306 if test "x$build_alias" = x; then
1307 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001308 elif test "x$build_alias" != "x$host_alias"; then
1309 cross_compiling=yes
1310 fi
1311fi
1312
1313ac_tool_prefix=
1314test -n "$host_alias" && ac_tool_prefix=$host_alias-
1315
1316test "$silent" = yes && exec 6>/dev/null
1317
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319ac_pwd=`pwd` && test -n "$ac_pwd" &&
1320ac_ls_di=`ls -di .` &&
1321ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001322 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001324 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001325
1326
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327# Find the source files, if location was not specified.
1328if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001329 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001331 ac_confdir=`$as_dirname -- "$as_myself" ||
1332$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1333 X"$as_myself" : 'X\(//\)[^/]' \| \
1334 X"$as_myself" : 'X\(//\)$' \| \
1335 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1336$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\/\)[^/].*/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\/\)$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\).*/{
1350 s//\1/
1351 q
1352 }
1353 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001354 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001355 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001356 srcdir=..
1357 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001358else
1359 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001361if test ! -r "$srcdir/$ac_unique_file"; then
1362 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001363 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001365ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1366ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001367 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001368 pwd)`
1369# When building in place, set srcdir=.
1370if test "$ac_abs_confdir" = "$ac_pwd"; then
1371 srcdir=.
1372fi
1373# Remove unnecessary trailing slashes from srcdir.
1374# Double slashes in file names in object file debugging info
1375# mess up M-x gdb in Emacs.
1376case $srcdir in
1377*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1378esac
1379for ac_var in $ac_precious_vars; do
1380 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1381 eval ac_env_${ac_var}_value=\$${ac_var}
1382 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1383 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1384done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001385
Martin v. Löwis11437992002-04-12 09:54:03 +00001386#
1387# Report the --help message.
1388#
1389if test "$ac_init_help" = "long"; then
1390 # Omit some internal or obsolete options to make the list less imposing.
1391 # This message is too long to be a string in the A/UX 3.1 sh.
1392 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001393\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001394
1395Usage: $0 [OPTION]... [VAR=VALUE]...
1396
1397To assign environment variables (e.g., CC, CFLAGS...), specify them as
1398VAR=VALUE. See below for descriptions of some of the useful variables.
1399
1400Defaults for the options are specified in brackets.
1401
1402Configuration:
1403 -h, --help display this help and exit
1404 --help=short display options specific to this package
1405 --help=recursive display the short help of all the included packages
1406 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001407 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 --cache-file=FILE cache test results in FILE [disabled]
1409 -C, --config-cache alias for \`--cache-file=config.cache'
1410 -n, --no-create do not create output files
1411 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1412
Martin v. Löwis11437992002-04-12 09:54:03 +00001413Installation directories:
1414 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001415 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001417 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001418
1419By default, \`make install' will install all the files in
1420\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1421an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1422for instance \`--prefix=\$HOME'.
1423
1424For better control, use the options below.
1425
1426Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001427 --bindir=DIR user executables [EPREFIX/bin]
1428 --sbindir=DIR system admin executables [EPREFIX/sbin]
1429 --libexecdir=DIR program executables [EPREFIX/libexec]
1430 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1431 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1432 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1433 --libdir=DIR object code libraries [EPREFIX/lib]
1434 --includedir=DIR C header files [PREFIX/include]
1435 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1436 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1437 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1438 --infodir=DIR info documentation [DATAROOTDIR/info]
1439 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1440 --mandir=DIR man documentation [DATAROOTDIR/man]
1441 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1442 --htmldir=DIR html documentation [DOCDIR]
1443 --dvidir=DIR dvi documentation [DOCDIR]
1444 --pdfdir=DIR pdf documentation [DOCDIR]
1445 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001446_ACEOF
1447
1448 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001449
1450System types:
1451 --build=BUILD configure for building on BUILD [guessed]
1452 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001453_ACEOF
1454fi
1455
1456if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001457 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001458 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001459 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001460 cat <<\_ACEOF
1461
1462Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001463 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001464 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1465 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001466 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001467 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001468 --enable-framework[=INSTALLDIR]
1469 Build (MacOSX|Darwin) framework
1470 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001471 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001472 --enable-loadable-sqlite-extensions
1473 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001474 --enable-ipv6 Enable ipv6 (with ipv4) support
1475 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001476 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001477 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001478
1479Optional Packages:
1480 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1481 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001482 --with-universal-archs=ARCH
1483 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001484 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001485 --with-framework-name=FRAMEWORK
1486 specify an alternate name of the framework built
1487 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001489 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001490 --with-cxx-main=<compiler>
1491 compile main() and link python executable with C++
1492 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-suffix=.exe set executable suffix
1494 --with-pydebug build with Py_DEBUG defined
Brett Cannon63d98bc2016-09-06 17:12:40 -07001495 --with-optimizations Enable all optimizations when available (LTO, PGO,
1496 etc). Disabled by default.
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001497 --with-lto Enable Link Time Optimization in PGO builds.
1498 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001499 --with-hash-algorithm=[fnv|siphash24]
1500 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001501 --with-address-sanitizer
1502 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001504 --with-system-expat build pyexpat module using an installed expat
1505 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001506 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001507 --with-system-libmpdec build _decimal module using an installed libmpdec
1508 library
Ned Deilyd819b932013-09-06 01:07:05 -07001509 --with-tcltk-includes='-I...'
1510 override search for Tcl and Tk include files
1511 --with-tcltk-libs='-L...'
1512 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001513 --with-dbmliborder=db1:db2:...
1514 order to check db backends for dbm. Valid value is a
1515 colon separated string with the backend names
1516 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001517 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with(out)-threads[=DIRECTORY]
1519 disable/enable thread support
1520 --with(out)-thread[=DIRECTORY]
1521 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001522 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001523 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001525 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001526 --with-fpectl enable SIGFPE catching
1527 --with-libm=STRING math library
1528 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001529 --with(out)-computed-gotos
1530 Use computed gotos in evaluation loop (enabled by
1531 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001532 --with(out)-ensurepip=[=upgrade]
1533 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001534
1535Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001536 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001537 CC C compiler command
1538 CFLAGS C compiler flags
1539 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1540 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001542 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001543 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001545 PKG_CONFIG path to pkg-config utility
1546 PKG_CONFIG_PATH
1547 directories to add to pkg-config's search path
1548 PKG_CONFIG_LIBDIR
1549 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
1551Use these variables to override the choices made by `configure' or to help
1552it to find libraries and programs with nonstandard names/locations.
1553
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001554Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001557fi
1558
1559if test "$ac_init_help" = "recursive"; then
1560 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001561 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001562 test -d "$ac_dir" ||
1563 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1564 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 ac_builddir=.
1566
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567case "$ac_dir" in
1568.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1569*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001570 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001571 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001572 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001573 case $ac_top_builddir_sub in
1574 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1575 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1576 esac ;;
1577esac
1578ac_abs_top_builddir=$ac_pwd
1579ac_abs_builddir=$ac_pwd$ac_dir_suffix
1580# for backward compatibility:
1581ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001582
1583case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001584 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001586 ac_top_srcdir=$ac_top_builddir_sub
1587 ac_abs_top_srcdir=$ac_pwd ;;
1588 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001590 ac_top_srcdir=$srcdir
1591 ac_abs_top_srcdir=$srcdir ;;
1592 *) # Relative name.
1593 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1594 ac_top_srcdir=$ac_top_build_prefix$srcdir
1595 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001596esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001597ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001599 cd "$ac_dir" || { ac_status=$?; continue; }
1600 # Check for guested configure.
1601 if test -f "$ac_srcdir/configure.gnu"; then
1602 echo &&
1603 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1604 elif test -f "$ac_srcdir/configure"; then
1605 echo &&
1606 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001608 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609 fi || ac_status=$?
1610 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001611 done
1612fi
1613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001614test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001615if $ac_init_version; then
1616 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001617python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001618generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001619
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001620Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001621This configure script is free software; the Free Software Foundation
1622gives unlimited permission to copy, distribute and modify it.
1623_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001624 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001626
1627## ------------------------ ##
1628## Autoconf initialization. ##
1629## ------------------------ ##
1630
1631# ac_fn_c_try_compile LINENO
1632# --------------------------
1633# Try to compile conftest.$ac_ext, and return whether this succeeded.
1634ac_fn_c_try_compile ()
1635{
1636 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1637 rm -f conftest.$ac_objext
1638 if { { ac_try="$ac_compile"
1639case "(($ac_try" in
1640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1641 *) ac_try_echo=$ac_try;;
1642esac
1643eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1644$as_echo "$ac_try_echo"; } >&5
1645 (eval "$ac_compile") 2>conftest.err
1646 ac_status=$?
1647 if test -s conftest.err; then
1648 grep -v '^ *+' conftest.err >conftest.er1
1649 cat conftest.er1 >&5
1650 mv -f conftest.er1 conftest.err
1651 fi
1652 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1653 test $ac_status = 0; } && {
1654 test -z "$ac_c_werror_flag" ||
1655 test ! -s conftest.err
1656 } && test -s conftest.$ac_objext; then :
1657 ac_retval=0
1658else
1659 $as_echo "$as_me: failed program was:" >&5
1660sed 's/^/| /' conftest.$ac_ext >&5
1661
1662 ac_retval=1
1663fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001664 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001665 as_fn_set_status $ac_retval
1666
1667} # ac_fn_c_try_compile
1668
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001669# ac_fn_c_try_cpp LINENO
1670# ----------------------
1671# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1672ac_fn_c_try_cpp ()
1673{
1674 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1675 if { { ac_try="$ac_cpp conftest.$ac_ext"
1676case "(($ac_try" in
1677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1678 *) ac_try_echo=$ac_try;;
1679esac
1680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1681$as_echo "$ac_try_echo"; } >&5
1682 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1683 ac_status=$?
1684 if test -s conftest.err; then
1685 grep -v '^ *+' conftest.err >conftest.er1
1686 cat conftest.er1 >&5
1687 mv -f conftest.er1 conftest.err
1688 fi
1689 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1690 test $ac_status = 0; } > conftest.i && {
1691 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1692 test ! -s conftest.err
1693 }; then :
1694 ac_retval=0
1695else
1696 $as_echo "$as_me: failed program was:" >&5
1697sed 's/^/| /' conftest.$ac_ext >&5
1698
1699 ac_retval=1
1700fi
1701 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1702 as_fn_set_status $ac_retval
1703
1704} # ac_fn_c_try_cpp
1705
Matthias Kloseb9621712010-04-24 17:59:49 +00001706# ac_fn_c_try_link LINENO
1707# -----------------------
1708# Try to link conftest.$ac_ext, and return whether this succeeded.
1709ac_fn_c_try_link ()
1710{
1711 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712 rm -f conftest.$ac_objext conftest$ac_exeext
1713 if { { ac_try="$ac_link"
1714case "(($ac_try" in
1715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1716 *) ac_try_echo=$ac_try;;
1717esac
1718eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1719$as_echo "$ac_try_echo"; } >&5
1720 (eval "$ac_link") 2>conftest.err
1721 ac_status=$?
1722 if test -s conftest.err; then
1723 grep -v '^ *+' conftest.err >conftest.er1
1724 cat conftest.er1 >&5
1725 mv -f conftest.er1 conftest.err
1726 fi
1727 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1728 test $ac_status = 0; } && {
1729 test -z "$ac_c_werror_flag" ||
1730 test ! -s conftest.err
1731 } && test -s conftest$ac_exeext && {
1732 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001733 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001734 }; then :
1735 ac_retval=0
1736else
1737 $as_echo "$as_me: failed program was:" >&5
1738sed 's/^/| /' conftest.$ac_ext >&5
1739
1740 ac_retval=1
1741fi
1742 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1743 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1744 # interfere with the next link command; also delete a directory that is
1745 # left behind by Apple's compiler. We do this before executing the actions.
1746 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001747 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001748 as_fn_set_status $ac_retval
1749
1750} # ac_fn_c_try_link
1751
Matthias Kloseb9621712010-04-24 17:59:49 +00001752# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1753# -------------------------------------------------------
1754# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1755# the include files in INCLUDES and setting the cache variable VAR
1756# accordingly.
1757ac_fn_c_check_header_mongrel ()
1758{
1759 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001760 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1762$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001763if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001764 $as_echo_n "(cached) " >&6
1765fi
1766eval ac_res=\$$3
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1768$as_echo "$ac_res" >&6; }
1769else
1770 # Is the header compilable?
1771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1772$as_echo_n "checking $2 usability... " >&6; }
1773cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1774/* end confdefs.h. */
1775$4
1776#include <$2>
1777_ACEOF
1778if ac_fn_c_try_compile "$LINENO"; then :
1779 ac_header_compiler=yes
1780else
1781 ac_header_compiler=no
1782fi
1783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1785$as_echo "$ac_header_compiler" >&6; }
1786
1787# Is the header present?
1788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1789$as_echo_n "checking $2 presence... " >&6; }
1790cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1791/* end confdefs.h. */
1792#include <$2>
1793_ACEOF
1794if ac_fn_c_try_cpp "$LINENO"; then :
1795 ac_header_preproc=yes
1796else
1797 ac_header_preproc=no
1798fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001799rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1801$as_echo "$ac_header_preproc" >&6; }
1802
1803# So? What about this header?
1804case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1805 yes:no: )
1806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1807$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1808 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1809$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1810 ;;
1811 no:yes:* )
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1813$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1815$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1817$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1819$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1821$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001822( $as_echo "## --------------------------------------- ##
1823## Report this to https://bugs.python.org/ ##
1824## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001825 ) | sed "s/^/$as_me: WARNING: /" >&2
1826 ;;
1827esac
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1829$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001830if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001831 $as_echo_n "(cached) " >&6
1832else
1833 eval "$3=\$ac_header_compiler"
1834fi
1835eval ac_res=\$$3
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1837$as_echo "$ac_res" >&6; }
1838fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001839 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001840
1841} # ac_fn_c_check_header_mongrel
1842
1843# ac_fn_c_try_run LINENO
1844# ----------------------
1845# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1846# that executables *can* be run.
1847ac_fn_c_try_run ()
1848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 if { { ac_try="$ac_link"
1851case "(($ac_try" in
1852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1853 *) ac_try_echo=$ac_try;;
1854esac
1855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1856$as_echo "$ac_try_echo"; } >&5
1857 (eval "$ac_link") 2>&5
1858 ac_status=$?
1859 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1860 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1861 { { case "(($ac_try" in
1862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1863 *) ac_try_echo=$ac_try;;
1864esac
1865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1866$as_echo "$ac_try_echo"; } >&5
1867 (eval "$ac_try") 2>&5
1868 ac_status=$?
1869 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1870 test $ac_status = 0; }; }; then :
1871 ac_retval=0
1872else
1873 $as_echo "$as_me: program exited with status $ac_status" >&5
1874 $as_echo "$as_me: failed program was:" >&5
1875sed 's/^/| /' conftest.$ac_ext >&5
1876
1877 ac_retval=$ac_status
1878fi
1879 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001880 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001881 as_fn_set_status $ac_retval
1882
1883} # ac_fn_c_try_run
1884
1885# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1886# -------------------------------------------------------
1887# Tests whether HEADER exists and can be compiled using the include files in
1888# INCLUDES, setting the cache variable VAR accordingly.
1889ac_fn_c_check_header_compile ()
1890{
1891 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1893$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001894if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001895 $as_echo_n "(cached) " >&6
1896else
1897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1898/* end confdefs.h. */
1899$4
1900#include <$2>
1901_ACEOF
1902if ac_fn_c_try_compile "$LINENO"; then :
1903 eval "$3=yes"
1904else
1905 eval "$3=no"
1906fi
1907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1908fi
1909eval ac_res=\$$3
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1911$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001912 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001913
1914} # ac_fn_c_check_header_compile
1915
Matthias Kloseb9621712010-04-24 17:59:49 +00001916# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1917# -------------------------------------------
1918# Tests whether TYPE exists after having included INCLUDES, setting cache
1919# variable VAR accordingly.
1920ac_fn_c_check_type ()
1921{
1922 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1924$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001925if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001926 $as_echo_n "(cached) " >&6
1927else
1928 eval "$3=no"
1929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1930/* end confdefs.h. */
1931$4
1932int
1933main ()
1934{
1935if (sizeof ($2))
1936 return 0;
1937 ;
1938 return 0;
1939}
1940_ACEOF
1941if ac_fn_c_try_compile "$LINENO"; then :
1942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1943/* end confdefs.h. */
1944$4
1945int
1946main ()
1947{
1948if (sizeof (($2)))
1949 return 0;
1950 ;
1951 return 0;
1952}
1953_ACEOF
1954if ac_fn_c_try_compile "$LINENO"; then :
1955
1956else
1957 eval "$3=yes"
1958fi
1959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1960fi
1961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1962fi
1963eval ac_res=\$$3
1964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1965$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001966 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001967
1968} # ac_fn_c_check_type
1969
Matthias Kloseb9621712010-04-24 17:59:49 +00001970# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1971# --------------------------------------------
1972# Tries to find the compile-time value of EXPR in a program that includes
1973# INCLUDES, setting VAR accordingly. Returns whether the value could be
1974# computed
1975ac_fn_c_compute_int ()
1976{
1977 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1978 if test "$cross_compiling" = yes; then
1979 # Depending upon the size, compute the lo and hi bounds.
1980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1981/* end confdefs.h. */
1982$4
1983int
1984main ()
1985{
1986static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001987test_array [0] = 0;
1988return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001989
1990 ;
1991 return 0;
1992}
1993_ACEOF
1994if ac_fn_c_try_compile "$LINENO"; then :
1995 ac_lo=0 ac_mid=0
1996 while :; do
1997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$4
2000int
2001main ()
2002{
2003static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002004test_array [0] = 0;
2005return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002006
2007 ;
2008 return 0;
2009}
2010_ACEOF
2011if ac_fn_c_try_compile "$LINENO"; then :
2012 ac_hi=$ac_mid; break
2013else
2014 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2015 if test $ac_lo -le $ac_mid; then
2016 ac_lo= ac_hi=
2017 break
2018 fi
2019 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2020fi
2021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2022 done
2023else
2024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2025/* end confdefs.h. */
2026$4
2027int
2028main ()
2029{
2030static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002031test_array [0] = 0;
2032return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002033
2034 ;
2035 return 0;
2036}
2037_ACEOF
2038if ac_fn_c_try_compile "$LINENO"; then :
2039 ac_hi=-1 ac_mid=-1
2040 while :; do
2041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2042/* end confdefs.h. */
2043$4
2044int
2045main ()
2046{
2047static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002048test_array [0] = 0;
2049return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 ac_lo=$ac_mid; break
2057else
2058 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2059 if test $ac_mid -le $ac_hi; then
2060 ac_lo= ac_hi=
2061 break
2062 fi
2063 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2064fi
2065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2066 done
2067else
2068 ac_lo= ac_hi=
2069fi
2070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2071fi
2072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2073# Binary search between lo and hi bounds.
2074while test "x$ac_lo" != "x$ac_hi"; do
2075 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077/* end confdefs.h. */
2078$4
2079int
2080main ()
2081{
2082static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002083test_array [0] = 0;
2084return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002085
2086 ;
2087 return 0;
2088}
2089_ACEOF
2090if ac_fn_c_try_compile "$LINENO"; then :
2091 ac_hi=$ac_mid
2092else
2093 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2094fi
2095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2096done
2097case $ac_lo in #((
2098?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2099'') ac_retval=1 ;;
2100esac
2101 else
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105static long int longval () { return $2; }
2106static unsigned long int ulongval () { return $2; }
2107#include <stdio.h>
2108#include <stdlib.h>
2109int
2110main ()
2111{
2112
2113 FILE *f = fopen ("conftest.val", "w");
2114 if (! f)
2115 return 1;
2116 if (($2) < 0)
2117 {
2118 long int i = longval ();
2119 if (i != ($2))
2120 return 1;
2121 fprintf (f, "%ld", i);
2122 }
2123 else
2124 {
2125 unsigned long int i = ulongval ();
2126 if (i != ($2))
2127 return 1;
2128 fprintf (f, "%lu", i);
2129 }
2130 /* Do not output a trailing newline, as this causes \r\n confusion
2131 on some platforms. */
2132 return ferror (f) || fclose (f) != 0;
2133
2134 ;
2135 return 0;
2136}
2137_ACEOF
2138if ac_fn_c_try_run "$LINENO"; then :
2139 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2140else
2141 ac_retval=1
2142fi
2143rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2144 conftest.$ac_objext conftest.beam conftest.$ac_ext
2145rm -f conftest.val
2146
2147 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002148 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002149 as_fn_set_status $ac_retval
2150
2151} # ac_fn_c_compute_int
2152
2153# ac_fn_c_check_func LINENO FUNC VAR
2154# ----------------------------------
2155# Tests whether FUNC exists, setting the cache variable VAR accordingly
2156ac_fn_c_check_func ()
2157{
2158 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2160$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002161if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002162 $as_echo_n "(cached) " >&6
2163else
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2167 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2168#define $2 innocuous_$2
2169
2170/* System header to define __stub macros and hopefully few prototypes,
2171 which can conflict with char $2 (); below.
2172 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2173 <limits.h> exists even on freestanding compilers. */
2174
2175#ifdef __STDC__
2176# include <limits.h>
2177#else
2178# include <assert.h>
2179#endif
2180
2181#undef $2
2182
2183/* Override any GCC internal prototype to avoid an error.
2184 Use char because int might match the return type of a GCC
2185 builtin and then its argument prototype would still apply. */
2186#ifdef __cplusplus
2187extern "C"
2188#endif
2189char $2 ();
2190/* The GNU C library defines this for functions which it implements
2191 to always fail with ENOSYS. Some functions are actually named
2192 something starting with __ and the normal name is an alias. */
2193#if defined __stub_$2 || defined __stub___$2
2194choke me
2195#endif
2196
2197int
2198main ()
2199{
2200return $2 ();
2201 ;
2202 return 0;
2203}
2204_ACEOF
2205if ac_fn_c_try_link "$LINENO"; then :
2206 eval "$3=yes"
2207else
2208 eval "$3=no"
2209fi
2210rm -f core conftest.err conftest.$ac_objext \
2211 conftest$ac_exeext conftest.$ac_ext
2212fi
2213eval ac_res=\$$3
2214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2215$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002216 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002217
2218} # ac_fn_c_check_func
2219
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002220# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2221# ---------------------------------------------
2222# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2223# accordingly.
2224ac_fn_c_check_decl ()
2225{
2226 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2227 as_decl_name=`echo $2|sed 's/ *(.*//'`
2228 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2230$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2231if eval \${$3+:} false; then :
2232 $as_echo_n "(cached) " >&6
2233else
2234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2235/* end confdefs.h. */
2236$4
2237int
2238main ()
2239{
2240#ifndef $as_decl_name
2241#ifdef __cplusplus
2242 (void) $as_decl_use;
2243#else
2244 (void) $as_decl_name;
2245#endif
2246#endif
2247
2248 ;
2249 return 0;
2250}
2251_ACEOF
2252if ac_fn_c_try_compile "$LINENO"; then :
2253 eval "$3=yes"
2254else
2255 eval "$3=no"
2256fi
2257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2258fi
2259eval ac_res=\$$3
2260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2261$as_echo "$ac_res" >&6; }
2262 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2263
2264} # ac_fn_c_check_decl
2265
Matthias Kloseb9621712010-04-24 17:59:49 +00002266# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2267# ----------------------------------------------------
2268# Tries to find if the field MEMBER exists in type AGGR, after including
2269# INCLUDES, setting cache variable VAR accordingly.
2270ac_fn_c_check_member ()
2271{
2272 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2274$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002275if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002276 $as_echo_n "(cached) " >&6
2277else
2278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279/* end confdefs.h. */
2280$5
2281int
2282main ()
2283{
2284static $2 ac_aggr;
2285if (ac_aggr.$3)
2286return 0;
2287 ;
2288 return 0;
2289}
2290_ACEOF
2291if ac_fn_c_try_compile "$LINENO"; then :
2292 eval "$4=yes"
2293else
2294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2295/* end confdefs.h. */
2296$5
2297int
2298main ()
2299{
2300static $2 ac_aggr;
2301if (sizeof ac_aggr.$3)
2302return 0;
2303 ;
2304 return 0;
2305}
2306_ACEOF
2307if ac_fn_c_try_compile "$LINENO"; then :
2308 eval "$4=yes"
2309else
2310 eval "$4=no"
2311fi
2312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2313fi
2314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2315fi
2316eval ac_res=\$$4
2317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2318$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002319 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002320
2321} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002322cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002323This file contains any messages produced by compilers while
2324running configure, to aid debugging if configure makes a mistake.
2325
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002326It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002327generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002328
2329 $ $0 $@
2330
2331_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002332exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002333{
2334cat <<_ASUNAME
2335## --------- ##
2336## Platform. ##
2337## --------- ##
2338
2339hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2340uname -m = `(uname -m) 2>/dev/null || echo unknown`
2341uname -r = `(uname -r) 2>/dev/null || echo unknown`
2342uname -s = `(uname -s) 2>/dev/null || echo unknown`
2343uname -v = `(uname -v) 2>/dev/null || echo unknown`
2344
2345/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2346/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2347
2348/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2349/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2350/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002352/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2353/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2354/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2355
2356_ASUNAME
2357
2358as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2359for as_dir in $PATH
2360do
2361 IFS=$as_save_IFS
2362 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002363 $as_echo "PATH: $as_dir"
2364 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002366
2367} >&5
2368
2369cat >&5 <<_ACEOF
2370
2371
2372## ----------- ##
2373## Core tests. ##
2374## ----------- ##
2375
2376_ACEOF
2377
2378
2379# Keep a trace of the command line.
2380# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002381# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002382# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002383# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002384ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002385ac_configure_args0=
2386ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002387ac_must_keep_next=false
2388for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002389do
Skip Montanaro6dead952003-09-25 14:50:04 +00002390 for ac_arg
2391 do
2392 case $ac_arg in
2393 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2394 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2395 | -silent | --silent | --silen | --sile | --sil)
2396 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002397 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002398 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002399 esac
2400 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002401 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002403 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002404 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002405 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002406 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002407 case $ac_arg in
2408 *=* | --config-cache | -C | -disable-* | --disable-* \
2409 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2410 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2411 | -with-* | --with-* | -without-* | --without-* | --x)
2412 case "$ac_configure_args0 " in
2413 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2414 esac
2415 ;;
2416 -* ) ac_must_keep_next=true ;;
2417 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 ;;
2421 esac
2422 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002423done
Matthias Kloseb9621712010-04-24 17:59:49 +00002424{ ac_configure_args0=; unset ac_configure_args0;}
2425{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002426
2427# When interrupted or exit'd, cleanup temporary files, and complete
2428# config.log. We remove comments because anyway the quotes in there
2429# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002430# WARNING: Use '\'' to represent an apostrophe within the trap.
2431# 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 +00002432trap 'exit_status=$?
2433 # Save into config.log some information that might help in debugging.
2434 {
2435 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002436
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002437 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002438## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002439## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002440 echo
2441 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442(
2443 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2444 eval ac_val=\$$ac_var
2445 case $ac_val in #(
2446 *${as_nl}*)
2447 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002448 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2449$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002450 esac
2451 case $ac_var in #(
2452 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002453 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2454 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002455 esac ;;
2456 esac
2457 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002459 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2460 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002461 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 "s/'\''/'\''\\\\'\'''\''/g;
2463 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2464 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002465 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002466 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002467 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac |
2469 sort
2470)
Martin v. Löwis11437992002-04-12 09:54:03 +00002471 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002472
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002473 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002474## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002475## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 echo
2477 for ac_var in $ac_subst_vars
2478 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002479 eval ac_val=\$$ac_var
2480 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002482 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002483 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002484 done | sort
2485 echo
2486
2487 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002488 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002489## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002490## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002491 echo
2492 for ac_var in $ac_subst_files
2493 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 eval ac_val=\$$ac_var
2495 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002496 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002498 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002499 done | sort
2500 echo
2501 fi
2502
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002504 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002505## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002507 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002509 echo
2510 fi
2511 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002512 $as_echo "$as_me: caught signal $ac_signal"
2513 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002514 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 rm -f core *.core core.conftest.* &&
2516 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002517 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002519for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002520 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002521done
2522ac_signal=0
2523
2524# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002526
Matthias Kloseb9621712010-04-24 17:59:49 +00002527$as_echo "/* confdefs.h */" > confdefs.h
2528
Martin v. Löwis11437992002-04-12 09:54:03 +00002529# Predefined preprocessor variables.
2530
2531cat >>confdefs.h <<_ACEOF
2532#define PACKAGE_NAME "$PACKAGE_NAME"
2533_ACEOF
2534
Martin v. Löwis11437992002-04-12 09:54:03 +00002535cat >>confdefs.h <<_ACEOF
2536#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2537_ACEOF
2538
Martin v. Löwis11437992002-04-12 09:54:03 +00002539cat >>confdefs.h <<_ACEOF
2540#define PACKAGE_VERSION "$PACKAGE_VERSION"
2541_ACEOF
2542
Martin v. Löwis11437992002-04-12 09:54:03 +00002543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_STRING "$PACKAGE_STRING"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2549_ACEOF
2550
Matthias Kloseb9621712010-04-24 17:59:49 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_URL "$PACKAGE_URL"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555
2556# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002557# Prefer an explicitly selected file to automatically selected ones.
2558ac_site_file1=NONE
2559ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561 # We do not want a PATH search for config.site.
2562 case $CONFIG_SITE in #((
2563 -*) ac_site_file1=./$CONFIG_SITE;;
2564 */*) ac_site_file1=$CONFIG_SITE;;
2565 *) ac_site_file1=./$CONFIG_SITE;;
2566 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002568 ac_site_file1=$prefix/share/config.site
2569 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570else
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 ac_site_file1=$ac_default_prefix/share/config.site
2572 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002574for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575do
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 test "x$ac_site_file" = xNONE && continue
2577 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2578 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2579$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002581 . "$ac_site_file" \
2582 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2584as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002585See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002586 fi
2587done
2588
2589if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 # Some versions of bash will fail to source /dev/null (special files
2591 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2592 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2593 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2594$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2597 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 esac
2599 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002600else
Matthias Kloseb9621712010-04-24 17:59:49 +00002601 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2602$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 >$cache_file
2604fi
2605
2606# Check that the precious variables saved in the cache have kept the same
2607# value.
2608ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002609for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2611 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2613 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 case $ac_old_set,$ac_new_set in
2615 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002616 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2617$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 +00002618 ac_cache_corrupted=: ;;
2619 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002620 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2621$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 ac_cache_corrupted=: ;;
2623 ,);;
2624 *)
2625 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002626 # differences in whitespace do not lead to failure.
2627 ac_old_val_w=`echo x $ac_old_val`
2628 ac_new_val_w=`echo x $ac_new_val`
2629 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2630 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2631$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2632 ac_cache_corrupted=:
2633 else
2634 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2635$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2636 eval $ac_var=\$ac_old_val
2637 fi
2638 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2639$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2640 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2641$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 fi;;
2643 esac
2644 # Pass precious variables to config.status.
2645 if test "$ac_new_set" = set; then
2646 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002647 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002648 *) ac_arg=$ac_var=$ac_new_val ;;
2649 esac
2650 case " $ac_configure_args " in
2651 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002652 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 esac
2654 fi
2655done
2656if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2660$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002661 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002663## -------------------- ##
2664## Main body of script. ##
2665## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002666
Guido van Rossum7f43da71994-08-01 12:15:30 +00002667ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002668ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002669ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2670ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2671ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672
Guido van Rossum627b2d71993-12-24 10:39:16 +00002673
Michael W. Hudson54241132001-12-07 15:38:26 +00002674
Trent Nelson4d4ec652012-10-16 08:51:24 -04002675
Trent Nelson5595ab52012-10-17 04:47:31 -04002676if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002677 # If we're building out-of-tree, we need to make sure the following
2678 # resources get picked up before their $srcdir counterparts.
2679 # Objects/ -> typeslots.inc
2680 # Include/ -> Python-ast.h, graminit.h
2681 # Python/ -> importlib.h
2682 # (A side effect of this is that these resources will automatically be
2683 # regenerated when building out-of-tree, regardless of whether or not
2684 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2685 # off.)
2686 BASECPPFLAGS="-IObjects -IInclude -IPython"
2687else
2688 BASECPPFLAGS=""
2689fi
2690
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002691
2692
2693
2694
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002695if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002696then
2697# Extract the first word of "hg", so it can be a program name with args.
2698set dummy hg; ac_word=$2
2699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2700$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002701if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002702 $as_echo_n "(cached) " >&6
2703else
2704 if test -n "$HAS_HG"; then
2705 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2706else
2707as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2708for as_dir in $PATH
2709do
2710 IFS=$as_save_IFS
2711 test -z "$as_dir" && as_dir=.
2712 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002713 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714 ac_cv_prog_HAS_HG="found"
2715 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2716 break 2
2717 fi
2718done
2719 done
2720IFS=$as_save_IFS
2721
2722 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2723fi
2724fi
2725HAS_HG=$ac_cv_prog_HAS_HG
2726if test -n "$HAS_HG"; then
2727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2728$as_echo "$HAS_HG" >&6; }
2729else
2730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2731$as_echo "no" >&6; }
2732fi
2733
2734
2735else
2736HAS_HG=no-repository
2737fi
2738if test $HAS_HG = found
2739then
2740 HGVERSION="hg id -i \$(srcdir)"
2741 HGTAG="hg id -t \$(srcdir)"
2742 HGBRANCH="hg id -b \$(srcdir)"
2743else
2744 HGVERSION=""
2745 HGTAG=""
2746 HGBRANCH=""
2747fi
2748
2749
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002750ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002751
2752
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002753ac_aux_dir=
2754for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2755 if test -f "$ac_dir/install-sh"; then
2756 ac_aux_dir=$ac_dir
2757 ac_install_sh="$ac_aux_dir/install-sh -c"
2758 break
2759 elif test -f "$ac_dir/install.sh"; then
2760 ac_aux_dir=$ac_dir
2761 ac_install_sh="$ac_aux_dir/install.sh -c"
2762 break
2763 elif test -f "$ac_dir/shtool"; then
2764 ac_aux_dir=$ac_dir
2765 ac_install_sh="$ac_aux_dir/shtool install -c"
2766 break
2767 fi
2768done
2769if test -z "$ac_aux_dir"; then
2770 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2771fi
2772
2773# These three variables are undocumented and unsupported,
2774# and are intended to be withdrawn in a future Autoconf release.
2775# They can cause serious problems if a builder's source tree is in a directory
2776# whose full name contains unusual characters.
2777ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2778ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2779ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2780
2781
2782# Make sure we can run config.sub.
2783$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2784 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2785
2786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2787$as_echo_n "checking build system type... " >&6; }
2788if ${ac_cv_build+:} false; then :
2789 $as_echo_n "(cached) " >&6
2790else
2791 ac_build_alias=$build_alias
2792test "x$ac_build_alias" = x &&
2793 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2794test "x$ac_build_alias" = x &&
2795 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2796ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2797 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2798
2799fi
2800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2801$as_echo "$ac_cv_build" >&6; }
2802case $ac_cv_build in
2803*-*-*) ;;
2804*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2805esac
2806build=$ac_cv_build
2807ac_save_IFS=$IFS; IFS='-'
2808set x $ac_cv_build
2809shift
2810build_cpu=$1
2811build_vendor=$2
2812shift; shift
2813# Remember, the first character of IFS is used to create $*,
2814# except with old shells:
2815build_os=$*
2816IFS=$ac_save_IFS
2817case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2818
2819
2820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2821$as_echo_n "checking host system type... " >&6; }
2822if ${ac_cv_host+:} false; then :
2823 $as_echo_n "(cached) " >&6
2824else
2825 if test "x$host_alias" = x; then
2826 ac_cv_host=$ac_cv_build
2827else
2828 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2829 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2830fi
2831
2832fi
2833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2834$as_echo "$ac_cv_host" >&6; }
2835case $ac_cv_host in
2836*-*-*) ;;
2837*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2838esac
2839host=$ac_cv_host
2840ac_save_IFS=$IFS; IFS='-'
2841set x $ac_cv_host
2842shift
2843host_cpu=$1
2844host_vendor=$2
2845shift; shift
2846# Remember, the first character of IFS is used to create $*,
2847# except with old shells:
2848host_os=$*
2849IFS=$ac_save_IFS
2850case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2851
2852
2853
doko@python.orga10e4a92013-01-25 18:45:12 +01002854
2855
Ned Deilyfcbc2462014-08-22 13:32:49 -07002856# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2857rm -f pybuilddir.txt
2858
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002859for ac_prog in python$PACKAGE_VERSION python3 python
2860do
2861 # Extract the first word of "$ac_prog", so it can be a program name with args.
2862set dummy $ac_prog; ac_word=$2
2863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2864$as_echo_n "checking for $ac_word... " >&6; }
2865if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2866 $as_echo_n "(cached) " >&6
2867else
2868 if test -n "$PYTHON_FOR_GEN"; then
2869 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2870else
2871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2872for as_dir in $PATH
2873do
2874 IFS=$as_save_IFS
2875 test -z "$as_dir" && as_dir=.
2876 for ac_exec_ext in '' $ac_executable_extensions; do
2877 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2878 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2879 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2880 break 2
2881 fi
2882done
2883 done
2884IFS=$as_save_IFS
2885
2886fi
2887fi
2888PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2889if test -n "$PYTHON_FOR_GEN"; then
2890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2891$as_echo "$PYTHON_FOR_GEN" >&6; }
2892else
2893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2894$as_echo "no" >&6; }
2895fi
2896
2897
2898 test -n "$PYTHON_FOR_GEN" && break
2899done
2900test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2901
2902if test "$PYTHON_FOR_GEN" = not-found; then
2903 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2904 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2905 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2906fi
2907
2908
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002909if test "$cross_compiling" = yes; then
2910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2911$as_echo_n "checking for python interpreter for cross build... " >&6; }
2912 if test -z "$PYTHON_FOR_BUILD"; then
2913 for interp in python$PACKAGE_VERSION python3 python; do
2914 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002915 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 +02002916 break
2917 fi
2918 interp=
2919 done
2920 if test x$interp = x; then
2921 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2922 fi
2923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2924$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002925 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 +02002926 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002927 # Used to comment out stuff for rebuilding generated files
2928 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002929elif test "$cross_compiling" = maybe; then
2930 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002931else
2932 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002933 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002934fi
2935
2936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Martin Pantereac67be2016-07-28 01:28:27 +00002938
Benjamin Petersond23f8222009-04-05 19:13:16 +00002939if test "$prefix" != "/"; then
2940 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
2945
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002946# We don't use PACKAGE_ variables, and they cause conflicts
2947# with other autoconf-based packages that include Python.h
2948grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2949rm confdefs.h
2950mv confdefs.h.new confdefs.h
2951
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002952
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002953VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002954
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002955# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002956
2957SOVERSION=1.0
2958
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002959# The later defininition of _XOPEN_SOURCE disables certain features
2960# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2961
Matthias Kloseb9621712010-04-24 17:59:49 +00002962$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002963
2964
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002965# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2966# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2967# them.
2968
Matthias Kloseb9621712010-04-24 17:59:49 +00002969$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002970
2971
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2973# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2974# them.
2975
Matthias Kloseb9621712010-04-24 17:59:49 +00002976$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002977
2978
Martin v. Löwisd6320502004-08-12 13:45:08 +00002979# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2980# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2981
Matthias Kloseb9621712010-04-24 17:59:49 +00002982$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002983
2984
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002985# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2986# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2987# them.
2988
Matthias Kloseb9621712010-04-24 17:59:49 +00002989$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002990
2991
2992
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002993define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002994
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002995# Arguments passed to configure.
2996
2997CONFIG_ARGS="$ac_configure_args"
2998
Matthias Kloseb9621712010-04-24 17:59:49 +00002999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3000$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003001# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003002if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003004 case $enableval in
3005 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003006 # Locate the best usable SDK, see Mac/README.txt for more
3007 # information
3008 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003009 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003010 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003011 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3012 if test ! -d "${enableval}"
3013 then
3014 enableval=/
3015 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003016 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003017 ;;
3018 esac
3019 case $enableval in
3020 no)
3021 UNIVERSALSDK=
3022 enable_universalsdk=
3023 ;;
3024 *)
3025 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003026 if test ! -d "${UNIVERSALSDK}"
3027 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003028 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003029 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003030 ;;
3031 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003032
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003033
Thomas Wouters477c8d52006-05-27 19:21:47 +00003034else
3035
3036 UNIVERSALSDK=
3037 enable_universalsdk=
3038
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003039fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003040
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041if test -n "${UNIVERSALSDK}"
3042then
Matthias Kloseb9621712010-04-24 17:59:49 +00003043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3044$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045else
Matthias Kloseb9621712010-04-24 17:59:49 +00003046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3047$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003048fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003049
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003050
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003051
Ned Deily87adb6e2013-10-18 21:09:56 -07003052ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003053
Ned Deilycbfb9a52012-06-23 16:02:19 -07003054# For backward compatibility reasons we prefer to select '32-bit' if available,
3055# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003056UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003057if test "`uname -s`" = "Darwin"
3058then
3059 if test -n "${UNIVERSALSDK}"
3060 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003061 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003062 then
3063 UNIVERSAL_ARCHS="intel"
3064 fi
3065 fi
3066fi
3067
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003068
Matthias Kloseb9621712010-04-24 17:59:49 +00003069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3070$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003071
3072# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003073if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003075 UNIVERSAL_ARCHS="$withval"
3076
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003077fi
3078
Ned Deily87adb6e2013-10-18 21:09:56 -07003079if test -n "${UNIVERSALSDK}"
3080then
3081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3082$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3083else
3084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3085$as_echo "no" >&6; }
3086fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003088
3089# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003091 withval=$with_framework_name;
3092 PYTHONFRAMEWORK=${withval}
3093 PYTHONFRAMEWORKDIR=${withval}.framework
3094 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3095
3096else
3097
3098 PYTHONFRAMEWORK=Python
3099 PYTHONFRAMEWORKDIR=Python.framework
3100 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3101
3102fi
3103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003104# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003105if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003106 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003107 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003108 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003109 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003110 esac
3111 case $enableval in
3112 no)
3113 PYTHONFRAMEWORK=
3114 PYTHONFRAMEWORKDIR=no-framework
3115 PYTHONFRAMEWORKPREFIX=
3116 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003117 FRAMEWORKINSTALLFIRST=
3118 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003119 FRAMEWORKALTINSTALLFIRST=
3120 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003121 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003122 if test "x${prefix}" = "xNONE"; then
3123 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3124 else
3125 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3126 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003127 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003128 ;;
3129 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003130 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003132 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003133 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003134 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3135 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003136 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003137 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003138
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003139 if test "x${prefix}" = "xNONE" ; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003141
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003145
3146 case "${enableval}" in
3147 /System*)
3148 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3149 if test "${prefix}" = "NONE" ; then
3150 # See below
3151 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3152 fi
3153 ;;
3154
3155 /Library*)
3156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3157 ;;
3158
3159 */Library/Frameworks)
3160 MDIR="`dirname "${enableval}"`"
3161 MDIR="`dirname "${MDIR}"`"
3162 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3163
3164 if test "${prefix}" = "NONE"; then
3165 # User hasn't specified the
3166 # --prefix option, but wants to install
3167 # the framework in a non-default location,
3168 # ensure that the compatibility links get
3169 # installed relative to that prefix as well
3170 # instead of in /usr/local.
3171 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3172 fi
3173 ;;
3174
3175 *)
3176 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3177 ;;
3178 esac
3179
Jack Jansen127e56e2001-09-11 14:41:54 +00003180 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003181
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003182 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003183 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003184 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003187
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003188 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3189
3190 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3191
Jack Jansene578a632001-08-15 01:27:14 +00003192 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003193
Guido van Rossum563e7081996-09-10 18:20:48 +00003194else
Martin v. Löwis11437992002-04-12 09:54:03 +00003195
Jack Jansene578a632001-08-15 01:27:14 +00003196 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003197 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003198 PYTHONFRAMEWORKPREFIX=
3199 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200 FRAMEWORKINSTALLFIRST=
3201 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003202 FRAMEWORKALTINSTALLFIRST=
3203 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003204 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003205 if test "x${prefix}" = "xNONE" ; then
3206 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3207 else
3208 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3209 fi
Jack Jansene578a632001-08-15 01:27:14 +00003210 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003211
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213fi
3214
Thomas Wouters477c8d52006-05-27 19:21:47 +00003215
3216
Michael W. Hudson54241132001-12-07 15:38:26 +00003217
3218
3219
3220
Jack Jansene578a632001-08-15 01:27:14 +00003221
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003222
3223
3224
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003225
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003226
Ned Deilyb8f944f2013-11-21 22:42:25 -08003227
Jack Jansene578a632001-08-15 01:27:14 +00003228##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003229## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003230## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003231##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003232# Set name for machine-dependent library files
3233
Matthias Kloseb9621712010-04-24 17:59:49 +00003234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3235$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003236if test -z "$MACHDEP"
3237then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003238 # avoid using uname for cross builds
3239 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003240 # ac_sys_system and ac_sys_release are used for setting
3241 # a lot of different things including 'define_xopen_source'
3242 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003243 case "$host" in
3244 *-*-linux*)
3245 ac_sys_system=Linux
3246 ;;
3247 *-*-cygwin*)
3248 ac_sys_system=Cygwin
3249 ;;
3250 *)
3251 # for now, limit cross builds to known configurations
3252 MACHDEP="unknown"
3253 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3254 esac
3255 ac_sys_release=
3256 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003257 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003258 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003259 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003260 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003261 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003262 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003263 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003264 fi
3265 ac_md_system=`echo $ac_sys_system |
3266 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3267 ac_md_release=`echo $ac_sys_release |
3268 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3269 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003270
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003271 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003272 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003273 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003274 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003275 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003276 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003277 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003278fi
Guido van Rossum91922671997-10-09 20:24:13 +00003279
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003280
3281if test "$cross_compiling" = yes; then
3282 case "$host" in
3283 *-*-linux*)
3284 case "$host_cpu" in
3285 arm*)
3286 _host_cpu=arm
3287 ;;
3288 *)
3289 _host_cpu=$host_cpu
3290 esac
3291 ;;
3292 *-*-cygwin*)
3293 _host_cpu=
3294 ;;
3295 *)
3296 # for now, limit cross builds to known configurations
3297 MACHDEP="unknown"
3298 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3299 esac
3300 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3301fi
3302
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003303# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3304# disable features if it is defined, without any means to access these
3305# features as extensions. For these systems, we skip the definition of
3306# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3307# some feature, make sure there is no alternative way to access this
3308# feature. Also, when using wildcards, make sure you have verified the
3309# need for not defining _XOPEN_SOURCE on all systems matching the
3310# wildcard, and that the wildcard does not include future systems
3311# (which may remove their limitations).
3312case $ac_sys_system/$ac_sys_release in
3313 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3314 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003315 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003316 # In addition, Stefan Krah confirms that issue #1244610 exists through
3317 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003318 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003319 define_xopen_source=no
3320 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3321 # also defined. This can be overridden by defining _BSD_SOURCE
3322 # As this has a different meaning on Linux, only define it on OpenBSD
3323
Matthias Kloseb9621712010-04-24 17:59:49 +00003324$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003325
3326 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003327 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003328 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3329 # also defined. This can be overridden by defining _BSD_SOURCE
3330 # As this has a different meaning on Linux, only define it on OpenBSD
3331
Matthias Kloseb9621712010-04-24 17:59:49 +00003332$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003333
3334 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003335 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3336 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3337 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003338 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 +00003339 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003340 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3341 # request to enable features supported by the standard as a request
3342 # to disable features not supported by the standard. The best way
3343 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3344 # entirely and define __EXTENSIONS__ instead.
3345 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003346 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003347 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3348 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003349 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003350 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003351 define_xopen_source=no;;
3352 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003353 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003354 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003355 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003356 # On FreeBSD 4, the math functions C89 does not cover are never defined
3357 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3358 FreeBSD/4.*)
3359 define_xopen_source=no;;
3360 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3361 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3362 # identifies itself as Darwin/7.*
3363 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3364 # disables platform specific features beyond repair.
3365 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3366 # has no effect, don't bother defining them
3367 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003368 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003369 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003370 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003371 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3372 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3373 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003374 AIX/4)
3375 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003376 AIX/5)
3377 if test `uname -r` -eq 1; then
3378 define_xopen_source=no
3379 fi
3380 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003381 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3382 # defining NI_NUMERICHOST.
3383 QNX/6.3.2)
3384 define_xopen_source=no
3385 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003386
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003387esac
3388
3389if test $define_xopen_source = yes
3390then
Victor Stinner14d098d2011-09-07 22:29:43 +02003391 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003392
Victor Stinner14d098d2011-09-07 22:29:43 +02003393$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003394
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003395
3396 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3397 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3398 # several APIs are not declared. Since this is also needed in some
3399 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003400
Matthias Kloseb9621712010-04-24 17:59:49 +00003401$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003402
3403
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003404
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003405$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003406
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003407fi
3408
Christian Heimes647cd872013-12-07 23:39:33 +01003409# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3410case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003411 hp*|HP*)
3412 define_stdc_a1=yes;;
3413 *)
3414 define_stdc_a1=no;;
3415esac
3416
3417if test $define_stdc_a1 = yes
3418then
Christian Heimes647cd872013-12-07 23:39:33 +01003419
3420$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3421
Christian Heimesb02bcae2013-12-08 15:21:08 +01003422fi
Christian Heimes647cd872013-12-07 23:39:33 +01003423
Guido van Rossum91922671997-10-09 20:24:13 +00003424#
3425# SGI compilers allow the specification of the both the ABI and the
3426# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003427# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003428#
3429# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3430# thus supply support for various ABI/ISA combinations. The MACHDEP
3431# variable is also adjusted.
3432#
3433
3434if test ! -z "$SGI_ABI"
3435then
3436 CC="cc $SGI_ABI"
3437 LDFLAGS="$SGI_ABI $LDFLAGS"
3438 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3441$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003442
Jack Jansen6b08a402004-06-03 12:41:45 +00003443# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3444# it may influence the way we can build extensions, so distutils
3445# needs to check it
3446
Thomas Wouters477c8d52006-05-27 19:21:47 +00003447
Jack Jansen6b08a402004-06-03 12:41:45 +00003448CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003449EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003450
Guido van Rossum627b2d71993-12-24 10:39:16 +00003451# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003452
3453# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3454# for debug/optimization stuff. BASECFLAGS is for flags that are required
3455# just to get things to compile and link. Users are free to override OPT
3456# when running configure or make. The build should not break if they do.
3457# BASECFLAGS should generally not be messed with, however.
3458
3459# XXX shouldn't some/most/all of this code be merged with the stuff later
3460# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3462$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003464# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003465if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003467 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003468 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003469 without_gcc=yes;;
3470 yes) CC=gcc
3471 without_gcc=no;;
3472 *) CC=$withval
3473 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003474 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003475else
Martin v. Löwis11437992002-04-12 09:54:03 +00003476
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003477 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003478 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003479 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003480 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003481 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482fi
3483
Matthias Kloseb9621712010-04-24 17:59:49 +00003484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3485$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003486
Zachary Ware5af85642015-12-21 12:09:17 -06003487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3488$as_echo_n "checking for --with-icc... " >&6; }
3489
3490# Check whether --with-icc was given.
3491if test "${with_icc+set}" = set; then :
3492 withval=$with_icc;
3493 case $withval in
3494 no) CC=${CC:-cc}
3495 with_icc=no;;
3496 yes) CC=icc
3497 CXX=icpc
3498 with_icc=yes;;
3499 *) CC=$withval
3500 with_icc=$withval;;
3501 esac
3502else
3503
3504 with_icc=no
3505fi
3506
3507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3508$as_echo "$with_icc" >&6; }
3509
Guido van Rossum8b131c51995-03-09 14:10:13 +00003510# If the user switches compilers, we can't believe the cache
3511if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3512then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003513 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003514(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003515fi
3516
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003517# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3518# when the compiler supports them, but we don't always want -O2, and
3519# we set -g later.
3520if test -z "$CFLAGS"; then
3521 CFLAGS=
3522fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003523
3524if test "$ac_sys_system" = "Darwin"
3525then
3526 # Compiler selection on MacOSX is more complicated than
3527 # AC_PROG_CC can handle, see Mac/README.txt for more
3528 # information
3529 if test -z "${CC}"
3530 then
3531 found_gcc=
3532 found_clang=
3533 as_save_IFS=$IFS; IFS=:
3534 for as_dir in $PATH
3535 do
3536 IFS=$as_save_IFS
3537 if test -x $as_dir/gcc; then
3538 if test -z "${found_gcc}"; then
3539 found_gcc=$as_dir/gcc
3540 fi
3541 fi
3542 if test -x $as_dir/clang; then
3543 if test -z "${found_clang}"; then
3544 found_clang=$as_dir/clang
3545 fi
3546 fi
3547 done
3548 IFS=$as_save_IFS
3549
3550 if test -n "$found_gcc" -a -n "$found_clang"
3551 then
3552 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3553 then
3554 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3555$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3556 CC="$found_clang"
3557 CXX="$found_clang++"
3558 fi
3559
3560
3561 elif test -z "$found_gcc" -a -n "$found_clang"
3562 then
3563 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3564$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3565 CC="$found_clang"
3566 CXX="$found_clang++"
3567
3568 elif test -z "$found_gcc" -a -z "$found_clang"
3569 then
3570 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3571 if test -n "${found_clang}"
3572 then
3573 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3574$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3575 CC="${found_clang}"
3576 CXX="`/usr/bin/xcrun -find clang++`"
3577
3578 # else: use default behaviour
3579 fi
3580 fi
3581 fi
3582fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003583ac_ext=c
3584ac_cpp='$CPP $CPPFLAGS'
3585ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3586ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3587ac_compiler_gnu=$ac_cv_c_compiler_gnu
3588if test -n "$ac_tool_prefix"; then
3589 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3590set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3592$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003593if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003595else
3596 if test -n "$CC"; then
3597 ac_cv_prog_CC="$CC" # Let the user override the test.
3598else
Martin v. Löwis11437992002-04-12 09:54:03 +00003599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3600for as_dir in $PATH
3601do
3602 IFS=$as_save_IFS
3603 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003604 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003606 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 $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 +00003608 break 2
3609 fi
3610done
Matthias Kloseb9621712010-04-24 17:59:49 +00003611 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003613
Jack Jansendd19cf82001-12-06 22:36:17 +00003614fi
3615fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003616CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003617if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3619$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003620else
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3622$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003623fi
3624
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626fi
3627if test -z "$ac_cv_prog_CC"; then
3628 ac_ct_CC=$CC
3629 # Extract the first word of "gcc", so it can be a program name with args.
3630set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3632$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003633if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003635else
3636 if test -n "$ac_ct_CC"; then
3637 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3638else
3639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3640for as_dir in $PATH
3641do
3642 IFS=$as_save_IFS
3643 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003644 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003646 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 $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 +00003648 break 2
3649 fi
3650done
Matthias Kloseb9621712010-04-24 17:59:49 +00003651 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003653
3654fi
3655fi
3656ac_ct_CC=$ac_cv_prog_ac_ct_CC
3657if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3659$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003660else
Matthias Kloseb9621712010-04-24 17:59:49 +00003661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3662$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003663fi
3664
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003665 if test "x$ac_ct_CC" = x; then
3666 CC=""
3667 else
3668 case $cross_compiling:$ac_tool_warned in
3669yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003672ac_tool_warned=yes ;;
3673esac
3674 CC=$ac_ct_CC
3675 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003676else
3677 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003678fi
3679
Jack Jansendd19cf82001-12-06 22:36:17 +00003680if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681 if test -n "$ac_tool_prefix"; then
3682 # 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 +00003683set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3685$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003686if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003688else
3689 if test -n "$CC"; then
3690 ac_cv_prog_CC="$CC" # Let the user override the test.
3691else
Martin v. Löwis11437992002-04-12 09:54:03 +00003692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3693for as_dir in $PATH
3694do
3695 IFS=$as_save_IFS
3696 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003697 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003698 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003699 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 $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 +00003701 break 2
3702 fi
3703done
Matthias Kloseb9621712010-04-24 17:59:49 +00003704 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003706
3707fi
3708fi
3709CC=$ac_cv_prog_CC
3710if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3712$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003713else
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3715$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003716fi
3717
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003720fi
3721if test -z "$CC"; then
3722 # Extract the first word of "cc", so it can be a program name with args.
3723set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3725$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003726if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003728else
3729 if test -n "$CC"; then
3730 ac_cv_prog_CC="$CC" # Let the user override the test.
3731else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003732 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003733as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3734for as_dir in $PATH
3735do
3736 IFS=$as_save_IFS
3737 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003739 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3741 ac_prog_rejected=yes
3742 continue
3743 fi
3744 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003745 $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 +00003746 break 2
3747 fi
3748done
Matthias Kloseb9621712010-04-24 17:59:49 +00003749 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003750IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003751
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752if test $ac_prog_rejected = yes; then
3753 # We found a bogon in the path, so make sure we never use it.
3754 set dummy $ac_cv_prog_CC
3755 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757 # We chose a different compiler from the bogus one.
3758 # However, it has the same basename, so the bogon will be chosen
3759 # first if we set CC to just the basename; use the full file name.
3760 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003761 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762 fi
3763fi
3764fi
3765fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003766CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3769$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003770else
Matthias Kloseb9621712010-04-24 17:59:49 +00003771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3772$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773fi
3774
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776fi
3777if test -z "$CC"; then
3778 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003779 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003780 do
3781 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3782set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3784$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003785if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003787else
3788 if test -n "$CC"; then
3789 ac_cv_prog_CC="$CC" # Let the user override the test.
3790else
Martin v. Löwis11437992002-04-12 09:54:03 +00003791as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3792for as_dir in $PATH
3793do
3794 IFS=$as_save_IFS
3795 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003796 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003797 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003798 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 $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 +00003800 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003801 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003802done
Matthias Kloseb9621712010-04-24 17:59:49 +00003803 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003805
3806fi
3807fi
3808CC=$ac_cv_prog_CC
3809if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3811$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003812else
Matthias Kloseb9621712010-04-24 17:59:49 +00003813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3814$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003815fi
3816
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003817
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 test -n "$CC" && break
3819 done
3820fi
3821if test -z "$CC"; then
3822 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003824do
3825 # Extract the first word of "$ac_prog", so it can be a program name with args.
3826set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3828$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003829if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003831else
3832 if test -n "$ac_ct_CC"; then
3833 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3834else
3835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3836for as_dir in $PATH
3837do
3838 IFS=$as_save_IFS
3839 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003840 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003841 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003842 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 $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 +00003844 break 2
3845 fi
3846done
Matthias Kloseb9621712010-04-24 17:59:49 +00003847 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850fi
3851fi
3852ac_ct_CC=$ac_cv_prog_ac_ct_CC
3853if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3855$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003856else
Matthias Kloseb9621712010-04-24 17:59:49 +00003857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3858$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003859fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862 test -n "$ac_ct_CC" && break
3863done
Michael W. Hudson54241132001-12-07 15:38:26 +00003864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003865 if test "x$ac_ct_CC" = x; then
3866 CC=""
3867 else
3868 case $cross_compiling:$ac_tool_warned in
3869yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003870{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3871$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003872ac_tool_warned=yes ;;
3873esac
3874 CC=$ac_ct_CC
3875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003876fi
3877
3878fi
3879
3880
Matthias Kloseb9621712010-04-24 17:59:49 +00003881test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3882$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003883as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003884See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003885
3886# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003887$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3888set X $ac_compile
3889ac_compiler=$2
3890for ac_option in --version -v -V -qversion; do
3891 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003892case "(($ac_try" in
3893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3894 *) ac_try_echo=$ac_try;;
3895esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3897$as_echo "$ac_try_echo"; } >&5
3898 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003899 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003900 if test -s conftest.err; then
3901 sed '10a\
3902... rest of stderr output deleted ...
3903 10q' conftest.err >conftest.er1
3904 cat conftest.er1 >&5
3905 fi
3906 rm -f conftest.er1 conftest.err
3907 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3908 test $ac_status = 0; }
3909done
Martin v. Löwis11437992002-04-12 09:54:03 +00003910
Matthias Kloseb9621712010-04-24 17:59:49 +00003911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003912/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003913
Martin v. Löwis11437992002-04-12 09:54:03 +00003914int
3915main ()
3916{
3917
3918 ;
3919 return 0;
3920}
3921_ACEOF
3922ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003923ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003924# Try to create an executable without -o first, disregard a.out.
3925# It will help us diagnose broken compilers, and finding out an intuition
3926# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3928$as_echo_n "checking whether the C compiler works... " >&6; }
3929ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3930
3931# The possible output files:
3932ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3933
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934ac_rmfiles=
3935for ac_file in $ac_files
3936do
3937 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003938 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003939 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3940 esac
3941done
3942rm -f $ac_rmfiles
3943
Matthias Kloseb9621712010-04-24 17:59:49 +00003944if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003945case "(($ac_try" in
3946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3947 *) ac_try_echo=$ac_try;;
3948esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003949eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3950$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3954 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3956# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3957# in a Makefile. We should not override ac_cv_exeext if it was cached,
3958# so that the user can short-circuit this test for compilers unknown to
3959# Autoconf.
3960for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003961do
3962 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003964 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003965 ;;
3966 [ab].out )
3967 # We found the default executable, but exeext='' is most
3968 # certainly right.
3969 break;;
3970 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003971 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 then :; else
3973 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3974 fi
3975 # We set ac_cv_exeext here because the later test for it is not
3976 # safe: cross compilers may not add the suffix if given an `-o'
3977 # argument, so we may need to know it at that point already.
3978 # Even if this section looks crufty: it has the advantage of
3979 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003980 break;;
3981 * )
3982 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003983 esac
3984done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003985test "$ac_cv_exeext" = no && ac_cv_exeext=
3986
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003987else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003988 ac_file=''
3989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003990if test -z "$ac_file"; then :
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3992$as_echo "no" >&6; }
3993$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003994sed 's/^/| /' conftest.$ac_ext >&5
3995
Matthias Kloseb9621712010-04-24 17:59:49 +00003996{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3997$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003998as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003999See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004000else
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4002$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004003fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4005$as_echo_n "checking for C compiler default output file name... " >&6; }
4006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4007$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004008ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009
Matthias Kloseb9621712010-04-24 17:59:49 +00004010rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004011ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4013$as_echo_n "checking for suffix of executables... " >&6; }
4014if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004015case "(($ac_try" in
4016 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4017 *) ac_try_echo=$ac_try;;
4018esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004019eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4020$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004021 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004022 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004023 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4024 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004025 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4026# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4027# work properly (i.e., refer to `conftest.exe'), while it won't with
4028# `rm'.
4029for ac_file in conftest.exe conftest conftest.*; do
4030 test -f "$ac_file" || continue
4031 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004032 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004033 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4034 break;;
4035 * ) break;;
4036 esac
4037done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004038else
Matthias Kloseb9621712010-04-24 17:59:49 +00004039 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4040$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004041as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004042See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004044rm -f conftest conftest$ac_cv_exeext
4045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4046$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004047
4048rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004049EXEEXT=$ac_cv_exeext
4050ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4052/* end confdefs.h. */
4053#include <stdio.h>
4054int
4055main ()
4056{
4057FILE *f = fopen ("conftest.out", "w");
4058 return ferror (f) || fclose (f) != 0;
4059
4060 ;
4061 return 0;
4062}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004064ac_clean_files="$ac_clean_files conftest.out"
4065# Check that the compiler produces executables we can run. If not, either
4066# the compiler is broken, or we cross compile.
4067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4068$as_echo_n "checking whether we are cross compiling... " >&6; }
4069if test "$cross_compiling" != yes; then
4070 { { ac_try="$ac_link"
4071case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
4075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
4077 (eval "$ac_link") 2>&5
4078 ac_status=$?
4079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }
4081 if { ac_try='./conftest$ac_cv_exeext'
4082 { { case "(($ac_try" in
4083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4084 *) ac_try_echo=$ac_try;;
4085esac
4086eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4087$as_echo "$ac_try_echo"; } >&5
4088 (eval "$ac_try") 2>&5
4089 ac_status=$?
4090 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4091 test $ac_status = 0; }; }; then
4092 cross_compiling=no
4093 else
4094 if test "$cross_compiling" = maybe; then
4095 cross_compiling=yes
4096 else
4097 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004099as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004100If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004101See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 fi
4103 fi
4104fi
4105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4106$as_echo "$cross_compiling" >&6; }
4107
4108rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4109ac_clean_files=$ac_clean_files_save
4110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4111$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004112if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004113 $as_echo_n "(cached) " >&6
4114else
4115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004116/* end confdefs.h. */
4117
4118int
4119main ()
4120{
4121
4122 ;
4123 return 0;
4124}
4125_ACEOF
4126rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004127if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004128case "(($ac_try" in
4129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4130 *) ac_try_echo=$ac_try;;
4131esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004132eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4133$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004134 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004135 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4137 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004138 for ac_file in conftest.o conftest.obj conftest.*; do
4139 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004141 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004142 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4143 break;;
4144 esac
4145done
4146else
Matthias Kloseb9621712010-04-24 17:59:49 +00004147 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004148sed 's/^/| /' conftest.$ac_ext >&5
4149
Matthias Kloseb9621712010-04-24 17:59:49 +00004150{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4151$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004152as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004153See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004154fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004155rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004156fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4158$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004159OBJEXT=$ac_cv_objext
4160ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4162$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004163if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004164 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004165else
Matthias Kloseb9621712010-04-24 17:59:49 +00004166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004168
Martin v. Löwis11437992002-04-12 09:54:03 +00004169int
4170main ()
4171{
4172#ifndef __GNUC__
4173 choke me
4174#endif
4175
4176 ;
4177 return 0;
4178}
4179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004181 ac_compiler_gnu=yes
4182else
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004186ac_cv_c_compiler_gnu=$ac_compiler_gnu
4187
4188fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4190$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4191if test $ac_compiler_gnu = yes; then
4192 GCC=yes
4193else
4194 GCC=
4195fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004196ac_test_CFLAGS=${CFLAGS+set}
4197ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4199$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004200if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004201 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004202else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004203 ac_save_c_werror_flag=$ac_c_werror_flag
4204 ac_c_werror_flag=yes
4205 ac_cv_prog_cc_g=no
4206 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004209
Martin v. Löwis11437992002-04-12 09:54:03 +00004210int
4211main ()
4212{
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004218if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004219 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004220else
Matthias Kloseb9621712010-04-24 17:59:49 +00004221 CFLAGS=""
4222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223/* end confdefs.h. */
4224
4225int
4226main ()
4227{
4228
4229 ;
4230 return 0;
4231}
4232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004233if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004234
Matthias Kloseb9621712010-04-24 17:59:49 +00004235else
4236 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004238 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239/* end confdefs.h. */
4240
4241int
4242main ()
4243{
4244
4245 ;
4246 return 0;
4247}
4248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004249if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004250 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4257 ac_c_werror_flag=$ac_save_c_werror_flag
4258fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4260$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004262 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004263elif test $ac_cv_prog_cc_g = yes; then
4264 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004265 CFLAGS="-g -O2"
4266 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004267 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268 fi
4269else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004270 if test "$GCC" = yes; then
4271 CFLAGS="-O2"
4272 else
4273 CFLAGS=
4274 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4277$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004278if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004279 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004280else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004281 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004282ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004284/* end confdefs.h. */
4285#include <stdarg.h>
4286#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004287struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004288/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4289struct buf { int x; };
4290FILE * (*rcsopen) (struct buf *, struct stat *, int);
4291static char *e (p, i)
4292 char **p;
4293 int i;
4294{
4295 return p[i];
4296}
4297static char *f (char * (*g) (char **, int), char **p, ...)
4298{
4299 char *s;
4300 va_list v;
4301 va_start (v,p);
4302 s = g (p, va_arg (v,int));
4303 va_end (v);
4304 return s;
4305}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004306
4307/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4308 function prototypes and stuff, but not '\xHH' hex character constants.
4309 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004310 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004311 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4312 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004313 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004314int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4315
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4317 inside strings and character constants. */
4318#define FOO(x) 'x'
4319int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4320
Skip Montanaro6dead952003-09-25 14:50:04 +00004321int test (int i, double x);
4322struct s1 {int (*f) (int a);};
4323struct s2 {int (*f) (double a);};
4324int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4325int argc;
4326char **argv;
4327int
4328main ()
4329{
4330return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4331 ;
4332 return 0;
4333}
4334_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004335for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4336 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004337do
4338 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004340 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004341fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004342rm -f core conftest.err conftest.$ac_objext
4343 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004344done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004346CC=$ac_save_CC
4347
4348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004349# AC_CACHE_VAL
4350case "x$ac_cv_prog_cc_c89" in
4351 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4353$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4356$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004357 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004358 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4360$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004361esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004362if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004363
Matthias Kloseb9621712010-04-24 17:59:49 +00004364fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004365
Martin v. Löwis11437992002-04-12 09:54:03 +00004366ac_ext=c
4367ac_cpp='$CPP $CPPFLAGS'
4368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4370ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004371
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004372ac_ext=c
4373ac_cpp='$CPP $CPPFLAGS'
4374ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4375ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4376ac_compiler_gnu=$ac_cv_c_compiler_gnu
4377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4378$as_echo_n "checking how to run the C preprocessor... " >&6; }
4379# On Suns, sometimes $CPP names a directory.
4380if test -n "$CPP" && test -d "$CPP"; then
4381 CPP=
4382fi
4383if test -z "$CPP"; then
4384 if ${ac_cv_prog_CPP+:} false; then :
4385 $as_echo_n "(cached) " >&6
4386else
4387 # Double quotes because CPP needs to be expanded
4388 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4389 do
4390 ac_preproc_ok=false
4391for ac_c_preproc_warn_flag in '' yes
4392do
4393 # Use a header file that comes with gcc, so configuring glibc
4394 # with a fresh cross-compiler works.
4395 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4396 # <limits.h> exists even on freestanding compilers.
4397 # On the NeXT, cc -E runs the code through the compiler's parser,
4398 # not just through cpp. "Syntax error" is here to catch this case.
4399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4400/* end confdefs.h. */
4401#ifdef __STDC__
4402# include <limits.h>
4403#else
4404# include <assert.h>
4405#endif
4406 Syntax error
4407_ACEOF
4408if ac_fn_c_try_cpp "$LINENO"; then :
4409
4410else
4411 # Broken: fails on valid input.
4412continue
4413fi
4414rm -f conftest.err conftest.i conftest.$ac_ext
4415
4416 # OK, works on sane cases. Now check whether nonexistent headers
4417 # can be detected and how.
4418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4419/* end confdefs.h. */
4420#include <ac_nonexistent.h>
4421_ACEOF
4422if ac_fn_c_try_cpp "$LINENO"; then :
4423 # Broken: success on invalid input.
4424continue
4425else
4426 # Passes both tests.
4427ac_preproc_ok=:
4428break
4429fi
4430rm -f conftest.err conftest.i conftest.$ac_ext
4431
4432done
4433# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4434rm -f conftest.i conftest.err conftest.$ac_ext
4435if $ac_preproc_ok; then :
4436 break
4437fi
4438
4439 done
4440 ac_cv_prog_CPP=$CPP
4441
4442fi
4443 CPP=$ac_cv_prog_CPP
4444else
4445 ac_cv_prog_CPP=$CPP
4446fi
4447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4448$as_echo "$CPP" >&6; }
4449ac_preproc_ok=false
4450for ac_c_preproc_warn_flag in '' yes
4451do
4452 # Use a header file that comes with gcc, so configuring glibc
4453 # with a fresh cross-compiler works.
4454 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4455 # <limits.h> exists even on freestanding compilers.
4456 # On the NeXT, cc -E runs the code through the compiler's parser,
4457 # not just through cpp. "Syntax error" is here to catch this case.
4458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4459/* end confdefs.h. */
4460#ifdef __STDC__
4461# include <limits.h>
4462#else
4463# include <assert.h>
4464#endif
4465 Syntax error
4466_ACEOF
4467if ac_fn_c_try_cpp "$LINENO"; then :
4468
4469else
4470 # Broken: fails on valid input.
4471continue
4472fi
4473rm -f conftest.err conftest.i conftest.$ac_ext
4474
4475 # OK, works on sane cases. Now check whether nonexistent headers
4476 # can be detected and how.
4477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4478/* end confdefs.h. */
4479#include <ac_nonexistent.h>
4480_ACEOF
4481if ac_fn_c_try_cpp "$LINENO"; then :
4482 # Broken: success on invalid input.
4483continue
4484else
4485 # Passes both tests.
4486ac_preproc_ok=:
4487break
4488fi
4489rm -f conftest.err conftest.i conftest.$ac_ext
4490
4491done
4492# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4493rm -f conftest.i conftest.err conftest.$ac_ext
4494if $ac_preproc_ok; then :
4495
4496else
4497 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4498$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4499as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4500See \`config.log' for more details" "$LINENO" 5; }
4501fi
4502
4503ac_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
4508
4509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4510$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4511if ${ac_cv_path_GREP+:} false; then :
4512 $as_echo_n "(cached) " >&6
4513else
4514 if test -z "$GREP"; then
4515 ac_path_GREP_found=false
4516 # Loop through the user's path and test for each of PROGNAME-LIST
4517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4519do
4520 IFS=$as_save_IFS
4521 test -z "$as_dir" && as_dir=.
4522 for ac_prog in grep ggrep; do
4523 for ac_exec_ext in '' $ac_executable_extensions; do
4524 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4525 as_fn_executable_p "$ac_path_GREP" || continue
4526# Check for GNU ac_path_GREP and select it if it is found.
4527 # Check for GNU $ac_path_GREP
4528case `"$ac_path_GREP" --version 2>&1` in
4529*GNU*)
4530 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4531*)
4532 ac_count=0
4533 $as_echo_n 0123456789 >"conftest.in"
4534 while :
4535 do
4536 cat "conftest.in" "conftest.in" >"conftest.tmp"
4537 mv "conftest.tmp" "conftest.in"
4538 cp "conftest.in" "conftest.nl"
4539 $as_echo 'GREP' >> "conftest.nl"
4540 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4541 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4542 as_fn_arith $ac_count + 1 && ac_count=$as_val
4543 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4544 # Best one so far, save it but keep looking for a better one
4545 ac_cv_path_GREP="$ac_path_GREP"
4546 ac_path_GREP_max=$ac_count
4547 fi
4548 # 10*(2^10) chars as input seems more than enough
4549 test $ac_count -gt 10 && break
4550 done
4551 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4552esac
4553
4554 $ac_path_GREP_found && break 3
4555 done
4556 done
4557 done
4558IFS=$as_save_IFS
4559 if test -z "$ac_cv_path_GREP"; then
4560 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4561 fi
4562else
4563 ac_cv_path_GREP=$GREP
4564fi
4565
4566fi
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4568$as_echo "$ac_cv_path_GREP" >&6; }
4569 GREP="$ac_cv_path_GREP"
4570
4571
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004572
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004573
4574
Matthias Kloseb9621712010-04-24 17:59:49 +00004575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4576$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004577
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004578# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004579if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004580 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004581
4582 case $withval in
4583 no) with_cxx_main=no
4584 MAINCC='$(CC)';;
4585 yes) with_cxx_main=yes
4586 MAINCC='$(CXX)';;
4587 *) with_cxx_main=yes
4588 MAINCC=$withval
4589 if test -z "$CXX"
4590 then
4591 CXX=$withval
4592 fi;;
4593 esac
4594else
4595
4596 with_cxx_main=no
4597 MAINCC='$(CC)'
4598
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004599fi
4600
Matthias Kloseb9621712010-04-24 17:59:49 +00004601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4602$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004603
4604preset_cxx="$CXX"
4605if test -z "$CXX"
4606then
4607 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004608 gcc) if test -n "$ac_tool_prefix"; then
4609 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4610set dummy ${ac_tool_prefix}g++; ac_word=$2
4611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612$as_echo_n "checking for $ac_word... " >&6; }
4613if ${ac_cv_path_CXX+:} false; then :
4614 $as_echo_n "(cached) " >&6
4615else
4616 case $CXX in
4617 [\\/]* | ?:[\\/]*)
4618 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4619 ;;
4620 *)
4621 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622for as_dir in notfound
4623do
4624 IFS=$as_save_IFS
4625 test -z "$as_dir" && as_dir=.
4626 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004627 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004628 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4629 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4630 break 2
4631 fi
4632done
4633 done
4634IFS=$as_save_IFS
4635
4636 ;;
4637esac
4638fi
4639CXX=$ac_cv_path_CXX
4640if test -n "$CXX"; then
4641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4642$as_echo "$CXX" >&6; }
4643else
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4645$as_echo "no" >&6; }
4646fi
4647
4648
4649fi
4650if test -z "$ac_cv_path_CXX"; then
4651 ac_pt_CXX=$CXX
4652 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004653set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4655$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004656if ${ac_cv_path_ac_pt_CXX+:} false; then :
4657 $as_echo_n "(cached) " >&6
4658else
4659 case $ac_pt_CXX in
4660 [\\/]* | ?:[\\/]*)
4661 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4662 ;;
4663 *)
4664 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4665for as_dir in notfound
4666do
4667 IFS=$as_save_IFS
4668 test -z "$as_dir" && as_dir=.
4669 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004670 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004671 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4672 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4673 break 2
4674 fi
4675done
4676 done
4677IFS=$as_save_IFS
4678
4679 ;;
4680esac
4681fi
4682ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4683if test -n "$ac_pt_CXX"; then
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4685$as_echo "$ac_pt_CXX" >&6; }
4686else
4687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4688$as_echo "no" >&6; }
4689fi
4690
4691 if test "x$ac_pt_CXX" = x; then
4692 CXX="g++"
4693 else
4694 case $cross_compiling:$ac_tool_warned in
4695yes:)
4696{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4697$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4698ac_tool_warned=yes ;;
4699esac
4700 CXX=$ac_pt_CXX
4701 fi
4702else
4703 CXX="$ac_cv_path_CXX"
4704fi
4705 ;;
4706 cc) if test -n "$ac_tool_prefix"; then
4707 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4708set dummy ${ac_tool_prefix}c++; ac_word=$2
4709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4710$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004711if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004712 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004713else
4714 case $CXX in
4715 [\\/]* | ?:[\\/]*)
4716 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4717 ;;
4718 *)
4719 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720for as_dir in notfound
4721do
4722 IFS=$as_save_IFS
4723 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004728 break 2
4729 fi
4730done
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004732IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004734 ;;
4735esac
4736fi
4737CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004738if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4740$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004741else
Matthias Kloseb9621712010-04-24 17:59:49 +00004742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4743$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004745
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004746
4747fi
4748if test -z "$ac_cv_path_CXX"; then
4749 ac_pt_CXX=$CXX
4750 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004751set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4753$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004754if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004755 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004756else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004757 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004758 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004759 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 +00004760 ;;
4761 *)
4762 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4763for as_dir in notfound
4764do
4765 IFS=$as_save_IFS
4766 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004768 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004769 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004770 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004771 break 2
4772 fi
4773done
Matthias Kloseb9621712010-04-24 17:59:49 +00004774 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004775IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004776
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004777 ;;
4778esac
4779fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004780ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4781if test -n "$ac_pt_CXX"; then
4782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4783$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004784else
Matthias Kloseb9621712010-04-24 17:59:49 +00004785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4786$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004787fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004788
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004789 if test "x$ac_pt_CXX" = x; then
4790 CXX="c++"
4791 else
4792 case $cross_compiling:$ac_tool_warned in
4793yes:)
4794{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4795$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4796ac_tool_warned=yes ;;
4797esac
4798 CXX=$ac_pt_CXX
4799 fi
4800else
4801 CXX="$ac_cv_path_CXX"
4802fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004804 clang|*/clang) if test -n "$ac_tool_prefix"; then
4805 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4806set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4808$as_echo_n "checking for $ac_word... " >&6; }
4809if ${ac_cv_path_CXX+:} false; then :
4810 $as_echo_n "(cached) " >&6
4811else
4812 case $CXX in
4813 [\\/]* | ?:[\\/]*)
4814 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4815 ;;
4816 *)
4817 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4818for as_dir in notfound
4819do
4820 IFS=$as_save_IFS
4821 test -z "$as_dir" && as_dir=.
4822 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004823 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004824 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4825 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4826 break 2
4827 fi
4828done
4829 done
4830IFS=$as_save_IFS
4831
Ned Deilycbfb9a52012-06-23 16:02:19 -07004832 ;;
4833esac
4834fi
4835CXX=$ac_cv_path_CXX
4836if test -n "$CXX"; then
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4838$as_echo "$CXX" >&6; }
4839else
4840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4841$as_echo "no" >&6; }
4842fi
4843
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844
4845fi
4846if test -z "$ac_cv_path_CXX"; then
4847 ac_pt_CXX=$CXX
4848 # Extract the first word of "clang++", so it can be a program name with args.
4849set dummy clang++; ac_word=$2
4850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4851$as_echo_n "checking for $ac_word... " >&6; }
4852if ${ac_cv_path_ac_pt_CXX+:} false; then :
4853 $as_echo_n "(cached) " >&6
4854else
4855 case $ac_pt_CXX in
4856 [\\/]* | ?:[\\/]*)
4857 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4858 ;;
4859 *)
4860 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4861for as_dir in notfound
4862do
4863 IFS=$as_save_IFS
4864 test -z "$as_dir" && as_dir=.
4865 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004866 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004867 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4868 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4869 break 2
4870 fi
4871done
4872 done
4873IFS=$as_save_IFS
4874
4875 ;;
4876esac
4877fi
4878ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4879if test -n "$ac_pt_CXX"; then
4880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4881$as_echo "$ac_pt_CXX" >&6; }
4882else
4883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4884$as_echo "no" >&6; }
4885fi
4886
4887 if test "x$ac_pt_CXX" = x; then
4888 CXX="clang++"
4889 else
4890 case $cross_compiling:$ac_tool_warned in
4891yes:)
4892{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4893$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4894ac_tool_warned=yes ;;
4895esac
4896 CXX=$ac_pt_CXX
4897 fi
4898else
4899 CXX="$ac_cv_path_CXX"
4900fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004901 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004902 icc|*/icc) if test -n "$ac_tool_prefix"; then
4903 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4904set dummy ${ac_tool_prefix}icpc; ac_word=$2
4905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4906$as_echo_n "checking for $ac_word... " >&6; }
4907if ${ac_cv_path_CXX+:} false; then :
4908 $as_echo_n "(cached) " >&6
4909else
4910 case $CXX in
4911 [\\/]* | ?:[\\/]*)
4912 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4913 ;;
4914 *)
4915 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4916for as_dir in notfound
4917do
4918 IFS=$as_save_IFS
4919 test -z "$as_dir" && as_dir=.
4920 for ac_exec_ext in '' $ac_executable_extensions; do
4921 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4922 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4924 break 2
4925 fi
4926done
4927 done
4928IFS=$as_save_IFS
4929
4930 ;;
4931esac
4932fi
4933CXX=$ac_cv_path_CXX
4934if test -n "$CXX"; then
4935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4936$as_echo "$CXX" >&6; }
4937else
4938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4939$as_echo "no" >&6; }
4940fi
4941
4942
4943fi
4944if test -z "$ac_cv_path_CXX"; then
4945 ac_pt_CXX=$CXX
4946 # Extract the first word of "icpc", so it can be a program name with args.
4947set dummy icpc; ac_word=$2
4948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4949$as_echo_n "checking for $ac_word... " >&6; }
4950if ${ac_cv_path_ac_pt_CXX+:} false; then :
4951 $as_echo_n "(cached) " >&6
4952else
4953 case $ac_pt_CXX in
4954 [\\/]* | ?:[\\/]*)
4955 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4956 ;;
4957 *)
4958 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4959for as_dir in notfound
4960do
4961 IFS=$as_save_IFS
4962 test -z "$as_dir" && as_dir=.
4963 for ac_exec_ext in '' $ac_executable_extensions; do
4964 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4965 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4966 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4967 break 2
4968 fi
4969done
4970 done
4971IFS=$as_save_IFS
4972
4973 ;;
4974esac
4975fi
4976ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4977if test -n "$ac_pt_CXX"; then
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4979$as_echo "$ac_pt_CXX" >&6; }
4980else
4981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4982$as_echo "no" >&6; }
4983fi
4984
4985 if test "x$ac_pt_CXX" = x; then
4986 CXX="icpc"
4987 else
4988 case $cross_compiling:$ac_tool_warned in
4989yes:)
4990{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4991$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4992ac_tool_warned=yes ;;
4993esac
4994 CXX=$ac_pt_CXX
4995 fi
4996else
4997 CXX="$ac_cv_path_CXX"
4998fi
4999 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005000 esac
5001 if test "$CXX" = "notfound"
5002 then
5003 CXX=""
5004 fi
5005fi
5006if test -z "$CXX"
5007then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005008 if test -n "$ac_tool_prefix"; then
5009 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5010 do
5011 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5012set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005015if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005016 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005017else
5018 if test -n "$CXX"; then
5019 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5020else
5021as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in $PATH
5023do
5024 IFS=$as_save_IFS
5025 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005026 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005028 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005030 break 2
5031 fi
5032done
Matthias Kloseb9621712010-04-24 17:59:49 +00005033 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005034IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005035
5036fi
5037fi
5038CXX=$ac_cv_prog_CXX
5039if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5041$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042else
Matthias Kloseb9621712010-04-24 17:59:49 +00005043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5044$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005045fi
5046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005047
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005048 test -n "$CXX" && break
5049 done
5050fi
5051if test -z "$CXX"; then
5052 ac_ct_CXX=$CXX
5053 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5054do
5055 # Extract the first word of "$ac_prog", so it can be a program name with args.
5056set dummy $ac_prog; ac_word=$2
5057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5058$as_echo_n "checking for $ac_word... " >&6; }
5059if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5060 $as_echo_n "(cached) " >&6
5061else
5062 if test -n "$ac_ct_CXX"; then
5063 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5064else
5065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5066for as_dir in $PATH
5067do
5068 IFS=$as_save_IFS
5069 test -z "$as_dir" && as_dir=.
5070 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005071 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005072 ac_cv_prog_ac_ct_CXX="$ac_prog"
5073 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5074 break 2
5075 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005076done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005077 done
5078IFS=$as_save_IFS
5079
5080fi
5081fi
5082ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5083if test -n "$ac_ct_CXX"; then
5084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5085$as_echo "$ac_ct_CXX" >&6; }
5086else
5087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5088$as_echo "no" >&6; }
5089fi
5090
5091
5092 test -n "$ac_ct_CXX" && break
5093done
5094
5095 if test "x$ac_ct_CXX" = x; then
5096 CXX="notfound"
5097 else
5098 case $cross_compiling:$ac_tool_warned in
5099yes:)
5100{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5101$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5102ac_tool_warned=yes ;;
5103esac
5104 CXX=$ac_ct_CXX
5105 fi
5106fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107
5108 if test "$CXX" = "notfound"
5109 then
5110 CXX=""
5111 fi
5112fi
5113if test "$preset_cxx" != "$CXX"
5114then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005115 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005116
5117 By default, distutils will build C++ extension modules with \"$CXX\".
5118 If this is not intended, then set CXX on the configure command line.
5119 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005120$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005121
5122 By default, distutils will build C++ extension modules with \"$CXX\".
5123 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005124 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125fi
5126
5127
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005128MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5129
5130
5131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5132$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5133cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005134#undef bfin
5135#undef cris
5136#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005137#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005138#undef hppa
5139#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005140#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005141#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005142#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005143#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005144#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005145#if defined(__ANDROID__)
5146# if defined(__x86_64__) && defined(__LP64__)
5147 x86_64-linux-android
5148# elif defined(__i386__)
5149 i686-linux-android
5150# elif defined(__aarch64__) && defined(__AARCH64EL__)
5151# if defined(__ILP32__)
5152 aarch64_ilp32-linux-android
5153# else
5154 aarch64-linux-android
5155# endif
5156# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5157 arm-linux-androideabi
5158# elif defined(__mips_hard_float) && defined(_MIPSEL)
5159# if _MIPS_SIM == _ABIO32
5160 mipsel-linux-android
5161# elif _MIPS_SIM == _ABI64
5162 mips64el-linux-android
5163# else
5164# error unknown platform triplet
5165# endif
5166# else
5167# error unknown platform triplet
5168# endif
5169#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005170# if defined(__x86_64__) && defined(__LP64__)
5171 x86_64-linux-gnu
5172# elif defined(__x86_64__) && defined(__ILP32__)
5173 x86_64-linux-gnux32
5174# elif defined(__i386__)
5175 i386-linux-gnu
5176# elif defined(__aarch64__) && defined(__AARCH64EL__)
5177# if defined(__ILP32__)
5178 aarch64_ilp32-linux-gnu
5179# else
5180 aarch64-linux-gnu
5181# endif
5182# elif defined(__aarch64__) && defined(__AARCH64EB__)
5183# if defined(__ILP32__)
5184 aarch64_be_ilp32-linux-gnu
5185# else
5186 aarch64_be-linux-gnu
5187# endif
5188# elif defined(__alpha__)
5189 alpha-linux-gnu
5190# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5191# if defined(__ARMEL__)
5192 arm-linux-gnueabihf
5193# else
5194 armeb-linux-gnueabihf
5195# endif
5196# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5197# if defined(__ARMEL__)
5198 arm-linux-gnueabi
5199# else
5200 armeb-linux-gnueabi
5201# endif
5202# elif defined(__hppa__)
5203 hppa-linux-gnu
5204# elif defined(__ia64__)
5205 ia64-linux-gnu
5206# elif defined(__m68k__) && !defined(__mcoldfire__)
5207 m68k-linux-gnu
5208# elif defined(__mips_hard_float) && defined(_MIPSEL)
5209# if _MIPS_SIM == _ABIO32
5210 mipsel-linux-gnu
5211# elif _MIPS_SIM == _ABIN32
5212 mips64el-linux-gnuabin32
5213# elif _MIPS_SIM == _ABI64
5214 mips64el-linux-gnuabi64
5215# else
5216# error unknown platform triplet
5217# endif
5218# elif defined(__mips_hard_float)
5219# if _MIPS_SIM == _ABIO32
5220 mips-linux-gnu
5221# elif _MIPS_SIM == _ABIN32
5222 mips64-linux-gnuabin32
5223# elif _MIPS_SIM == _ABI64
5224 mips64-linux-gnuabi64
5225# else
5226# error unknown platform triplet
5227# endif
5228# elif defined(__or1k__)
5229 or1k-linux-gnu
5230# elif defined(__powerpc__) && defined(__SPE__)
5231 powerpc-linux-gnuspe
5232# elif defined(__powerpc64__)
5233# if defined(__LITTLE_ENDIAN__)
5234 powerpc64le-linux-gnu
5235# else
5236 powerpc64-linux-gnu
5237# endif
5238# elif defined(__powerpc__)
5239 powerpc-linux-gnu
5240# elif defined(__s390x__)
5241 s390x-linux-gnu
5242# elif defined(__s390__)
5243 s390-linux-gnu
5244# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5245 sh4-linux-gnu
5246# elif defined(__sparc__) && defined(__arch64__)
5247 sparc64-linux-gnu
5248# elif defined(__sparc__)
5249 sparc-linux-gnu
5250# else
5251# error unknown platform triplet
5252# endif
5253#elif defined(__FreeBSD_kernel__)
5254# if defined(__LP64__)
5255 x86_64-kfreebsd-gnu
5256# elif defined(__i386__)
5257 i386-kfreebsd-gnu
5258# else
5259# error unknown platform triplet
5260# endif
5261#elif defined(__gnu_hurd__)
5262 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005263#elif defined(__APPLE__)
5264 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005265#else
5266# error unknown platform triplet
5267#endif
5268
5269EOF
5270
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005271if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005272 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5274$as_echo "$PLATFORM_TRIPLET" >&6; }
5275else
5276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5277$as_echo "none" >&6; }
5278fi
5279rm -f conftest.c conftest.out
5280
5281if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5282 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5283 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5284 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005285elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5286 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005287fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005288if test x$PLATFORM_TRIPLET = x; then
5289 PLATDIR=plat-$MACHDEP
5290else
5291 PLATDIR=plat-$PLATFORM_TRIPLET
5292fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005293
5294
doko@ubuntu.com55532312016-06-14 08:55:19 +02005295if test x$MULTIARCH != x; then
5296 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5297fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005298
5299
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5301$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5302save_LDFLAGS="$LDFLAGS"
5303LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005304
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005305cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5306/* end confdefs.h. */
5307
5308int
5309main ()
5310{
5311
5312 ;
5313 return 0;
5314}
5315_ACEOF
5316if ac_fn_c_try_link "$LINENO"; then :
5317 NO_AS_NEEDED="-Wl,--no-as-needed"
5318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5319$as_echo "yes" >&6; }
5320else
5321 NO_AS_NEEDED=""
5322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5323$as_echo "no" >&6; }
5324fi
5325rm -f core conftest.err conftest.$ac_objext \
5326 conftest$ac_exeext conftest.$ac_ext
5327LDFLAGS="$save_LDFLAGS"
5328
5329
5330
5331# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005332
Matthias Kloseb9621712010-04-24 17:59:49 +00005333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5334$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005335if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005336 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005337else
5338 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5339 then ac_cv_path_EGREP="$GREP -E"
5340 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005341 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005342 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005343 # Loop through the user's path and test for each of PROGNAME-LIST
5344 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005345for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5346do
5347 IFS=$as_save_IFS
5348 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005349 for ac_prog in egrep; do
5350 for ac_exec_ext in '' $ac_executable_extensions; do
5351 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005352 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005353# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354 # Check for GNU $ac_path_EGREP
5355case `"$ac_path_EGREP" --version 2>&1` in
5356*GNU*)
5357 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5358*)
5359 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005360 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005361 while :
5362 do
5363 cat "conftest.in" "conftest.in" >"conftest.tmp"
5364 mv "conftest.tmp" "conftest.in"
5365 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005366 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005367 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5368 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005369 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005370 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5371 # Best one so far, save it but keep looking for a better one
5372 ac_cv_path_EGREP="$ac_path_EGREP"
5373 ac_path_EGREP_max=$ac_count
5374 fi
5375 # 10*(2^10) chars as input seems more than enough
5376 test $ac_count -gt 10 && break
5377 done
5378 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5379esac
5380
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 $ac_path_EGREP_found && break 3
5382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005383 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005384 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005385IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005386 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005387 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 +00005388 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005389else
5390 ac_cv_path_EGREP=$EGREP
5391fi
5392
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005393 fi
5394fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5396$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005398
5399
Matthias Kloseb9621712010-04-24 17:59:49 +00005400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5401$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005402if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 $as_echo_n "(cached) " >&6
5404else
5405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005406/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005407#include <stdlib.h>
5408#include <stdarg.h>
5409#include <string.h>
5410#include <float.h>
5411
5412int
5413main ()
5414{
5415
5416 ;
5417 return 0;
5418}
5419_ACEOF
5420if ac_fn_c_try_compile "$LINENO"; then :
5421 ac_cv_header_stdc=yes
5422else
5423 ac_cv_header_stdc=no
5424fi
5425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5426
5427if test $ac_cv_header_stdc = yes; then
5428 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5430/* end confdefs.h. */
5431#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005432
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005433_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005434if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005435 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005437else
Matthias Kloseb9621712010-04-24 17:59:49 +00005438 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005439fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005440rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005441
Matthias Kloseb9621712010-04-24 17:59:49 +00005442fi
5443
5444if test $ac_cv_header_stdc = yes; then
5445 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5447/* end confdefs.h. */
5448#include <stdlib.h>
5449
5450_ACEOF
5451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5452 $EGREP "free" >/dev/null 2>&1; then :
5453
5454else
5455 ac_cv_header_stdc=no
5456fi
5457rm -f conftest*
5458
5459fi
5460
5461if test $ac_cv_header_stdc = yes; then
5462 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5463 if test "$cross_compiling" = yes; then :
5464 :
5465else
5466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5467/* end confdefs.h. */
5468#include <ctype.h>
5469#include <stdlib.h>
5470#if ((' ' & 0x0FF) == 0x020)
5471# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5472# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5473#else
5474# define ISLOWER(c) \
5475 (('a' <= (c) && (c) <= 'i') \
5476 || ('j' <= (c) && (c) <= 'r') \
5477 || ('s' <= (c) && (c) <= 'z'))
5478# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5479#endif
5480
5481#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5482int
5483main ()
5484{
5485 int i;
5486 for (i = 0; i < 256; i++)
5487 if (XOR (islower (i), ISLOWER (i))
5488 || toupper (i) != TOUPPER (i))
5489 return 2;
5490 return 0;
5491}
5492_ACEOF
5493if ac_fn_c_try_run "$LINENO"; then :
5494
5495else
5496 ac_cv_header_stdc=no
5497fi
5498rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5499 conftest.$ac_objext conftest.beam conftest.$ac_ext
5500fi
5501
5502fi
5503fi
5504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5505$as_echo "$ac_cv_header_stdc" >&6; }
5506if test $ac_cv_header_stdc = yes; then
5507
5508$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5509
5510fi
5511
5512# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5513for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5514 inttypes.h stdint.h unistd.h
5515do :
5516 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5517ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5518"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005519if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005520 cat >>confdefs.h <<_ACEOF
5521#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5522_ACEOF
5523
5524fi
5525
5526done
5527
5528
5529
5530 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 +02005531if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005532 MINIX=yes
5533else
5534 MINIX=
5535fi
5536
5537
5538 if test "$MINIX" = yes; then
5539
5540$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5541
5542
5543$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5544
5545
5546$as_echo "#define _MINIX 1" >>confdefs.h
5547
5548 fi
5549
5550
5551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5552$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005553if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005554 $as_echo_n "(cached) " >&6
5555else
5556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5557/* end confdefs.h. */
5558
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005559# define __EXTENSIONS__ 1
5560 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005561int
5562main ()
5563{
5564
5565 ;
5566 return 0;
5567}
5568_ACEOF
5569if ac_fn_c_try_compile "$LINENO"; then :
5570 ac_cv_safe_to_define___extensions__=yes
5571else
5572 ac_cv_safe_to_define___extensions__=no
5573fi
5574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5575fi
5576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5577$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5578 test $ac_cv_safe_to_define___extensions__ = yes &&
5579 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5580
5581 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5582
5583 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5584
5585 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5586
5587 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5588
5589
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
Xavier de Gaye95750b12016-07-09 11:05:42 +02005591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5592$as_echo_n "checking for the Android API level... " >&6; }
5593cat >> conftest.c <<EOF
5594#ifdef __ANDROID__
5595#include <android/api-level.h>
5596__ANDROID_API__
5597#else
5598#error not Android
5599#endif
5600EOF
5601
5602if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5603 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5605$as_echo "$ANDROID_API_LEVEL" >&6; }
5606
5607cat >>confdefs.h <<_ACEOF
5608#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5609_ACEOF
5610
5611else
5612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5613$as_echo "not Android" >&6; }
5614fi
5615rm -f conftest.c conftest.out
5616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005617# Check for unsupported systems
5618case $ac_sys_system/$ac_sys_release in
5619atheos*|Linux*/1*)
5620 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5621 echo See README for details.
5622 exit 1;;
5623esac
5624
5625
Matthias Kloseb9621712010-04-24 17:59:49 +00005626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5627$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005628
5629# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005630if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005631 withval=$with_suffix;
5632 case $withval in
5633 no) EXEEXT=;;
5634 yes) EXEEXT=.exe;;
5635 *) EXEEXT=$withval;;
5636 esac
5637fi
5638
Matthias Kloseb9621712010-04-24 17:59:49 +00005639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5640$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
5642# Test whether we're running on a non-case-sensitive system, in which
5643# case we give a warning if no ext is given
5644
Matthias Kloseb9621712010-04-24 17:59:49 +00005645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5646$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647if test ! -d CaseSensitiveTestDir; then
5648mkdir CaseSensitiveTestDir
5649fi
5650
5651if test -d casesensitivetestdir
5652then
Matthias Kloseb9621712010-04-24 17:59:49 +00005653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5654$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655 BUILDEXEEXT=.exe
5656else
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5658$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659 BUILDEXEEXT=$EXEEXT
5660fi
5661rmdir CaseSensitiveTestDir
5662
5663case $MACHDEP in
5664bsdos*)
5665 case $CC in
5666 gcc) CC="$CC -D_HAVE_BSDI";;
5667 esac;;
5668esac
5669
5670case $ac_sys_system in
5671hp*|HP*)
5672 case $CC in
5673 cc|*/cc) CC="$CC -Ae";;
5674 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675esac
5676
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677
Matthias Kloseb9621712010-04-24 17:59:49 +00005678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5679$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680if test -z "$LIBRARY"
5681then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005682 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5685$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686
5687# LDLIBRARY is the name of the library to link against (as opposed to the
5688# name of the library into which to insert object files). BLDLIBRARY is also
5689# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5690# is blank as the main program is not linked directly against LDLIBRARY.
5691# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5692# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5693# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5694# DLLLIBRARY is the shared (i.e., DLL) library.
5695#
5696# RUNSHARED is used to run shared python without installed libraries
5697#
5698# INSTSONAME is the name of the shared library that will be use to install
5699# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005700#
5701# LDVERSION is the shared library version number, normally the Python version
5702# with the ABI build flags appended.
5703
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704
5705
5706
5707
5708
5709
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005710
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711LDLIBRARY="$LIBRARY"
5712BLDLIBRARY='$(LDLIBRARY)'
5713INSTSONAME='$(LDLIBRARY)'
5714DLLLIBRARY=''
5715LDLIBRARYDIR=''
5716RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005717LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005718
5719# LINKCC is the command that links the python executable -- default is $(CC).
5720# If CXX is set, and if it is needed to link a main function that was
5721# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5722# python might then depend on the C++ runtime
5723# This is altered for AIX in order to build the export list before
5724# linking.
5725
Matthias Kloseb9621712010-04-24 17:59:49 +00005726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5727$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728if test -z "$LINKCC"
5729then
5730 LINKCC='$(PURIFY) $(MAINCC)'
5731 case $ac_sys_system in
5732 AIX*)
5733 exp_extra="\"\""
5734 if test $ac_sys_release -ge 5 -o \
5735 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5736 exp_extra="."
5737 fi
5738 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739 QNX*)
5740 # qcc must be used because the other compilers do not
5741 # support -N.
5742 LINKCC=qcc;;
5743 esac
5744fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5746$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747
5748# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5749# make sure we default having it set to "no": this is used by
5750# distutils.unixccompiler to know if it should add --enable-new-dtags
5751# to linker command lines, and failing to detect GNU ld simply results
5752# in the same bahaviour as before.
5753
Matthias Kloseb9621712010-04-24 17:59:49 +00005754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5755$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756ac_prog=ld
5757if test "$GCC" = yes; then
5758 ac_prog=`$CC -print-prog-name=ld`
5759fi
5760case `"$ac_prog" -V 2>&1 < /dev/null` in
5761 *GNU*)
5762 GNULD=yes;;
5763 *)
5764 GNULD=no;;
5765esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5767$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5770$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005771if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005772 $as_echo_n "(cached) " >&6
5773else
5774 ac_cv_c_inline=no
5775for ac_kw in inline __inline__ __inline; do
5776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5777/* end confdefs.h. */
5778#ifndef __cplusplus
5779typedef int foo_t;
5780static $ac_kw foo_t static_foo () {return 0; }
5781$ac_kw foo_t foo () {return 0; }
5782#endif
5783
5784_ACEOF
5785if ac_fn_c_try_compile "$LINENO"; then :
5786 ac_cv_c_inline=$ac_kw
5787fi
5788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5789 test "$ac_cv_c_inline" != no && break
5790done
5791
5792fi
5793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5794$as_echo "$ac_cv_c_inline" >&6; }
5795
5796case $ac_cv_c_inline in
5797 inline | yes) ;;
5798 *)
5799 case $ac_cv_c_inline in
5800 no) ac_val=;;
5801 *) ac_val=$ac_cv_c_inline;;
5802 esac
5803 cat >>confdefs.h <<_ACEOF
5804#ifndef __cplusplus
5805#define inline $ac_val
5806#endif
5807_ACEOF
5808 ;;
5809esac
5810
5811if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005812
5813$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005814
5815
5816fi
5817
5818
Matthias Kloseb9621712010-04-24 17:59:49 +00005819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5820$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005821# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005822if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005823 enableval=$enable_shared;
5824fi
5825
5826
5827if test -z "$enable_shared"
5828then
5829 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005830 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005831 enable_shared="yes";;
5832 *)
5833 enable_shared="no";;
5834 esac
5835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5837$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005838
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5840$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005842if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005843 enableval=$enable_profiling;
5844fi
5845
5846if test "x$enable_profiling" = xyes; then
5847 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005848 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850/* end confdefs.h. */
5851int main() { return 0; }
5852_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005853if ac_fn_c_try_link "$LINENO"; then :
5854
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005856 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005857fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005858rm -f core conftest.err conftest.$ac_objext \
5859 conftest$ac_exeext conftest.$ac_ext
5860 CC="$ac_save_cc"
5861else
5862 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005863fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5865$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005866
doko@ubuntu.comba015832012-06-30 16:52:05 +02005867if test "x$enable_profiling" = xyes; then
5868 BASECFLAGS="-pg $BASECFLAGS"
5869 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005870fi
5871
Matthias Kloseb9621712010-04-24 17:59:49 +00005872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5873$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005874
5875# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5876# library that we build, but we do not want to link against it (we
5877# will find it with a -framework option). For this reason there is an
5878# extra variable BLDLIBRARY against which Python and the extension
5879# modules are linked, BLDLIBRARY. This is normally the same as
5880# LDLIBRARY, but empty for MacOSX framework builds.
5881if test "$enable_framework"
5882then
5883 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005884 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005885 BLDLIBRARY=''
5886else
5887 BLDLIBRARY='$(LDLIBRARY)'
5888fi
5889
5890# Other platforms follow
5891if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005892 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893
Matthias Kloseb9621712010-04-24 17:59:49 +00005894$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005895
5896 case $ac_sys_system in
5897 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005898 LDLIBRARY='libpython$(LDVERSION).dll.a'
5899 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005900 ;;
5901 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005902 LDLIBRARY='libpython$(LDVERSION).so'
5903 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005904 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005906 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005907 then
5908 PY3LIBRARY=libpython3.so
5909 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005910 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005911 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005912 LDLIBRARY='libpython$(LDVERSION).so'
5913 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005914 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005915 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005916 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005917 then
5918 PY3LIBRARY=libpython3.so
5919 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005920 ;;
5921 hp*|HP*)
5922 case `uname -m` in
5923 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005925 ;;
5926 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005927 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 ;;
5929 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005930 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005931 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005934 LDLIBRARY='libpython$(LDVERSION).dylib'
5935 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005936 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005938 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005940 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005941 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005942
5943 esac
5944else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005945 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005946 case $ac_sys_system in
5947 CYGWIN*)
5948 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005949 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005950 ;;
5951 esac
5952fi
5953
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005954if test "$cross_compiling" = yes; then
5955 RUNSHARED=
5956fi
5957
Matthias Kloseb9621712010-04-24 17:59:49 +00005958{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5959$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960
5961if test -n "$ac_tool_prefix"; then
5962 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5963set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5965$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005966if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005967 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005968else
5969 if test -n "$RANLIB"; then
5970 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5971else
5972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5973for as_dir in $PATH
5974do
5975 IFS=$as_save_IFS
5976 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005977 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005979 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005981 break 2
5982 fi
5983done
Matthias Kloseb9621712010-04-24 17:59:49 +00005984 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985IFS=$as_save_IFS
5986
5987fi
5988fi
5989RANLIB=$ac_cv_prog_RANLIB
5990if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5992$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993else
Matthias Kloseb9621712010-04-24 17:59:49 +00005994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5995$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005996fi
5997
5998
5999fi
6000if test -z "$ac_cv_prog_RANLIB"; then
6001 ac_ct_RANLIB=$RANLIB
6002 # Extract the first word of "ranlib", so it can be a program name with args.
6003set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6005$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006006if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008else
6009 if test -n "$ac_ct_RANLIB"; then
6010 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6011else
6012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6013for as_dir in $PATH
6014do
6015 IFS=$as_save_IFS
6016 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006018 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006020 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006021 break 2
6022 fi
6023done
Matthias Kloseb9621712010-04-24 17:59:49 +00006024 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006025IFS=$as_save_IFS
6026
6027fi
6028fi
6029ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6030if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6032$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033else
Matthias Kloseb9621712010-04-24 17:59:49 +00006034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6035$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036fi
6037
6038 if test "x$ac_ct_RANLIB" = x; then
6039 RANLIB=":"
6040 else
6041 case $cross_compiling:$ac_tool_warned in
6042yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006043{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6044$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045ac_tool_warned=yes ;;
6046esac
6047 RANLIB=$ac_ct_RANLIB
6048 fi
6049else
6050 RANLIB="$ac_cv_prog_RANLIB"
6051fi
6052
6053
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006054if test -n "$ac_tool_prefix"; then
6055 for ac_prog in ar aal
6056 do
6057 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6058set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6060$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006061if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006062 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006063else
6064 if test -n "$AR"; then
6065 ac_cv_prog_AR="$AR" # Let the user override the test.
6066else
6067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6068for as_dir in $PATH
6069do
6070 IFS=$as_save_IFS
6071 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006072 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006073 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006074 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076 break 2
6077 fi
6078done
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006080IFS=$as_save_IFS
6081
6082fi
6083fi
6084AR=$ac_cv_prog_AR
6085if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6087$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088else
Matthias Kloseb9621712010-04-24 17:59:49 +00006089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6090$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091fi
6092
6093
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006094 test -n "$AR" && break
6095 done
6096fi
6097if test -z "$AR"; then
6098 ac_ct_AR=$AR
6099 for ac_prog in ar aal
6100do
6101 # Extract the first word of "$ac_prog", so it can be a program name with args.
6102set dummy $ac_prog; ac_word=$2
6103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6104$as_echo_n "checking for $ac_word... " >&6; }
6105if ${ac_cv_prog_ac_ct_AR+:} false; then :
6106 $as_echo_n "(cached) " >&6
6107else
6108 if test -n "$ac_ct_AR"; then
6109 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6110else
6111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6112for as_dir in $PATH
6113do
6114 IFS=$as_save_IFS
6115 test -z "$as_dir" && as_dir=.
6116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006118 ac_cv_prog_ac_ct_AR="$ac_prog"
6119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6120 break 2
6121 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006122done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006123 done
6124IFS=$as_save_IFS
6125
6126fi
6127fi
6128ac_ct_AR=$ac_cv_prog_ac_ct_AR
6129if test -n "$ac_ct_AR"; then
6130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6131$as_echo "$ac_ct_AR" >&6; }
6132else
6133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134$as_echo "no" >&6; }
6135fi
6136
6137
6138 test -n "$ac_ct_AR" && break
6139done
6140
6141 if test "x$ac_ct_AR" = x; then
6142 AR="ar"
6143 else
6144 case $cross_compiling:$ac_tool_warned in
6145yes:)
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6147$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6148ac_tool_warned=yes ;;
6149esac
6150 AR=$ac_ct_AR
6151 fi
6152fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006153
6154
6155# tweak ARFLAGS only if the user didn't set it on the command line
6156
6157if test -z "$ARFLAGS"
6158then
6159 ARFLAGS="rc"
6160fi
6161
doko@ubuntu.com58844492012-06-30 18:25:32 +02006162if test -n "$ac_tool_prefix"; then
6163 for ac_prog in readelf
6164 do
6165 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6166set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6168$as_echo_n "checking for $ac_word... " >&6; }
6169if ${ac_cv_prog_READELF+:} false; then :
6170 $as_echo_n "(cached) " >&6
6171else
6172 if test -n "$READELF"; then
6173 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6174else
6175as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6176for as_dir in $PATH
6177do
6178 IFS=$as_save_IFS
6179 test -z "$as_dir" && as_dir=.
6180 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006181 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006182 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6183 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6184 break 2
6185 fi
6186done
6187 done
6188IFS=$as_save_IFS
6189
6190fi
6191fi
6192READELF=$ac_cv_prog_READELF
6193if test -n "$READELF"; then
6194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6195$as_echo "$READELF" >&6; }
6196else
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }
6199fi
6200
6201
6202 test -n "$READELF" && break
6203 done
6204fi
6205if test -z "$READELF"; then
6206 ac_ct_READELF=$READELF
6207 for ac_prog in readelf
6208do
6209 # Extract the first word of "$ac_prog", so it can be a program name with args.
6210set dummy $ac_prog; ac_word=$2
6211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6212$as_echo_n "checking for $ac_word... " >&6; }
6213if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6214 $as_echo_n "(cached) " >&6
6215else
6216 if test -n "$ac_ct_READELF"; then
6217 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6218else
6219as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6220for as_dir in $PATH
6221do
6222 IFS=$as_save_IFS
6223 test -z "$as_dir" && as_dir=.
6224 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006225 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006226 ac_cv_prog_ac_ct_READELF="$ac_prog"
6227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6228 break 2
6229 fi
6230done
6231 done
6232IFS=$as_save_IFS
6233
6234fi
6235fi
6236ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6237if test -n "$ac_ct_READELF"; then
6238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6239$as_echo "$ac_ct_READELF" >&6; }
6240else
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242$as_echo "no" >&6; }
6243fi
6244
6245
6246 test -n "$ac_ct_READELF" && break
6247done
6248
6249 if test "x$ac_ct_READELF" = x; then
6250 READELF=":"
6251 else
6252 case $cross_compiling:$ac_tool_warned in
6253yes:)
6254{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6255$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6256ac_tool_warned=yes ;;
6257esac
6258 READELF=$ac_ct_READELF
6259 fi
6260fi
6261
6262if test "$cross_compiling" = yes; then
6263 case "$READELF" in
6264 readelf|:)
6265 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6266 ;;
6267 esac
6268fi
6269
6270
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006272case $MACHDEP in
6273bsdos*|hp*|HP*)
6274 # install -d does not work on BSDI or HP-UX
6275 if test -z "$INSTALL"
6276 then
6277 INSTALL="${srcdir}/install-sh -c"
6278 fi
6279esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006280# Find a good install program. We prefer a C program (faster),
6281# so one script is as good as another. But avoid the broken or
6282# incompatible versions:
6283# SysV /etc/install, /usr/sbin/install
6284# SunOS /usr/etc/install
6285# IRIX /sbin/install
6286# AIX /bin/install
6287# AmigaOS /C/install, which installs bootblocks on floppy discs
6288# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6289# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6290# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6291# OS/2's system install, which has a completely different semantic
6292# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006293# Reject install programs that cannot install multiple files.
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6295$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006296if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006297if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006298 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299else
6300 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6301for as_dir in $PATH
6302do
6303 IFS=$as_save_IFS
6304 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006305 # Account for people who put trailing slashes in PATH elements.
6306case $as_dir/ in #((
6307 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006309 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006310 /usr/ucb/* ) ;;
6311 *)
6312 # OSF1 and SCO ODT 3.0 have their own names for install.
6313 # Don't use installbsd from OSF since it installs stuff as root
6314 # by default.
6315 for ac_prog in ginstall scoinst install; do
6316 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006317 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006318 if test $ac_prog = install &&
6319 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6320 # AIX install. It has an incompatible calling convention.
6321 :
6322 elif test $ac_prog = install &&
6323 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6324 # program-specific install script used by HP pwplus--don't use.
6325 :
6326 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006327 rm -rf conftest.one conftest.two conftest.dir
6328 echo one > conftest.one
6329 echo two > conftest.two
6330 mkdir conftest.dir
6331 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6332 test -s conftest.one && test -s conftest.two &&
6333 test -s conftest.dir/conftest.one &&
6334 test -s conftest.dir/conftest.two
6335 then
6336 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6337 break 3
6338 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006339 fi
6340 fi
6341 done
6342 done
6343 ;;
6344esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006345
6346 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006347IFS=$as_save_IFS
6348
Matthias Kloseb9621712010-04-24 17:59:49 +00006349rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006350
6351fi
6352 if test "${ac_cv_path_install+set}" = set; then
6353 INSTALL=$ac_cv_path_install
6354 else
6355 # As a last resort, use the slow shell script. Don't cache a
6356 # value for INSTALL within a source directory, because that will
6357 # break other packages using the cache if that directory is
6358 # removed, or if the value is a relative name.
6359 INSTALL=$ac_install_sh
6360 fi
6361fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6363$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006364
6365# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6366# It thinks the first close brace ends the variable substitution.
6367test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6368
6369test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6370
6371test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6372
Matthias Klose93a0ef12012-03-15 18:08:34 +01006373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6374$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6375if test -z "$MKDIR_P"; then
6376 if ${ac_cv_path_mkdir+:} false; then :
6377 $as_echo_n "(cached) " >&6
6378else
6379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6380for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6381do
6382 IFS=$as_save_IFS
6383 test -z "$as_dir" && as_dir=.
6384 for ac_prog in mkdir gmkdir; do
6385 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006386 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006387 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6388 'mkdir (GNU coreutils) '* | \
6389 'mkdir (coreutils) '* | \
6390 'mkdir (fileutils) '4.1*)
6391 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6392 break 3;;
6393 esac
6394 done
6395 done
6396 done
6397IFS=$as_save_IFS
6398
6399fi
6400
6401 test -d ./--version && rmdir ./--version
6402 if test "${ac_cv_path_mkdir+set}" = set; then
6403 MKDIR_P="$ac_cv_path_mkdir -p"
6404 else
6405 # As a last resort, use the slow shell script. Don't cache a
6406 # value for MKDIR_P within a source directory, because that will
6407 # break other packages using the cache if that directory is
6408 # removed, or if the value is a relative name.
6409 MKDIR_P="$ac_install_sh -d"
6410 fi
6411fi
6412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6413$as_echo "$MKDIR_P" >&6; }
6414
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006415
6416# Not every filesystem supports hard links
6417
6418if test -z "$LN" ; then
6419 case $ac_sys_system in
6420 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421 *) LN=ln;;
6422 esac
6423fi
6424
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006425# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006426
6427ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006429# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6431$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006432
6433# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006434if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006435 withval=$with_pydebug;
6436if test "$withval" != no
6437then
6438
Matthias Kloseb9621712010-04-24 17:59:49 +00006439$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006440
Matthias Kloseb9621712010-04-24 17:59:49 +00006441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6442$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006443 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006444 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006445else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6446$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447fi
6448else
Matthias Kloseb9621712010-04-24 17:59:49 +00006449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006451fi
6452
6453
Brett Cannon63d98bc2016-09-06 17:12:40 -07006454# Enable optimization flags
6455
6456
6457Py_OPT='false'
6458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6459$as_echo_n "checking for --with-optimizations... " >&6; }
6460
6461# Check whether --with-optimizations was given.
6462if test "${with_optimizations+set}" = set; then :
6463 withval=$with_optimizations;
6464if test "$withval" != no
6465then
6466 Py_OPT='true'
6467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6468$as_echo "yes" >&6; };
6469else
6470 Py_OPT='false'
6471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; };
6473fi
6474else
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6476$as_echo "no" >&6; }
6477fi
6478
6479if test "$Py_OPT" = 'true' ; then
6480 Py_LTO='true'
6481 case $ac_sys_system in
6482 Darwin*)
6483 # At least on macOS El Capitan, LTO does not work with PGO.
6484 Py_LTO='false'
6485 ;;
6486 esac
6487 DEF_MAKE_ALL_RULE="profile-opt"
6488 DEF_MAKE_RULE="build_all"
6489else
6490 DEF_MAKE_ALL_RULE="build_all"
6491 DEF_MAKE_RULE="all"
6492fi
6493
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006494# Enable LTO flags
6495
6496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6497$as_echo_n "checking for --with-lto... " >&6; }
6498
6499# Check whether --with-lto was given.
6500if test "${with_lto+set}" = set; then :
6501 withval=$with_lto;
6502if test "$withval" != no
6503then
6504 Py_LTO='true'
6505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6506$as_echo "yes" >&6; };
6507else
6508 Py_LTO='false'
6509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6510$as_echo "no" >&6; };
6511fi
6512else
6513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514$as_echo "no" >&6; }
6515fi
6516
6517if test "$Py_LTO" = 'true' ; then
6518 case $CC in
6519 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006520 case $ac_sys_system in
6521 Darwin*)
6522 # Any changes made here should be reflected in the GCC+Darwin case below
6523 LTOFLAGS="-flto -Wl,-export_dynamic"
6524 ;;
6525 *)
6526 LTOFLAGS="-flto"
6527 ;;
6528 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006529 ;;
6530 *gcc*)
6531 case $ac_sys_system in
6532 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006533 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006534 ;;
6535 *)
6536 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6537 ;;
6538 esac
6539 ;;
6540 esac
6541fi
6542
Brett Cannon7188a3e2015-09-18 15:13:44 -07006543# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006544
6545
6546
6547
6548
6549
Brett Cannon7188a3e2015-09-18 15:13:44 -07006550# Extract the first word of "llvm-profdata", so it can be a program name with args.
6551set dummy llvm-profdata; ac_word=$2
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6553$as_echo_n "checking for $ac_word... " >&6; }
6554if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6555 $as_echo_n "(cached) " >&6
6556else
6557 if test -n "$LLVM_PROF_FOUND"; then
6558 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6559else
6560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6561for as_dir in $PATH
6562do
6563 IFS=$as_save_IFS
6564 test -z "$as_dir" && as_dir=.
6565 for ac_exec_ext in '' $ac_executable_extensions; do
6566 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6567 ac_cv_prog_LLVM_PROF_FOUND="found"
6568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6569 break 2
6570 fi
6571done
6572 done
6573IFS=$as_save_IFS
6574
6575 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6576fi
6577fi
6578LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6579if test -n "$LLVM_PROF_FOUND"; then
6580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6581$as_echo "$LLVM_PROF_FOUND" >&6; }
6582else
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6584$as_echo "no" >&6; }
6585fi
6586
6587
6588LLVM_PROF_ERR=no
6589case $CC in
6590 *clang*)
6591 # Any changes made here should be reflected in the GCC+Darwin case below
6592 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6593 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6594 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6595 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6596 if test $LLVM_PROF_FOUND = not-found
6597 then
6598 LLVM_PROF_ERR=yes
6599 fi
6600 ;;
6601 *gcc*)
6602 case $ac_sys_system in
6603 Darwin*)
6604 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6605 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6606 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6607 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6608 if test $LLVM_PROF_FOUND = not-found
6609 then
6610 LLVM_PROF_ERR=yes
6611 fi
6612 ;;
6613 *)
6614 PGO_PROF_GEN_FLAG="-fprofile-generate"
6615 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6616 LLVM_PROF_MERGER="true"
6617 LLVM_PROF_FILE=""
6618 ;;
6619 esac
6620 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006621 *icc*)
6622 PGO_PROF_GEN_FLAG="-prof-gen"
6623 PGO_PROF_USE_FLAG="-prof-use"
6624 LLVM_PROF_MERGER="true"
6625 LLVM_PROF_FILE=""
6626 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006627esac
6628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006629# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6630# merged with this chunk of code?
6631
6632# Optimizer/debugger flags
6633# ------------------------
6634# (The following bit of code is complicated enough - please keep things
6635# indented properly. Just pretend you're editing Python code. ;-)
6636
6637# There are two parallel sets of case statements below, one that checks to
6638# see if OPT was set and one that does BASECFLAGS setting based upon
6639# compiler and platform. BASECFLAGS tweaks need to be made even if the
6640# user set OPT.
6641
6642# tweak OPT based on compiler and platform, only if the user didn't set
6643# it on the command line
6644
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006645if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006646then
6647 case $GCC in
6648 yes)
6649 if test "$CC" != 'g++' ; then
6650 STRICT_PROTO="-Wstrict-prototypes"
6651 fi
6652 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6653 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6654 WRAP="-fwrapv"
6655 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006656
6657 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006658 case $CC in
6659 *clang*) WRAP="-fwrapv"
6660 ;;
6661 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006662
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006663 case $ac_cv_prog_cc_g in
6664 yes)
6665 if test "$Py_DEBUG" = 'true' ; then
6666 # Optimization messes up debuggers, so turn it off for
6667 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006668 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6669 OPT="-g -Og -Wall $STRICT_PROTO"
6670 else
6671 OPT="-g -O0 -Wall $STRICT_PROTO"
6672 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006673 else
6674 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6675 fi
6676 ;;
6677 *)
6678 OPT="-O3 -Wall $STRICT_PROTO"
6679 ;;
6680 esac
6681 case $ac_sys_system in
6682 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6683 ;;
6684 esac
6685 ;;
6686
6687 *)
6688 OPT="-O"
6689 ;;
6690 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691fi
6692
6693
6694
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006695
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006696# The -arch flags for universal builds on OSX
6697UNIVERSAL_ARCH_FLAGS=
6698
6699
6700# tweak BASECFLAGS based on compiler and platform
6701case $GCC in
6702yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006703 # Python doesn't violate C99 aliasing rules, but older versions of
6704 # GCC produce warnings for legal Python code. Enable
6705 # -fno-strict-aliasing on versions of GCC that support but produce
6706 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6708$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006709 ac_save_cc="$CC"
6710 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006711 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006712 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006713 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006714else
Matthias Kloseb9621712010-04-24 17:59:49 +00006715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006716/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006717
Matthias Kloseb159a552010-04-25 21:00:44 +00006718
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006719int
6720main ()
6721{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006722
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006723 ;
6724 return 0;
6725}
Matthias Kloseb159a552010-04-25 21:00:44 +00006726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006728if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006729
6730 CC="$ac_save_cc -fstrict-aliasing"
6731 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006733/* end confdefs.h. */
6734
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006735 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006736int
6737main ()
6738{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006739double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006740 ;
6741 return 0;
6742}
Matthias Kloseb159a552010-04-25 21:00:44 +00006743
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006744_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006745if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006746
6747 ac_cv_no_strict_aliasing=no
6748
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006749else
Matthias Kloseb159a552010-04-25 21:00:44 +00006750
6751 ac_cv_no_strict_aliasing=yes
6752
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006753fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006755
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006756else
Matthias Kloseb159a552010-04-25 21:00:44 +00006757
6758 ac_cv_no_strict_aliasing=no
6759
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006762fi
6763
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006764 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006765 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6767$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006768 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769 then
6770 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6771 fi
6772
Zachary Ware5af85642015-12-21 12:09:17 -06006773 # ICC doesn't recognize the option, but only emits a warning
6774 ## XXX does it emit an unused result warning and can it be disabled?
6775 case "$CC" in
6776 *icc*)
6777 ac_cv_disable_unused_result_warning=no
6778 ;;
6779 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006780 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6781$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6782 ac_save_cc="$CC"
6783 CC="$CC -Wunused-result -Werror"
6784 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006785 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006786 $as_echo_n "(cached) " >&6
6787else
6788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6789/* end confdefs.h. */
6790
6791
6792int
6793main ()
6794{
6795
6796 ;
6797 return 0;
6798}
6799
6800_ACEOF
6801if ac_fn_c_try_compile "$LINENO"; then :
6802
6803 ac_cv_disable_unused_result_warning=yes
6804
6805else
6806
6807 ac_cv_disable_unused_result_warning=no
6808
6809fi
6810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6811fi
6812
6813 CFLAGS="$save_CFLAGS"
6814 CC="$ac_save_cc"
6815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6816$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006817 ;;
6818 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006819
6820 if test $ac_cv_disable_unused_result_warning = yes
6821 then
6822 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6823 fi
6824
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6826$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6827 ac_save_cc="$CC"
6828 CC="$CC -Werror=declaration-after-statement"
6829 save_CFLAGS="$CFLAGS"
6830 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6831 $as_echo_n "(cached) " >&6
6832else
6833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6834/* end confdefs.h. */
6835
6836
6837int
6838main ()
6839{
6840
6841 ;
6842 return 0;
6843}
6844
6845_ACEOF
6846if ac_fn_c_try_compile "$LINENO"; then :
6847
6848 ac_cv_declaration_after_statement_warning=yes
6849
6850else
6851
6852 ac_cv_declaration_after_statement_warning=no
6853
6854fi
6855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6856fi
6857
6858 CFLAGS="$save_CFLAGS"
6859 CC="$ac_save_cc"
6860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6861$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6862
6863 if test $ac_cv_declaration_after_statement_warning = yes
6864 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006865 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006866 fi
6867
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6869$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6870 ac_save_cc="$CC"
6871 CC="$CC -Wsign-compare"
6872 save_CFLAGS="$CFLAGS"
6873 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6874 $as_echo_n "(cached) " >&6
6875else
6876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6877/* end confdefs.h. */
6878
6879
6880int
6881main ()
6882{
6883
6884 ;
6885 return 0;
6886}
6887
6888_ACEOF
6889if ac_fn_c_try_compile "$LINENO"; then :
6890
6891 ac_cv_enable_sign_compare_warning=yes
6892
6893else
6894
6895 ac_cv_enable_sign_compare_warning=no
6896
6897fi
6898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6899fi
6900
6901 CFLAGS="$save_CFLAGS"
6902 CC="$ac_save_cc"
6903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6904$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6905
6906 if test $ac_cv_enable_sign_compare_warning = yes
6907 then
6908 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6909 fi
6910
6911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6912$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6913 ac_save_cc="$CC"
6914 CC="$CC -Wunreachable-code"
6915 save_CFLAGS="$CFLAGS"
6916 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6917 $as_echo_n "(cached) " >&6
6918else
6919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6920/* end confdefs.h. */
6921
6922
6923int
6924main ()
6925{
6926
6927 ;
6928 return 0;
6929}
6930
6931_ACEOF
6932if ac_fn_c_try_compile "$LINENO"; then :
6933
6934 ac_cv_enable_unreachable_code_warning=yes
6935
6936else
6937
6938 ac_cv_enable_unreachable_code_warning=no
6939
6940fi
6941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6942fi
6943
6944 CFLAGS="$save_CFLAGS"
6945 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006946
6947 # Don't enable unreachable code warning in debug mode, since it usually
6948 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006949 # Issue #24324: Unfortunately, the unreachable code warning does not work
6950 # correctly on gcc and has been silently removed from the compiler.
6951 # It is supported on clang but on OS X systems gcc may be an alias
6952 # for clang. Try to determine if the compiler is not really gcc and,
6953 # if so, only then enable the warning.
6954 if test $ac_cv_enable_unreachable_code_warning = yes && \
6955 test "$Py_DEBUG" != "true" && \
6956 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006957 then
6958 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006959 else
6960 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006961 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6963$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006965 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6966 # support. Without this, treatment of subnormals doesn't follow
6967 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006968 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006969 alpha*)
6970 BASECFLAGS="$BASECFLAGS -mieee"
6971 ;;
6972 esac
6973
6974 case $ac_sys_system in
6975 SCO_SV*)
6976 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6977 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006978
6979 # is there any other compiler on Darwin besides gcc?
6980 Darwin*)
6981 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6982 # used to be here, but non-Apple gcc doesn't accept them.
6983 if test "${CC}" = gcc
6984 then
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006986$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006987 case "${UNIVERSALSDK}" in
6988 */MacOSX10.4u.sdk)
6989 # Build using 10.4 SDK, force usage of gcc when the
6990 # compiler is gcc, otherwise the user will get very
6991 # confusing error messages when building on OSX 10.6
6992 CC=gcc-4.0
6993 CPP=cpp-4.0
6994 ;;
6995 esac
6996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006997$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006998 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006999
Ned Deily87adb6e2013-10-18 21:09:56 -07007000 if test "${enable_universalsdk}"
7001 then
7002 case "$UNIVERSAL_ARCHS" in
7003 32-bit)
7004 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7005 LIPO_32BIT_FLAGS=""
7006 ARCH_RUN_32BIT=""
7007 ;;
7008 64-bit)
7009 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7010 LIPO_32BIT_FLAGS=""
7011 ARCH_RUN_32BIT="true"
7012 ;;
7013 all)
7014 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7015 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7016 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7017 ;;
7018 intel)
7019 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7020 LIPO_32BIT_FLAGS="-extract i386"
7021 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7022 ;;
7023 intel-32)
7024 UNIVERSAL_ARCH_FLAGS="-arch i386"
7025 LIPO_32BIT_FLAGS=""
7026 ARCH_RUN_32BIT=""
7027 ;;
7028 3-way)
7029 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7030 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7031 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7032 ;;
7033 *)
7034 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7035 ;;
7036 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007037
Ned Deily87adb6e2013-10-18 21:09:56 -07007038 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7039 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7040 if test "${UNIVERSALSDK}" != "/"
7041 then
7042 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7043 fi
7044 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007045
Ned Deily87adb6e2013-10-18 21:09:56 -07007046 # Calculate an appropriate deployment target for this build:
7047 # The deployment target value is used explicitly to enable certain
7048 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007049 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007050 # component of the string returned by distutils.get_platform().
7051 #
7052 # Use the value from:
7053 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7054 # 2. the operating system version of the build machine if >= 10.6
7055 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7056 # below to pick either 10.3, 10.4, or 10.5 as the target.
7057 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007058
Ned Deily87adb6e2013-10-18 21:09:56 -07007059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7060$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007061 cur_target_major=`sw_vers -productVersion | \
7062 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7063 cur_target_minor=`sw_vers -productVersion | \
7064 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7065 cur_target="${cur_target_major}.${cur_target_minor}"
7066 if test ${cur_target_major} -eq 10 && \
7067 test ${cur_target_minor} -ge 3 && \
7068 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007069 then
Ned Deily36820b62014-06-25 13:44:22 -07007070 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007071 cur_target=10.3
7072 if test ${enable_universalsdk}
7073 then
7074 case "$UNIVERSAL_ARCHS" in
7075 all|3-way|intel|64-bit)
7076 # These configurations were first supported in 10.5
7077 cur_target='10.5'
7078 ;;
7079 esac
7080 else
7081 if test `/usr/bin/arch` = "i386"
7082 then
7083 # 10.4 was the first release to support Intel archs
7084 cur_target="10.4"
7085 fi
7086 fi
7087 fi
7088 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007089
Ned Deily87adb6e2013-10-18 21:09:56 -07007090 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7091 # environment with a value that is the same as what we'll use
7092 # in the Makefile to ensure that we'll get the same compiler
7093 # environment during configure and build time.
7094 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7095 export MACOSX_DEPLOYMENT_TARGET
7096 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7098$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007099
Ned Deily87adb6e2013-10-18 21:09:56 -07007100 # end of Darwin* tests
7101 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007102 esac
7103 ;;
7104
7105*)
7106 case $ac_sys_system in
7107 OpenUNIX*|UnixWare*)
7108 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7109 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007110 SCO_SV*)
7111 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7112 ;;
7113 esac
7114 ;;
7115esac
7116
Zachary Ware5af85642015-12-21 12:09:17 -06007117# ICC needs -fp-model strict or floats behave badly
7118case "$CC" in
7119*icc*)
7120 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7121 ;;
7122esac
7123
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007124if test "$Py_DEBUG" = 'true'; then
7125 :
7126else
7127 OPT="-DNDEBUG $OPT"
7128fi
7129
7130if test "$ac_arch_flags"
7131then
7132 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7133fi
7134
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007135# On some compilers, pthreads are available without further options
7136# (e.g. MacOS X). On some of these systems, the compiler will not
7137# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7138# So we have to see first whether pthreads are available without
7139# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7141$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007142if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007143 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007144else
Matthias Kloseb9621712010-04-24 17:59:49 +00007145 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007146 ac_cv_pthread_is_default=no
7147else
Matthias Kloseb9621712010-04-24 17:59:49 +00007148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007149/* end confdefs.h. */
7150
Stefan Krah7dba5942012-11-22 22:49:11 +01007151#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007152#include <pthread.h>
7153
7154void* routine(void* p){return NULL;}
7155
7156int main(){
7157 pthread_t p;
7158 if(pthread_create(&p,NULL,routine,NULL)!=0)
7159 return 1;
7160 (void)pthread_detach(p);
7161 return 0;
7162}
7163
7164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007165if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007166
7167 ac_cv_pthread_is_default=yes
7168 ac_cv_kthread=no
7169 ac_cv_pthread=no
7170
7171else
Matthias Kloseb9621712010-04-24 17:59:49 +00007172 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007173fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7175 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007176fi
7177
7178
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007179fi
7180
Matthias Kloseb9621712010-04-24 17:59:49 +00007181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7182$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007183
7184
7185if test $ac_cv_pthread_is_default = yes
7186then
7187 ac_cv_kpthread=no
7188else
7189# -Kpthread, if available, provides the right #defines
7190# and linker options to make pthread_create available
7191# Some compilers won't report that they do not support -Kpthread,
7192# so we need to run a program to see whether it really made the
7193# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7195$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007196if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007197 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007198else
7199 ac_save_cc="$CC"
7200CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007201if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007202 ac_cv_kpthread=no
7203else
Matthias Kloseb9621712010-04-24 17:59:49 +00007204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007205/* end confdefs.h. */
7206
Stefan Krah7dba5942012-11-22 22:49:11 +01007207#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007208#include <pthread.h>
7209
7210void* routine(void* p){return NULL;}
7211
7212int main(){
7213 pthread_t p;
7214 if(pthread_create(&p,NULL,routine,NULL)!=0)
7215 return 1;
7216 (void)pthread_detach(p);
7217 return 0;
7218}
7219
7220_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007221if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007222 ac_cv_kpthread=yes
7223else
Matthias Kloseb9621712010-04-24 17:59:49 +00007224 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007225fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007226rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7227 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007228fi
7229
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007230CC="$ac_save_cc"
7231fi
7232
Matthias Kloseb9621712010-04-24 17:59:49 +00007233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7234$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007235fi
7236
7237if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7238then
7239# -Kthread, if available, provides the right #defines
7240# and linker options to make pthread_create available
7241# Some compilers won't report that they do not support -Kthread,
7242# so we need to run a program to see whether it really made the
7243# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7245$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007246if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007247 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007248else
7249 ac_save_cc="$CC"
7250CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007251if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007252 ac_cv_kthread=no
7253else
Matthias Kloseb9621712010-04-24 17:59:49 +00007254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007255/* end confdefs.h. */
7256
Stefan Krah7dba5942012-11-22 22:49:11 +01007257#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007258#include <pthread.h>
7259
7260void* routine(void* p){return NULL;}
7261
7262int main(){
7263 pthread_t p;
7264 if(pthread_create(&p,NULL,routine,NULL)!=0)
7265 return 1;
7266 (void)pthread_detach(p);
7267 return 0;
7268}
7269
7270_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007271if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007272 ac_cv_kthread=yes
7273else
Matthias Kloseb9621712010-04-24 17:59:49 +00007274 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007275fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007276rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7277 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007278fi
7279
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007280CC="$ac_save_cc"
7281fi
7282
Matthias Kloseb9621712010-04-24 17:59:49 +00007283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7284$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007285fi
7286
7287if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7288then
7289# -pthread, if available, provides the right #defines
7290# and linker options to make pthread_create available
7291# Some compilers won't report that they do not support -pthread,
7292# so we need to run a program to see whether it really made the
7293# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7295$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007296if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007297 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007298else
7299 ac_save_cc="$CC"
7300CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007301if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007302 ac_cv_pthread=no
7303else
Matthias Kloseb9621712010-04-24 17:59:49 +00007304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007305/* end confdefs.h. */
7306
Stefan Krah7dba5942012-11-22 22:49:11 +01007307#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007308#include <pthread.h>
7309
7310void* routine(void* p){return NULL;}
7311
7312int main(){
7313 pthread_t p;
7314 if(pthread_create(&p,NULL,routine,NULL)!=0)
7315 return 1;
7316 (void)pthread_detach(p);
7317 return 0;
7318}
7319
7320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007321if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007322 ac_cv_pthread=yes
7323else
Matthias Kloseb9621712010-04-24 17:59:49 +00007324 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7327 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007328fi
7329
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007330CC="$ac_save_cc"
7331fi
7332
Matthias Kloseb9621712010-04-24 17:59:49 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7334$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007335fi
7336
7337# If we have set a CC compiler flag for thread support then
7338# check if it works for CXX, too.
7339ac_cv_cxx_thread=no
7340if test ! -z "$CXX"
7341then
Matthias Kloseb9621712010-04-24 17:59:49 +00007342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7343$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007344ac_save_cxx="$CXX"
7345
7346if test "$ac_cv_kpthread" = "yes"
7347then
7348 CXX="$CXX -Kpthread"
7349 ac_cv_cxx_thread=yes
7350elif test "$ac_cv_kthread" = "yes"
7351then
7352 CXX="$CXX -Kthread"
7353 ac_cv_cxx_thread=yes
7354elif test "$ac_cv_pthread" = "yes"
7355then
7356 CXX="$CXX -pthread"
7357 ac_cv_cxx_thread=yes
7358fi
7359
7360if test $ac_cv_cxx_thread = yes
7361then
7362 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7363 $CXX -c conftest.$ac_ext 2>&5
7364 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7365 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7366 then
7367 ac_cv_cxx_thread=yes
7368 else
7369 ac_cv_cxx_thread=no
7370 fi
7371 rm -fr conftest*
7372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7374$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007375fi
7376CXX="$ac_save_cxx"
7377
7378
7379# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7381$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007382if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007383 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007384else
Matthias Kloseb9621712010-04-24 17:59:49 +00007385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007386/* end confdefs.h. */
7387#include <stdlib.h>
7388#include <stdarg.h>
7389#include <string.h>
7390#include <float.h>
7391
7392int
7393main ()
7394{
7395
7396 ;
7397 return 0;
7398}
7399_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007400if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007401 ac_cv_header_stdc=yes
7402else
Matthias Kloseb9621712010-04-24 17:59:49 +00007403 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007404fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7406
7407if test $ac_cv_header_stdc = yes; then
7408 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410/* end confdefs.h. */
7411#include <string.h>
7412
7413_ACEOF
7414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007415 $EGREP "memchr" >/dev/null 2>&1; then :
7416
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417else
7418 ac_cv_header_stdc=no
7419fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007420rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007421
7422fi
7423
7424if test $ac_cv_header_stdc = yes; then
7425 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007427/* end confdefs.h. */
7428#include <stdlib.h>
7429
7430_ACEOF
7431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007432 $EGREP "free" >/dev/null 2>&1; then :
7433
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434else
7435 ac_cv_header_stdc=no
7436fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007437rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007438
7439fi
7440
7441if test $ac_cv_header_stdc = yes; then
7442 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007443 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444 :
7445else
Matthias Kloseb9621712010-04-24 17:59:49 +00007446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447/* end confdefs.h. */
7448#include <ctype.h>
7449#include <stdlib.h>
7450#if ((' ' & 0x0FF) == 0x020)
7451# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7452# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7453#else
7454# define ISLOWER(c) \
7455 (('a' <= (c) && (c) <= 'i') \
7456 || ('j' <= (c) && (c) <= 'r') \
7457 || ('s' <= (c) && (c) <= 'z'))
7458# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7459#endif
7460
7461#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7462int
7463main ()
7464{
7465 int i;
7466 for (i = 0; i < 256; i++)
7467 if (XOR (islower (i), ISLOWER (i))
7468 || toupper (i) != TOUPPER (i))
7469 return 2;
7470 return 0;
7471}
7472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007473if ac_fn_c_try_run "$LINENO"; then :
7474
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475else
Matthias Kloseb9621712010-04-24 17:59:49 +00007476 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007477fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007478rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7479 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007480fi
7481
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007482fi
7483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7485$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007486if test $ac_cv_header_stdc = yes; then
7487
Matthias Kloseb9621712010-04-24 17:59:49 +00007488$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489
7490fi
7491
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007492for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007493fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007494ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007495sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007496unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007497poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007498sys/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 +01007499sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007500sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007501sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007502sys/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 -07007503libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007504bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007505sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007506do :
7507 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7508ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007509if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007510 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007511#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007512_ACEOF
7513
7514fi
7515
Guido van Rossum627b2d71993-12-24 10:39:16 +00007516done
7517
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007518ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007519for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007520 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7522$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007523if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007524 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007525else
Matthias Kloseb9621712010-04-24 17:59:49 +00007526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007527/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007528#include <sys/types.h>
7529#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007530
Martin v. Löwis11437992002-04-12 09:54:03 +00007531int
7532main ()
7533{
7534if ((DIR *) 0)
7535return 0;
7536 ;
7537 return 0;
7538}
7539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007540if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007541 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007542else
Matthias Kloseb9621712010-04-24 17:59:49 +00007543 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007546fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007547eval ac_res=\$$as_ac_Header
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7549$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007550if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007551 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007552#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007553_ACEOF
7554
7555ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007556fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007557
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007558done
7559# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7560if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7562$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007563if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007564 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007565else
Martin v. Löwis11437992002-04-12 09:54:03 +00007566 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007570/* Override any GCC internal prototype to avoid an error.
7571 Use char because int might match the return type of a GCC
7572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007573#ifdef __cplusplus
7574extern "C"
7575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007576char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007577int
7578main ()
7579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007580return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 ;
7582 return 0;
7583}
7584_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007585for ac_lib in '' dir; do
7586 if test -z "$ac_lib"; then
7587 ac_res="none required"
7588 else
7589 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007590 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007591 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007593 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007595rm -f core conftest.err conftest.$ac_objext \
7596 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007597 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007598 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007600done
Victor Stinnere0be4232011-10-25 13:06:09 +02007601if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603else
7604 ac_cv_search_opendir=no
7605fi
7606rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007607LIBS=$ac_func_search_save_LIBS
7608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7610$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007611ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007612if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007613 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007614
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007615fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007616
Michael W. Hudson54241132001-12-07 15:38:26 +00007617else
Matthias Kloseb9621712010-04-24 17:59:49 +00007618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7619$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007620if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007621 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007622else
7623 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007626
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007627/* Override any GCC internal prototype to avoid an error.
7628 Use char because int might match the return type of a GCC
7629 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007630#ifdef __cplusplus
7631extern "C"
7632#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007633char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007634int
7635main ()
7636{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007638 ;
7639 return 0;
7640}
7641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007642for ac_lib in '' x; do
7643 if test -z "$ac_lib"; then
7644 ac_res="none required"
7645 else
7646 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007647 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007649 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007650 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007652rm -f core conftest.err conftest.$ac_objext \
7653 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007654 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007655 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007656fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007657done
Victor Stinnere0be4232011-10-25 13:06:09 +02007658if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007659
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660else
7661 ac_cv_search_opendir=no
7662fi
7663rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007664LIBS=$ac_func_search_save_LIBS
7665fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7667$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007668ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007669if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007671
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007672fi
7673
7674fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007675
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7677$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007678if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007680else
Matthias Kloseb9621712010-04-24 17:59:49 +00007681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007682/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007683#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007684int
7685main ()
7686{
7687return makedev(0, 0);
7688 ;
7689 return 0;
7690}
7691_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007692if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007693 ac_cv_header_sys_types_h_makedev=yes
7694else
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007696fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007697rm -f core conftest.err conftest.$ac_objext \
7698 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007699
7700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7702$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007703
7704if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007705ac_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 +02007706if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007707
Matthias Kloseb9621712010-04-24 17:59:49 +00007708$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007709
7710fi
7711
7712
7713
7714 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 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 +02007716if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007717
Matthias Kloseb9621712010-04-24 17:59:49 +00007718$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007719
7720fi
7721
7722
7723 fi
7724fi
7725
Michael W. Hudson54241132001-12-07 15:38:26 +00007726
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007727# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7728for ac_header in net/if.h
7729do :
7730 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7731#ifdef STDC_HEADERS
7732# include <stdlib.h>
7733# include <stddef.h>
7734#else
7735# ifdef HAVE_STDLIB_H
7736# include <stdlib.h>
7737# endif
7738#endif
7739#ifdef HAVE_SYS_SOCKET_H
7740# include <sys/socket.h>
7741#endif
7742
7743"
Victor Stinnere0be4232011-10-25 13:06:09 +02007744if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007745 cat >>confdefs.h <<_ACEOF
7746#define HAVE_NET_IF_H 1
7747_ACEOF
7748
7749fi
7750
7751done
7752
7753
Martin v. Löwis11017b12006-01-14 18:12:57 +00007754# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007755for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007756do :
7757 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 +00007758#ifdef HAVE_ASM_TYPES_H
7759#include <asm/types.h>
7760#endif
7761#ifdef HAVE_SYS_SOCKET_H
7762#include <sys/socket.h>
7763#endif
7764
Matthias Kloseb9621712010-04-24 17:59:49 +00007765"
Victor Stinnere0be4232011-10-25 13:06:09 +02007766if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007767 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007768#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007769_ACEOF
7770
7771fi
7772
7773done
7774
7775
Charles-François Natali47413c12011-10-06 19:47:44 +02007776# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007777for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007778do :
7779 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7780ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7781#ifdef HAVE_SYS_SOCKET_H
7782#include <sys/socket.h>
7783#endif
7784
7785"
7786if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7787 cat >>confdefs.h <<_ACEOF
7788#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7789_ACEOF
7790
7791fi
7792
7793done
7794
7795
Guido van Rossum627b2d71993-12-24 10:39:16 +00007796# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007797was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7799$as_echo_n "checking for clock_t in time.h... " >&6; }
7800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007801/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007802#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007803
7804_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007805if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007806 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007807 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007808else
Martin v. Löwis11437992002-04-12 09:54:03 +00007809
7810
Matthias Kloseb9621712010-04-24 17:59:49 +00007811$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007812
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007813
Guido van Rossum627b2d71993-12-24 10:39:16 +00007814fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007815rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007816
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7818$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007819
Matthias Kloseb9621712010-04-24 17:59:49 +00007820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7821$as_echo_n "checking for makedev... " >&6; }
7822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007823/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007824
Jesus Cea740f53a2010-04-28 11:35:30 +00007825#if defined(MAJOR_IN_MKDEV)
7826#include <sys/mkdev.h>
7827#elif defined(MAJOR_IN_SYSMACROS)
7828#include <sys/sysmacros.h>
7829#else
7830#include <sys/types.h>
7831#endif
7832
Neal Norwitz11690112002-07-30 01:08:28 +00007833int
7834main ()
7835{
Jesus Cea740f53a2010-04-28 11:35:30 +00007836
7837 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007838 ;
7839 return 0;
7840}
Matthias Kloseb159a552010-04-25 21:00:44 +00007841
Neal Norwitz11690112002-07-30 01:08:28 +00007842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007843if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007844 ac_cv_has_makedev=yes
7845else
Matthias Kloseb9621712010-04-24 17:59:49 +00007846 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007848rm -f core conftest.err conftest.$ac_objext \
7849 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7851$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007852if test "$ac_cv_has_makedev" = "yes"; then
7853
Matthias Kloseb9621712010-04-24 17:59:49 +00007854$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007855
7856fi
7857
Christian Heimes985ecdc2013-11-20 11:46:18 +01007858# byte swapping
7859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7860$as_echo_n "checking for le64toh... " >&6; }
7861cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7862/* end confdefs.h. */
7863
7864#ifdef HAVE_ENDIAN_H
7865#include <endian.h>
7866#elif defined(HAVE_SYS_ENDIAN_H)
7867#include <sys/endian.h>
7868#endif
7869
7870int
7871main ()
7872{
7873
7874 le64toh(1)
7875 ;
7876 return 0;
7877}
7878
7879_ACEOF
7880if ac_fn_c_try_link "$LINENO"; then :
7881 ac_cv_has_le64toh=yes
7882else
7883 ac_cv_has_le64toh=no
7884fi
7885rm -f core conftest.err conftest.$ac_objext \
7886 conftest$ac_exeext conftest.$ac_ext
7887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7888$as_echo "$ac_cv_has_le64toh" >&6; }
7889if test "$ac_cv_has_le64toh" = "yes"; then
7890
7891$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7892
7893fi
7894
Martin v. Löwis399a6892002-10-04 10:22:02 +00007895# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7896# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7897# defined, but the compiler does not support pragma redefine_extname,
7898# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7899# structures (such as rlimit64) without declaring them. As a
7900# work-around, disable LFS on such configurations
7901
7902use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7904$as_echo_n "checking Solaris LFS bug... " >&6; }
7905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007906/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007907
7908#define _LARGEFILE_SOURCE 1
7909#define _FILE_OFFSET_BITS 64
7910#include <sys/resource.h>
7911
Martin v. Löwis399a6892002-10-04 10:22:02 +00007912int
7913main ()
7914{
7915struct rlimit foo;
7916 ;
7917 return 0;
7918}
7919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007920if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007921 sol_lfs_bug=no
7922else
Matthias Kloseb9621712010-04-24 17:59:49 +00007923 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7927$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007928if test "$sol_lfs_bug" = "yes"; then
7929 use_lfs=no
7930fi
7931
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007932# Don't use largefile support for GNU/Hurd
7933case $ac_sys_system in GNU*)
7934 use_lfs=no
7935esac
7936
Martin v. Löwis399a6892002-10-04 10:22:02 +00007937if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007938# Two defines needed to enable largefile support on various platforms
7939# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007940case $ac_sys_system/$ac_sys_release in
7941AIX*)
7942
7943$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7944
7945 ;;
7946esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007947
Matthias Kloseb9621712010-04-24 17:59:49 +00007948$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007949
7950
Matthias Kloseb9621712010-04-24 17:59:49 +00007951$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007952
Martin v. Löwis399a6892002-10-04 10:22:02 +00007953fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007954
Guido van Rossum84e7b241996-08-19 21:59:00 +00007955# Add some code to confdefs.h so that the test for off_t works on SCO
7956cat >> confdefs.h <<\EOF
7957#if defined(SCO_DS)
7958#undef _OFF_T
7959#endif
7960EOF
7961
Guido van Rossumef2255b2000-03-10 22:30:29 +00007962# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007963ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007964if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007965
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007966else
Martin v. Löwis11437992002-04-12 09:54:03 +00007967
7968cat >>confdefs.h <<_ACEOF
7969#define mode_t int
7970_ACEOF
7971
7972fi
7973
Matthias Kloseb9621712010-04-24 17:59:49 +00007974ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007975if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007976
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007977else
Martin v. Löwis11437992002-04-12 09:54:03 +00007978
7979cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007980#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007981_ACEOF
7982
7983fi
7984
Matthias Kloseb9621712010-04-24 17:59:49 +00007985ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007986if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007987
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007988else
Martin v. Löwis11437992002-04-12 09:54:03 +00007989
7990cat >>confdefs.h <<_ACEOF
7991#define pid_t int
7992_ACEOF
7993
7994fi
7995
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007996
Martin v. Löwis11437992002-04-12 09:54:03 +00007997cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007998#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007999_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008000
Matthias Kloseb9621712010-04-24 17:59:49 +00008001ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008002if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008004else
Martin v. Löwis11437992002-04-12 09:54:03 +00008005
8006cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008007#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008008_ACEOF
8009
8010fi
8011
Matthias Kloseb9621712010-04-24 17:59:49 +00008012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8013$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008014if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008016else
Matthias Kloseb9621712010-04-24 17:59:49 +00008017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008018/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008019#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008020
8021_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008023 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008024 ac_cv_type_uid_t=yes
8025else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008026 ac_cv_type_uid_t=no
8027fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008028rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8032$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008033if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008034
Matthias Kloseb9621712010-04-24 17:59:49 +00008035$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008036
8037
Matthias Kloseb9621712010-04-24 17:59:49 +00008038$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008039
8040fi
8041
Mark Dickinson983bc162012-12-02 12:11:38 +00008042
Matthias Kloseb9621712010-04-24 17:59:49 +00008043ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008044if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008045
Matthias Kloseb9621712010-04-24 17:59:49 +00008046$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008047
8048fi
8049
Stefan Krah1919b7e2012-03-21 18:25:23 +01008050ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8051if test "x$ac_cv_type___uint128_t" = xyes; then :
8052
8053$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8054
8055fi
8056
Jack Jansendd19cf82001-12-06 22:36:17 +00008057
Michael W. Hudson54241132001-12-07 15:38:26 +00008058# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008059# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008060# The cast to long int works around a bug in the HP C Compiler
8061# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8062# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8063# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8065$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008066if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008067 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008068else
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008070
Martin v. Löwis11437992002-04-12 09:54:03 +00008071else
Matthias Kloseb9621712010-04-24 17:59:49 +00008072 if test "$ac_cv_type_int" = yes; then
8073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008075as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008076See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077 else
8078 ac_cv_sizeof_int=0
8079 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008080fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008081
Martin v. Löwis11437992002-04-12 09:54:03 +00008082fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8084$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008085
8086
8087
Martin v. Löwis11437992002-04-12 09:54:03 +00008088cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008089#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008090_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008091
8092
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008093# The cast to long int works around a bug in the HP C Compiler
8094# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8095# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8096# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8098$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008099if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008101else
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 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 +00008103
Martin v. Löwis11437992002-04-12 09:54:03 +00008104else
Matthias Kloseb9621712010-04-24 17:59:49 +00008105 if test "$ac_cv_type_long" = yes; then
8106 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008108as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008109See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110 else
8111 ac_cv_sizeof_long=0
8112 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008114
Martin v. Löwis11437992002-04-12 09:54:03 +00008115fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8117$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008118
8119
8120
Martin v. Löwis11437992002-04-12 09:54:03 +00008121cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008122#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008123_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008124
8125
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008126# The cast to long int works around a bug in the HP C Compiler
8127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8129# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8131$as_echo_n "checking size of long long... " >&6; }
8132if ${ac_cv_sizeof_long_long+:} false; then :
8133 $as_echo_n "(cached) " >&6
8134else
8135 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8136
8137else
8138 if test "$ac_cv_type_long_long" = yes; then
8139 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8141as_fn_error 77 "cannot compute sizeof (long long)
8142See \`config.log' for more details" "$LINENO" 5; }
8143 else
8144 ac_cv_sizeof_long_long=0
8145 fi
8146fi
8147
8148fi
8149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8150$as_echo "$ac_cv_sizeof_long_long" >&6; }
8151
8152
8153
8154cat >>confdefs.h <<_ACEOF
8155#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8156_ACEOF
8157
8158
8159# The cast to long int works around a bug in the HP C Compiler
8160# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8161# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8162# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8164$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008165if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008166 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008167else
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008169
Martin v. Löwis11437992002-04-12 09:54:03 +00008170else
Matthias Kloseb9621712010-04-24 17:59:49 +00008171 if test "$ac_cv_type_void_p" = yes; then
8172 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8173$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008174as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008175See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008176 else
8177 ac_cv_sizeof_void_p=0
8178 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008179fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008180
Martin v. Löwis11437992002-04-12 09:54:03 +00008181fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8183$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008184
8185
8186
Martin v. Löwis11437992002-04-12 09:54:03 +00008187cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008188#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008189_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008190
8191
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008192# The cast to long int works around a bug in the HP C Compiler
8193# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8194# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8195# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8197$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008198if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008199 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008200else
Matthias Kloseb9621712010-04-24 17:59:49 +00008201 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008202
Martin v. Löwis11437992002-04-12 09:54:03 +00008203else
Matthias Kloseb9621712010-04-24 17:59:49 +00008204 if test "$ac_cv_type_short" = yes; then
8205 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8206$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008207as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008208See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008209 else
8210 ac_cv_sizeof_short=0
8211 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008212fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008213
Martin v. Löwis11437992002-04-12 09:54:03 +00008214fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8216$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008217
8218
8219
Martin v. Löwis11437992002-04-12 09:54:03 +00008220cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008221#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008222_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008223
8224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008225# The cast to long int works around a bug in the HP C Compiler
8226# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8227# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8228# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8230$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008231if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008232 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008233else
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008235
Martin v. Löwis11437992002-04-12 09:54:03 +00008236else
Matthias Kloseb9621712010-04-24 17:59:49 +00008237 if test "$ac_cv_type_float" = yes; then
8238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008240as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008241See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008242 else
8243 ac_cv_sizeof_float=0
8244 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008246
Martin v. Löwis11437992002-04-12 09:54:03 +00008247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8249$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250
8251
8252
Martin v. Löwis11437992002-04-12 09:54:03 +00008253cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008254#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008255_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008256
8257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008258# The cast to long int works around a bug in the HP C Compiler
8259# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8260# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8261# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8263$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008264if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008265 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008266else
Matthias Kloseb9621712010-04-24 17:59:49 +00008267 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269else
Matthias Kloseb9621712010-04-24 17:59:49 +00008270 if test "$ac_cv_type_double" = yes; then
8271 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008273as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008274See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008275 else
8276 ac_cv_sizeof_double=0
8277 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008278fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008279
Martin v. Löwis11437992002-04-12 09:54:03 +00008280fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8282$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283
8284
8285
Martin v. Löwis11437992002-04-12 09:54:03 +00008286cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008287#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008288_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008289
8290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291# The cast to long int works around a bug in the HP C Compiler
8292# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8293# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8294# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8296$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008297if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008298 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008299else
Matthias Kloseb9621712010-04-24 17:59:49 +00008300 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 +00008301
Martin v. Löwis11437992002-04-12 09:54:03 +00008302else
Matthias Kloseb9621712010-04-24 17:59:49 +00008303 if test "$ac_cv_type_fpos_t" = yes; then
8304 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8305$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008306as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008307See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008308 else
8309 ac_cv_sizeof_fpos_t=0
8310 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008312
Martin v. Löwis11437992002-04-12 09:54:03 +00008313fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8315$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008316
8317
8318
Martin v. Löwis11437992002-04-12 09:54:03 +00008319cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008320#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008321_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008322
Michael W. Hudson54241132001-12-07 15:38:26 +00008323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008324# The cast to long int works around a bug in the HP C Compiler
8325# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8326# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8327# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8329$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008330if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008331 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008332else
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 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 +00008334
Martin v. Löwis18e16552006-02-15 17:27:45 +00008335else
Matthias Kloseb9621712010-04-24 17:59:49 +00008336 if test "$ac_cv_type_size_t" = yes; then
8337 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008339as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008340See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008341 else
8342 ac_cv_sizeof_size_t=0
8343 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008344fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008345
Martin v. Löwis18e16552006-02-15 17:27:45 +00008346fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8348$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008349
8350
8351
Martin v. Löwis18e16552006-02-15 17:27:45 +00008352cat >>confdefs.h <<_ACEOF
8353#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8354_ACEOF
8355
8356
Christian Heimes400adb02008-02-01 08:12:03 +00008357# The cast to long int works around a bug in the HP C Compiler
8358# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8359# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8360# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8362$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008363if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008364 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008365else
Matthias Kloseb9621712010-04-24 17:59:49 +00008366 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 +00008367
Christian Heimes400adb02008-02-01 08:12:03 +00008368else
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 if test "$ac_cv_type_pid_t" = yes; then
8370 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8371$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008372as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008373See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008374 else
8375 ac_cv_sizeof_pid_t=0
8376 fi
8377fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008378
Christian Heimes400adb02008-02-01 08:12:03 +00008379fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8381$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008382
8383
8384
8385cat >>confdefs.h <<_ACEOF
8386#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8387_ACEOF
8388
8389
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008390# The cast to long int works around a bug in the HP C Compiler
8391# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8392# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8393# This bug is HP SR number 8606223364.
8394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8395$as_echo_n "checking size of uintptr_t... " >&6; }
8396if ${ac_cv_sizeof_uintptr_t+:} false; then :
8397 $as_echo_n "(cached) " >&6
8398else
8399 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8400
8401else
8402 if test "$ac_cv_type_uintptr_t" = yes; then
8403 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8405as_fn_error 77 "cannot compute sizeof (uintptr_t)
8406See \`config.log' for more details" "$LINENO" 5; }
8407 else
8408 ac_cv_sizeof_uintptr_t=0
8409 fi
8410fi
8411
8412fi
8413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8414$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8415
8416
8417
8418cat >>confdefs.h <<_ACEOF
8419#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8420_ACEOF
8421
8422
Michael W. Hudson54241132001-12-07 15:38:26 +00008423
Matthias Kloseb9621712010-04-24 17:59:49 +00008424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8425$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008426have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008428/* end confdefs.h. */
8429
8430int
8431main ()
8432{
8433long double x; x = (long double)0;
8434 ;
8435 return 0;
8436}
8437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008438if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008439
8440
Matthias Kloseb9621712010-04-24 17:59:49 +00008441$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008442
8443 have_long_double=yes
8444
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008445fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8448$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008449if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008450# The cast to long int works around a bug in the HP C Compiler
8451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8453# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8455$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008456if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008457 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008458else
Matthias Kloseb9621712010-04-24 17:59:49 +00008459 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 +00008460
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008461else
Matthias Kloseb9621712010-04-24 17:59:49 +00008462 if test "$ac_cv_type_long_double" = yes; then
8463 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8464$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008465as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008466See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008467 else
8468 ac_cv_sizeof_long_double=0
8469 fi
8470fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008471
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008472fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8474$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008475
8476
8477
8478cat >>confdefs.h <<_ACEOF
8479#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8480_ACEOF
8481
8482
8483fi
8484
8485
Matthias Kloseb9621712010-04-24 17:59:49 +00008486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8487$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008488have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008489cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008490/* end confdefs.h. */
8491
8492int
8493main ()
8494{
8495_Bool x; x = (_Bool)0;
8496 ;
8497 return 0;
8498}
8499_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008500if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008501
8502
Matthias Kloseb9621712010-04-24 17:59:49 +00008503$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008504
8505 have_c99_bool=yes
8506
Thomas Woutersb2137042007-02-01 18:02:27 +00008507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8510$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008511if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512# The cast to long int works around a bug in the HP C Compiler
8513# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8514# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8515# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8517$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008518if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008520else
Matthias Kloseb9621712010-04-24 17:59:49 +00008521 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 +00008522
Thomas Woutersb2137042007-02-01 18:02:27 +00008523else
Matthias Kloseb9621712010-04-24 17:59:49 +00008524 if test "$ac_cv_type__Bool" = yes; then
8525 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8526$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008527as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008528See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529 else
8530 ac_cv_sizeof__Bool=0
8531 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008533
Thomas Woutersb2137042007-02-01 18:02:27 +00008534fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8536$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537
8538
8539
Thomas Woutersb2137042007-02-01 18:02:27 +00008540cat >>confdefs.h <<_ACEOF
8541#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8542_ACEOF
8543
8544
8545fi
8546
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008547# The cast to long int works around a bug in the HP C Compiler
8548# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8549# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8550# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8552$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008553if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008554 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008555else
Matthias Kloseb9621712010-04-24 17:59:49 +00008556 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008557#ifdef HAVE_SYS_TYPES_H
8558#include <sys/types.h>
8559#endif
8560
Matthias Kloseb9621712010-04-24 17:59:49 +00008561"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008562
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008563else
Matthias Kloseb9621712010-04-24 17:59:49 +00008564 if test "$ac_cv_type_off_t" = yes; then
8565 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8566$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008567as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008568See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008569 else
8570 ac_cv_sizeof_off_t=0
8571 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008572fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008573
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8576$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008577
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008578
8579
Martin v. Löwis11437992002-04-12 09:54:03 +00008580cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008581#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008582_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008583
Michael W. Hudson54241132001-12-07 15:38:26 +00008584
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008585
Matthias Kloseb9621712010-04-24 17:59:49 +00008586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8587$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008588if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008589 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008590
Matthias Kloseb9621712010-04-24 17:59:49 +00008591$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008592
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8594$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008595else
Matthias Kloseb9621712010-04-24 17:59:49 +00008596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8597$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008598fi
8599
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008600# The cast to long int works around a bug in the HP C Compiler
8601# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8602# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8603# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8605$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008606if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008607 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008608else
Matthias Kloseb9621712010-04-24 17:59:49 +00008609 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008610#ifdef HAVE_SYS_TYPES_H
8611#include <sys/types.h>
8612#endif
8613#ifdef HAVE_TIME_H
8614#include <time.h>
8615#endif
8616
Matthias Kloseb9621712010-04-24 17:59:49 +00008617"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008618
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008619else
Matthias Kloseb9621712010-04-24 17:59:49 +00008620 if test "$ac_cv_type_time_t" = yes; then
8621 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8622$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008623as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008624See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008625 else
8626 ac_cv_sizeof_time_t=0
8627 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008628fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008629
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008630fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8632$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008633
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008634
8635
Martin v. Löwis11437992002-04-12 09:54:03 +00008636cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008637#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008638_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008639
Michael W. Hudson54241132001-12-07 15:38:26 +00008640
8641
Trent Mick635f6fb2000-08-23 21:33:05 +00008642# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008643ac_save_cc="$CC"
8644if test "$ac_cv_kpthread" = "yes"
8645then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008646elif test "$ac_cv_kthread" = "yes"
8647then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008648elif test "$ac_cv_pthread" = "yes"
8649then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008650fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008651
Matthias Kloseb9621712010-04-24 17:59:49 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8653$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008654have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008656/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008657
8658 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008659int
8660main ()
8661{
Guido van Rossum12580492000-09-24 16:47:19 +00008662pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008663 ;
8664 return 0;
8665}
Matthias Kloseb159a552010-04-25 21:00:44 +00008666
Martin v. Löwis11437992002-04-12 09:54:03 +00008667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008668if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008669 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8673$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008674if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008675 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8678# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8680$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008681if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008683else
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008685#ifdef HAVE_PTHREAD_H
8686#include <pthread.h>
8687#endif
8688
Matthias Kloseb9621712010-04-24 17:59:49 +00008689"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008690
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008691else
Matthias Kloseb9621712010-04-24 17:59:49 +00008692 if test "$ac_cv_type_pthread_t" = yes; then
8693 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8694$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008695as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008696See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008697 else
8698 ac_cv_sizeof_pthread_t=0
8699 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008701
Trent Mick635f6fb2000-08-23 21:33:05 +00008702fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8704$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008705
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008706
8707
Martin v. Löwis11437992002-04-12 09:54:03 +00008708cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008709#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008710_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008711
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008712
Trent Mick635f6fb2000-08-23 21:33:05 +00008713fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008714CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008715
Michael W. Hudson54241132001-12-07 15:38:26 +00008716
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008717case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008718 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008719 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8720 ;;
8721 Darwin/*)
8722 OTHER_LIBTOOL_OPT=""
8723 ;;
8724esac
8725
8726
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008727
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008728case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008729 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008730 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8731 if test "${enable_universalsdk}"; then
8732 :
8733 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008734 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008735 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008736 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008737 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008738 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008739 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008740 if test ${gcc_version} '<' 4.0
8741 then
8742 LIBTOOL_CRUFT="-lcc_dynamic"
8743 else
8744 LIBTOOL_CRUFT=""
8745 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008746 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008747 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008748else
Matthias Kloseb9621712010-04-24 17:59:49 +00008749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008750/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008751
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008752 #include <unistd.h>
8753 int main(int argc, char*argv[])
8754 {
8755 if (sizeof(long) == 4) {
8756 return 0;
8757 } else {
8758 return 1;
8759 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008760 }
8761
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008763if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008764 ac_osx_32bit=yes
8765else
Matthias Kloseb9621712010-04-24 17:59:49 +00008766 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8769 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008770fi
8771
8772
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008773 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008774 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008775 i386)
8776 MACOSX_DEFAULT_ARCH="i386"
8777 ;;
8778 ppc)
8779 MACOSX_DEFAULT_ARCH="ppc"
8780 ;;
8781 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008782 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008783 ;;
8784 esac
8785 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008786 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008787 i386)
8788 MACOSX_DEFAULT_ARCH="x86_64"
8789 ;;
8790 ppc)
8791 MACOSX_DEFAULT_ARCH="ppc64"
8792 ;;
8793 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008794 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008795 ;;
8796 esac
8797
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008798 fi
8799
8800 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008801 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008802 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008803esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8805$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008806if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008807then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008808 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008809 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008810 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008811
Matthias Kloseb9621712010-04-24 17:59:49 +00008812$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008813
Matthias Kloseb9621712010-04-24 17:59:49 +00008814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8815$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008816 if test $enable_shared = "yes"
8817 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008818 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 +00008819 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008820else
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8822$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008823fi
8824
Matthias Kloseb9621712010-04-24 17:59:49 +00008825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8826$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008827case $ac_sys_system/$ac_sys_release in
8828 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008829
Matthias Kloseb9621712010-04-24 17:59:49 +00008830$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008831
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8833$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008834 ;;
8835 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8837$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008838 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008839esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008840
Guido van Rossum0a516c91994-09-12 10:58:40 +00008841# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008842
Michael W. Hudson54241132001-12-07 15:38:26 +00008843
8844
8845
8846
Benjamin Peterson99f03762010-04-11 22:15:28 +00008847
Thomas Wouters477c8d52006-05-27 19:21:47 +00008848
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008849# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8850# -- usually .so, .sl on HP-UX, .dll on Cygwin
8851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8852$as_echo_n "checking the extension of shared libraries... " >&6; }
8853if test -z "$SHLIB_SUFFIX"; then
8854 case $ac_sys_system in
8855 hp*|HP*)
8856 case `uname -m` in
8857 ia64) SHLIB_SUFFIX=.so;;
8858 *) SHLIB_SUFFIX=.sl;;
8859 esac
8860 ;;
8861 CYGWIN*) SHLIB_SUFFIX=.dll;;
8862 *) SHLIB_SUFFIX=.so;;
8863 esac
8864fi
8865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8866$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008867
Guido van Rossum0a516c91994-09-12 10:58:40 +00008868# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008869# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008870# (Shared libraries in this instance are shared modules to be loaded into
8871# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8873$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008874if test -z "$LDSHARED"
8875then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008876 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008877 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008878 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008879 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008880 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008881 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008882 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008884 if test "$GCC" = "yes" ; then
8885 LDSHARED='$(CC) -shared'
8886 LDCXXSHARED='$(CXX) -shared'
8887 else
8888 LDSHARED='$(CC) -G'
8889 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008890 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008891 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008892 if test "$GCC" = "yes" ; then
8893 LDSHARED='$(CC) -shared'
8894 LDCXXSHARED='$(CXX) -shared'
8895 else
8896 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008897 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008898 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008899 LDSHARED='$(CC) -bundle'
8900 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008901 if test "$enable_framework" ; then
8902 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008903 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8904 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008905 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008906 else
8907 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008908 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008909 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008910 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008911 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008912 LDSHARED='$(CC) -bundle'
8913 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008914 if test "$enable_framework" ; then
8915 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008916 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8917 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008918 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008919 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008920 # No framework, use the Python app as bundle-loader
8921 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008922 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008923 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008924 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008925 Darwin/*)
8926 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8927 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008928
Ned Deily36820b62014-06-25 13:44:22 -07008929 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8930 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8931 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8932 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8933 if test ${dep_target_major} -eq 10 && \
8934 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008935 then
Ned Deily36820b62014-06-25 13:44:22 -07008936 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008937 LDSHARED='$(CC) -bundle'
8938 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008939 if test "$enable_framework" ; then
8940 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008941 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8942 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008943 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008944 else
8945 # No framework, use the Python app as bundle-loader
8946 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8947 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008948 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008949 fi
Ned Deily36820b62014-06-25 13:44:22 -07008950 else
8951 # building for OS X 10.3 and later
8952 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8953 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8954 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008955 fi
8956 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008957 Linux*|GNU*|QNX*)
8958 LDSHARED='$(CC) -shared'
8959 LDCXXSHARED='$(CXX) -shared';;
8960 BSD/OS*/4*)
8961 LDSHARED="gcc -shared"
8962 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008963 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008964 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008965 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008966 LDSHARED='$(CC) -shared'
8967 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008968 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008969 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008970 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008971 OpenBSD*)
8972 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8973 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008974 LDSHARED='$(CC) -shared $(CCSHARED)'
8975 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008976 else
8977 case `uname -r` in
8978 [01].* | 2.[0-7] | 2.[0-7].*)
8979 LDSHARED="ld -Bshareable ${LDFLAGS}"
8980 ;;
8981 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008982 LDSHARED='$(CC) -shared $(CCSHARED)'
8983 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008984 ;;
8985 esac
8986 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008987 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008988 LDSHARED='$(CC) -shared'
8989 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008990 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008991 if test "$GCC" = "yes" ; then
8992 LDSHARED='$(CC) -shared'
8993 LDCXXSHARED='$(CXX) -shared'
8994 else
8995 LDSHARED='$(CC) -G'
8996 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008997 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008998 SCO_SV*)
8999 LDSHARED='$(CC) -Wl,-G,-Bexport'
9000 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9001 CYGWIN*)
9002 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9003 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009004 *) LDSHARED="ld";;
9005 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009006fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9008$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009009LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009010BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009011# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009012# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9014$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009015if test -z "$CCSHARED"
9016then
Guido van Rossum07397971997-04-29 21:49:50 +00009017 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009018 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009019 then CCSHARED="-fPIC";
9020 elif test `uname -p` = sparc;
9021 then CCSHARED="-xcode=pic32";
9022 else CCSHARED="-Kpic";
9023 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009024 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009025 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009026 else CCSHARED="+z";
9027 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009028 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009029 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009030 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009031 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009032 if test "$GCC" = "yes"
9033 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009034 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009035 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009036 SCO_SV*)
9037 if test "$GCC" = "yes"
9038 then CCSHARED="-fPIC"
9039 else CCSHARED="-Kpic -belf"
9040 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009041 IRIX*/6*) case $CC in
9042 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009043 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009044 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009045 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9048$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009049# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009050# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9052$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009053if test -z "$LINKFORSHARED"
9054then
Guido van Rossum07397971997-04-29 21:49:50 +00009055 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009056 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009057 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009058 LINKFORSHARED="-Wl,-E -Wl,+s";;
9059# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009060 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009061 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009062 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009064 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009065
9066 # Issue #18075: the default maximum stack size (8MBytes) is too
9067 # small for the default recursion limit. Increase the stack size
9068 # to ensure that tests don't crash
9069 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9070
Jack Jansene578a632001-08-15 01:27:14 +00009071 if test "$enable_framework"
9072 then
Jack Jansenda49e192005-01-07 13:08:22 +00009073 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009074 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009075 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009076 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009077 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009078 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009079 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009080 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9081 then
9082 LINKFORSHARED="-Wl,--export-dynamic"
9083 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009084 SunOS/5*) case $CC in
9085 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009086 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009087 then
9088 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009089 fi;;
9090 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009091 CYGWIN*)
9092 if test $enable_shared = "no"
9093 then
9094 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9095 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009096 QNX*)
9097 # -Wl,-E causes the symbols to be added to the dynamic
9098 # symbol table so that they can be found when a module
9099 # is loaded. -N 2048K causes the stack size to be set
9100 # to 2048 kilobytes so that the stack doesn't overflow
9101 # when running test_compile.py.
9102 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009103 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009104fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9106$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009107
Michael W. Hudson54241132001-12-07 15:38:26 +00009108
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009109
Matthias Kloseb9621712010-04-24 17:59:49 +00009110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9111$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009112if test ! "$LIBRARY" = "$LDLIBRARY"
9113then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009114 case $ac_sys_system in
9115 CYGWIN*)
9116 # Cygwin needs CCSHARED when building extension DLLs
9117 # but not when building the interpreter DLL.
9118 CFLAGSFORSHARED='';;
9119 *)
9120 CFLAGSFORSHARED='$(CCSHARED)'
9121 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009122fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9124$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009125
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009126# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9127# library (with --enable-shared).
9128# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009129# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9130# if it is not required, since it creates a dependency of the shared library
9131# to LIBS. This, in turn, means that applications linking the shared libpython
9132# don't need to link LIBS explicitly. The default should be only changed
9133# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009134
Matthias Kloseb9621712010-04-24 17:59:49 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9136$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009137case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009138 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009139 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009140esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9142$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009143
9144
Guido van Rossum627b2d71993-12-24 10:39:16 +00009145# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9147$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009148if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009149 $as_echo_n "(cached) " >&6
9150else
9151 ac_check_lib_save_LIBS=$LIBS
9152LIBS="-lsendfile $LIBS"
9153cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9154/* end confdefs.h. */
9155
9156/* Override any GCC internal prototype to avoid an error.
9157 Use char because int might match the return type of a GCC
9158 builtin and then its argument prototype would still apply. */
9159#ifdef __cplusplus
9160extern "C"
9161#endif
9162char sendfile ();
9163int
9164main ()
9165{
9166return sendfile ();
9167 ;
9168 return 0;
9169}
9170_ACEOF
9171if ac_fn_c_try_link "$LINENO"; then :
9172 ac_cv_lib_sendfile_sendfile=yes
9173else
9174 ac_cv_lib_sendfile_sendfile=no
9175fi
9176rm -f core conftest.err conftest.$ac_objext \
9177 conftest$ac_exeext conftest.$ac_ext
9178LIBS=$ac_check_lib_save_LIBS
9179fi
9180{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9181$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009182if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009183 cat >>confdefs.h <<_ACEOF
9184#define HAVE_LIBSENDFILE 1
9185_ACEOF
9186
9187 LIBS="-lsendfile $LIBS"
9188
9189fi
9190
Matthias Kloseb9621712010-04-24 17:59:49 +00009191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9192$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009193if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009194 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009195else
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009197LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009198cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009199/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009200
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009201/* Override any GCC internal prototype to avoid an error.
9202 Use char because int might match the return type of a GCC
9203 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009204#ifdef __cplusplus
9205extern "C"
9206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009207char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009208int
9209main ()
9210{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009211return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 ;
9213 return 0;
9214}
9215_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009216if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009218else
Matthias Kloseb9621712010-04-24 17:59:49 +00009219 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009220fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009221rm -f core conftest.err conftest.$ac_objext \
9222 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009223LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9226$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009227if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009228 cat >>confdefs.h <<_ACEOF
9229#define HAVE_LIBDL 1
9230_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009231
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009232 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009233
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009234fi
9235 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9237$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009238if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009239 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009240else
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009242LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246/* Override any GCC internal prototype to avoid an error.
9247 Use char because int might match the return type of a GCC
9248 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009249#ifdef __cplusplus
9250extern "C"
9251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009252char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009253int
9254main ()
9255{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 ;
9258 return 0;
9259}
9260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009261if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009262 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009263else
Matthias Kloseb9621712010-04-24 17:59:49 +00009264 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009265fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009266rm -f core conftest.err conftest.$ac_objext \
9267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009268LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009269fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9271$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009272if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009273 cat >>confdefs.h <<_ACEOF
9274#define HAVE_LIBDLD 1
9275_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009276
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009277 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009278
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009279fi
9280 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009281
Georg Brandlb1441c72009-01-03 22:33:39 +00009282# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009283if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9285$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009286if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009287 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009288else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009289 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009290cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293/* Override any GCC internal prototype to avoid an error.
9294 Use char because int might match the return type of a GCC
9295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009296#ifdef __cplusplus
9297extern "C"
9298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009299char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009300int
9301main ()
9302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009303return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009304 ;
9305 return 0;
9306}
9307_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009308for ac_lib in '' pthread rt posix4; do
9309 if test -z "$ac_lib"; then
9310 ac_res="none required"
9311 else
9312 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009313 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009314 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009316 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009317fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009318rm -f core conftest.err conftest.$ac_objext \
9319 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009320 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009323done
Victor Stinnere0be4232011-10-25 13:06:09 +02009324if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009326else
9327 ac_cv_search_sem_init=no
9328fi
9329rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009330LIBS=$ac_func_search_save_LIBS
9331fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9333$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009334ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009335if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009336 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009337
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009338fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009339 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009340 # posix4 on Solaris 2.6
9341 # pthread (first!) on Linux
9342fi
9343
Martin v. Löwis19d17342003-06-14 21:03:05 +00009344# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9346$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009347if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009348 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009349else
9350 ac_check_lib_save_LIBS=$LIBS
9351LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009353/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009354
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355/* Override any GCC internal prototype to avoid an error.
9356 Use char because int might match the return type of a GCC
9357 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009358#ifdef __cplusplus
9359extern "C"
9360#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009361char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009362int
9363main ()
9364{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009365return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009366 ;
9367 return 0;
9368}
9369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009370if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009371 ac_cv_lib_intl_textdomain=yes
9372else
Matthias Kloseb9621712010-04-24 17:59:49 +00009373 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009374fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009375rm -f core conftest.err conftest.$ac_objext \
9376 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009377LIBS=$ac_check_lib_save_LIBS
9378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9380$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009381if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009382
Matthias Kloseb9621712010-04-24 17:59:49 +00009383$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009384
Brett Cannonc6d936e2009-06-07 20:09:53 +00009385 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009386fi
9387
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009388
9389# checks for system dependent C++ extensions support
9390case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009391 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9392$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009394/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009395
Georg Brandl59e87bd2011-02-15 19:48:59 +00009396 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009397int
9398main ()
9399{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009400loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009401 ;
9402 return 0;
9403}
Matthias Kloseb159a552010-04-25 21:00:44 +00009404
Martin v. Löwis11437992002-04-12 09:54:03 +00009405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009406if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009407
Matthias Kloseb159a552010-04-25 21:00:44 +00009408
Matthias Kloseb9621712010-04-24 17:59:49 +00009409$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009410
Matthias Kloseb159a552010-04-25 21:00:44 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009412$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009413
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009414else
Matthias Kloseb159a552010-04-25 21:00:44 +00009415
9416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009417$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009418
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009419fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009420rm -f core conftest.err conftest.$ac_objext \
9421 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009422 *) ;;
9423esac
9424
Christian Heimes985ecdc2013-11-20 11:46:18 +01009425# check for systems that require aligned memory access
9426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9427$as_echo_n "checking aligned memory access is required... " >&6; }
9428if test "$cross_compiling" = yes; then :
9429 aligned_required=yes
9430else
9431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9432/* end confdefs.h. */
9433
9434int main()
9435{
9436 char s[16];
9437 int i, *p1, *p2;
9438 for (i=0; i < 16; i++)
9439 s[i] = i;
9440 p1 = (int*)(s+1);
9441 p2 = (int*)(s+2);
9442 if (*p1 == *p2)
9443 return 1;
9444 return 0;
9445}
9446
9447_ACEOF
9448if ac_fn_c_try_run "$LINENO"; then :
9449 aligned_required=no
9450else
9451 aligned_required=yes
9452fi
9453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9454 conftest.$ac_objext conftest.beam conftest.$ac_ext
9455fi
9456
9457
9458if test "$aligned_required" = yes ; then
9459
9460$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9461
9462fi
9463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9464$as_echo "$aligned_required" >&6; }
9465
9466
9467# str, bytes and memoryview hash algorithm
9468
9469
9470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9471$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9472
9473# Check whether --with-hash_algorithm was given.
9474if test "${with_hash_algorithm+set}" = set; then :
9475 withval=$with_hash_algorithm;
9476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9477$as_echo "$withval" >&6; }
9478case "$withval" in
9479 siphash24)
9480 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9481
9482 ;;
9483 fnv)
9484 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9485
9486 ;;
9487 *)
9488 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9489 ;;
9490esac
9491
9492else
9493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9494$as_echo "default" >&6; }
9495fi
9496
9497
Charles-François Natalid30b0222014-05-08 23:08:51 +01009498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9499$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9500
9501# Check whether --with-address_sanitizer was given.
9502if test "${with_address_sanitizer+set}" = set; then :
9503 withval=$with_address_sanitizer;
9504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9505$as_echo "$withval" >&6; }
9506BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9507LDFLAGS="-fsanitize=address $LDFLAGS"
9508
9509else
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9511$as_echo "no" >&6; }
9512fi
9513
9514
Guido van Rossum70c7f481998-03-26 18:44:10 +00009515# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9517$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009518if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009520else
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009522LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526/* Override any GCC internal prototype to avoid an error.
9527 Use char because int might match the return type of a GCC
9528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009529#ifdef __cplusplus
9530extern "C"
9531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009532char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009533int
9534main ()
9535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 ;
9538 return 0;
9539}
9540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546rm -f core conftest.err conftest.$ac_objext \
9547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009548LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9551$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009552if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009553 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009554fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009555 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9557$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009558if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009559 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009560else
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009562LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009565
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009566/* Override any GCC internal prototype to avoid an error.
9567 Use char because int might match the return type of a GCC
9568 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009569#ifdef __cplusplus
9570extern "C"
9571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009572char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009573int
9574main ()
9575{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009577 ;
9578 return 0;
9579}
9580_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009581if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009582 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009583else
Matthias Kloseb9621712010-04-24 17:59:49 +00009584 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009586rm -f core conftest.err conftest.$ac_objext \
9587 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009588LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9591$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009592if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009593 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009594fi
9595 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009596
Matthias Kloseb9621712010-04-24 17:59:49 +00009597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9598$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009601if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009602 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9604$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009605LIBS="$withval $LIBS"
9606
9607else
Matthias Kloseb9621712010-04-24 17:59:49 +00009608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9609$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009610fi
9611
Guido van Rossum7f43da71994-08-01 12:15:30 +00009612
Victor Stinner8291b5e2015-03-20 16:03:14 +01009613
9614
9615
9616
9617
9618
9619
9620if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9621 if test -n "$ac_tool_prefix"; then
9622 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9623set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9625$as_echo_n "checking for $ac_word... " >&6; }
9626if ${ac_cv_path_PKG_CONFIG+:} false; then :
9627 $as_echo_n "(cached) " >&6
9628else
9629 case $PKG_CONFIG in
9630 [\\/]* | ?:[\\/]*)
9631 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9632 ;;
9633 *)
9634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9635for as_dir in $PATH
9636do
9637 IFS=$as_save_IFS
9638 test -z "$as_dir" && as_dir=.
9639 for ac_exec_ext in '' $ac_executable_extensions; do
9640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9641 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9643 break 2
9644 fi
9645done
9646 done
9647IFS=$as_save_IFS
9648
9649 ;;
9650esac
9651fi
9652PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9653if test -n "$PKG_CONFIG"; then
9654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9655$as_echo "$PKG_CONFIG" >&6; }
9656else
9657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9658$as_echo "no" >&6; }
9659fi
9660
9661
9662fi
9663if test -z "$ac_cv_path_PKG_CONFIG"; then
9664 ac_pt_PKG_CONFIG=$PKG_CONFIG
9665 # Extract the first word of "pkg-config", so it can be a program name with args.
9666set dummy pkg-config; ac_word=$2
9667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9668$as_echo_n "checking for $ac_word... " >&6; }
9669if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9670 $as_echo_n "(cached) " >&6
9671else
9672 case $ac_pt_PKG_CONFIG in
9673 [\\/]* | ?:[\\/]*)
9674 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9675 ;;
9676 *)
9677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9678for as_dir in $PATH
9679do
9680 IFS=$as_save_IFS
9681 test -z "$as_dir" && as_dir=.
9682 for ac_exec_ext in '' $ac_executable_extensions; do
9683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9684 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9686 break 2
9687 fi
9688done
9689 done
9690IFS=$as_save_IFS
9691
9692 ;;
9693esac
9694fi
9695ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9696if test -n "$ac_pt_PKG_CONFIG"; then
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9698$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9699else
9700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9701$as_echo "no" >&6; }
9702fi
9703
9704 if test "x$ac_pt_PKG_CONFIG" = x; then
9705 PKG_CONFIG=""
9706 else
9707 case $cross_compiling:$ac_tool_warned in
9708yes:)
9709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9711ac_tool_warned=yes ;;
9712esac
9713 PKG_CONFIG=$ac_pt_PKG_CONFIG
9714 fi
9715else
9716 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9717fi
9718
9719fi
9720if test -n "$PKG_CONFIG"; then
9721 _pkg_min_version=0.9.0
9722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9723$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9724 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9726$as_echo "yes" >&6; }
9727 else
9728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9729$as_echo "no" >&6; }
9730 PKG_CONFIG=""
9731 fi
9732fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009733
9734# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9736$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009737
9738# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009739if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009740 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009741else
9742 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009743fi
9744
9745
Matthias Kloseb9621712010-04-24 17:59:49 +00009746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9747$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009748
9749# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9751$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009752
9753# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009754if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009755 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009756else
9757 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009758fi
9759
9760
9761if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009762 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9763else
9764 LIBFFI_INCLUDEDIR=""
9765fi
9766
9767
Matthias Kloseb9621712010-04-24 17:59:49 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9769$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009770
Stefan Krah60187b52012-03-23 19:06:27 +01009771# Check for use of the system libmpdec library
9772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9773$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9774
9775# Check whether --with-system_libmpdec was given.
9776if test "${with_system_libmpdec+set}" = set; then :
9777 withval=$with_system_libmpdec;
9778else
9779 with_system_libmpdec="no"
9780fi
9781
9782
9783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9784$as_echo "$with_system_libmpdec" >&6; }
9785
Benjamin Peterson076ed002010-10-31 17:11:02 +00009786# Check for support for loadable sqlite extensions
9787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9788$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9789# Check whether --enable-loadable-sqlite-extensions was given.
9790if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9791 enableval=$enable_loadable_sqlite_extensions;
9792else
9793 enable_loadable_sqlite_extensions="no"
9794fi
9795
9796
9797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9798$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9799
Ned Deilyd819b932013-09-06 01:07:05 -07009800# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9801
9802
9803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9804$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9805
9806# Check whether --with-tcltk-includes was given.
9807if test "${with_tcltk_includes+set}" = set; then :
9808 withval=$with_tcltk_includes;
9809else
9810 with_tcltk_includes="default"
9811fi
9812
9813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9814$as_echo "$with_tcltk_includes" >&6; }
9815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9816$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9817
9818# Check whether --with-tcltk-libs was given.
9819if test "${with_tcltk_libs+set}" = set; then :
9820 withval=$with_tcltk_libs;
9821else
9822 with_tcltk_libs="default"
9823fi
9824
9825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9826$as_echo "$with_tcltk_libs" >&6; }
9827if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9828then
9829 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9830 then
9831 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9832 fi
9833 TCLTK_INCLUDES=""
9834 TCLTK_LIBS=""
9835else
9836 TCLTK_INCLUDES="$with_tcltk_includes"
9837 TCLTK_LIBS="$with_tcltk_libs"
9838fi
9839
Matthias Klose55708cc2009-04-30 08:06:49 +00009840# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9842$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009843
9844# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009845if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009846 withval=$with_dbmliborder;
9847if test x$with_dbmliborder = xyes
9848then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009849as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009850else
9851 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9852 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9853 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009854 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009855 fi
9856 done
9857fi
9858fi
9859
Matthias Kloseb9621712010-04-24 17:59:49 +00009860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9861$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009862
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009863# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009864
9865
Matthias Kloseb9621712010-04-24 17:59:49 +00009866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9867$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009870if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871 withval=$with_signal_module;
9872fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009873
9874
9875if test -z "$with_signal_module"
9876then with_signal_module="yes"
9877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9879$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009880
9881if test "${with_signal_module}" = "yes"; then
9882 USE_SIGNAL_MODULE=""
9883 SIGNAL_OBJS=""
9884else
9885 USE_SIGNAL_MODULE="#"
9886 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9887fi
9888
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009889# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009890
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009891USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893
Martin v. Löwis11437992002-04-12 09:54:03 +00009894
9895# Templates for things AC_DEFINEd more than once.
9896# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009897
9898
Martin v. Löwis11437992002-04-12 09:54:03 +00009899
Matthias Kloseb9621712010-04-24 17:59:49 +00009900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9901$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009904if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905 withval=$with_threads;
9906fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009907
9908
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009909# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009910
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009911# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009912if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913 withval=$with_thread; with_threads=$with_thread
9914fi
9915
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009916
9917if test -z "$with_threads"
9918then with_threads="yes"
9919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9921$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009922
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009923
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009924if test "$with_threads" = "no"
9925then
9926 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009927elif test "$ac_cv_pthread_is_default" = yes
9928then
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009930
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009931 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009932 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009933
9934 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009936elif test "$ac_cv_kpthread" = "yes"
9937then
9938 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009939 if test "$ac_cv_cxx_thread" = "yes"; then
9940 CXX="$CXX -Kpthread"
9941 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009942 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009943
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009944 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009945 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009946elif test "$ac_cv_kthread" = "yes"
9947then
9948 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009949 if test "$ac_cv_cxx_thread" = "yes"; then
9950 CXX="$CXX -Kthread"
9951 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009952 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009953
9954 posix_threads=yes
9955 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009956elif test "$ac_cv_pthread" = "yes"
9957then
9958 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009959 if test "$ac_cv_cxx_thread" = "yes"; then
9960 CXX="$CXX -pthread"
9961 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009962 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009963
9964 posix_threads=yes
9965 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009966else
9967 if test ! -z "$with_threads" -a -d "$with_threads"
9968 then LDFLAGS="$LDFLAGS -L$with_threads"
9969 fi
9970 if test ! -z "$withval" -a -d "$withval"
9971 then LDFLAGS="$LDFLAGS -L$withval"
9972 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009973
9974 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009975 # define _POSIX_THREADS in unistd.h. Some apparently don't
9976 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9978$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009980/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009981
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009982#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009983#ifdef _POSIX_THREADS
9984yes
9985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009986
9987_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009989 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009990 unistd_defines_pthreads=yes
9991else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009992 unistd_defines_pthreads=no
9993fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009994rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009995
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9997$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009998
Matthias Kloseb9621712010-04-24 17:59:49 +00009999 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010000
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010001 # Just looking for pthread_create in libpthread is not enough:
10002 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10003 # So we really have to include pthread.h, and then link.
10004 _libs=$LIBS
10005 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10007$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010009/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010010
10011#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010012#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010013
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010014void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010015int
10016main ()
10017{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010018
10019pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 ;
10021 return 0;
10022}
10023_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010024if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010025
Matthias Kloseb9621712010-04-24 17:59:49 +000010026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10027$as_echo "yes" >&6; }
10028 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010029
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010030 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010031 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010032else
Martin v. Löwis11437992002-04-12 09:54:03 +000010033
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010034 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010035 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010036if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010037 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010038
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010039 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010040 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010041else
Guido van Rossumad678af1998-10-02 14:42:15 +000010042
Matthias Kloseb9621712010-04-24 17:59:49 +000010043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10044$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010045if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010046 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010047else
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010049LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010053/* Override any GCC internal prototype to avoid an error.
10054 Use char because int might match the return type of a GCC
10055 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010056#ifdef __cplusplus
10057extern "C"
10058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010059char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010060int
10061main ()
10062{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ;
10065 return 0;
10066}
10067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010068if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010069 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010070else
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010073rm -f core conftest.err conftest.$ac_objext \
10074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010075LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10078$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010079if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010080 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010081
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010082 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010083 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010084 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010085else
Greg Steinadf63d62000-07-05 10:38:09 +000010086
Matthias Kloseb9621712010-04-24 17:59:49 +000010087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10088$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010089if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010090 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010091else
Martin v. Löwis11437992002-04-12 09:54:03 +000010092 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010093LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010095/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010097/* Override any GCC internal prototype to avoid an error.
10098 Use char because int might match the return type of a GCC
10099 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010100#ifdef __cplusplus
10101extern "C"
10102#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010103char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010104int
10105main ()
10106{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010108 ;
10109 return 0;
10110}
10111_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010112if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010113 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010114else
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010116fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010117rm -f core conftest.err conftest.$ac_objext \
10118 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010119LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010120fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10122$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010123if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010124 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010125
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010126 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010127 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010128 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010129else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010130
Matthias Kloseb9621712010-04-24 17:59:49 +000010131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10132$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010133if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010134 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010135else
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010137LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010141/* Override any GCC internal prototype to avoid an error.
10142 Use char because int might match the return type of a GCC
10143 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010144#ifdef __cplusplus
10145extern "C"
10146#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010147char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010148int
10149main ()
10150{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ;
10153 return 0;
10154}
10155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010156if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010157 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010158else
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010160fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010161rm -f core conftest.err conftest.$ac_objext \
10162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010163LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010164fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10166$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010167if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010168 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010170 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010171 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010172 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010173else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10176$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010177if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010178 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010179else
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010181LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010183/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185/* Override any GCC internal prototype to avoid an error.
10186 Use char because int might match the return type of a GCC
10187 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010188#ifdef __cplusplus
10189extern "C"
10190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010191char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010192int
10193main ()
10194{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010195return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 ;
10197 return 0;
10198}
10199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010200if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010202else
Matthias Kloseb9621712010-04-24 17:59:49 +000010203 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010205rm -f core conftest.err conftest.$ac_objext \
10206 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010207LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10210$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010211if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010212 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010213
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010214 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010215 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010216 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010217else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010218
Martin v. Löwis130fb172001-07-19 11:00:41 +000010219 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010220fi
10221
Guido van Rossum627b2d71993-12-24 10:39:16 +000010222
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010223fi
10224
Guido van Rossum0be3e491997-05-22 20:33:33 +000010225fi
10226
Guido van Rossum49545951997-12-02 19:28:29 +000010227fi
10228
Guido van Rossumb93a8621998-05-07 13:27:32 +000010229fi
10230
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010232rm -f core conftest.err conftest.$ac_objext \
10233 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010234
Matthias Kloseb9621712010-04-24 17:59:49 +000010235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10236$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010237if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010238 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010239else
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010241LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010244
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245/* Override any GCC internal prototype to avoid an error.
10246 Use char because int might match the return type of a GCC
10247 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248#ifdef __cplusplus
10249extern "C"
10250#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010251char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010252int
10253main ()
10254{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010256 ;
10257 return 0;
10258}
10259_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010260if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010262else
Matthias Kloseb9621712010-04-24 17:59:49 +000010263 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010264fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010265rm -f core conftest.err conftest.$ac_objext \
10266 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010267LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010268fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10270$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010271if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010272 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010273
Martin v. Löwis130fb172001-07-19 11:00:41 +000010274 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010275 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010276 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010277fi
10278
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010279
Neal Norwitza978ab02002-11-02 16:58:05 +000010280 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10282$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010283if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010284 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010285else
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010287LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010291/* Override any GCC internal prototype to avoid an error.
10292 Use char because int might match the return type of a GCC
10293 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010294#ifdef __cplusplus
10295extern "C"
10296#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010297char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010298int
10299main ()
10300{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010301return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010302 ;
10303 return 0;
10304}
10305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010306if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010308else
Matthias Kloseb9621712010-04-24 17:59:49 +000010309 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010310fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010311rm -f core conftest.err conftest.$ac_objext \
10312 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010313LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10316$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010317if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010318 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010319
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010320 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010321 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010322 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010323fi
10324
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010325 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010326fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010327
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010328if test "$posix_threads" = "yes"; then
10329 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010330
Matthias Kloseb9621712010-04-24 17:59:49 +000010331$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010332
10333 fi
10334
10335 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10336 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010337 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010338$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010339
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010340 ;;
10341 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010342$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010343
10344 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010345 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010346$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010347
10348 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010349 esac
10350
Matthias Kloseb9621712010-04-24 17:59:49 +000010351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10352$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010353 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010354 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010355else
Matthias Kloseb9621712010-04-24 17:59:49 +000010356 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010357 ac_cv_pthread_system_supported=no
10358else
Matthias Kloseb9621712010-04-24 17:59:49 +000010359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010360/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010361
10362 #include <stdio.h>
10363 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010364 void *foo(void *parm) {
10365 return NULL;
10366 }
10367 main() {
10368 pthread_attr_t attr;
10369 pthread_t id;
10370 if (pthread_attr_init(&attr)) exit(-1);
10371 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10372 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10373 exit(0);
10374 }
10375_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010376if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010377 ac_cv_pthread_system_supported=yes
10378else
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010380fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010381rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10382 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010383fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010385
Guido van Rossum627b2d71993-12-24 10:39:16 +000010386fi
10387
Matthias Kloseb9621712010-04-24 17:59:49 +000010388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10389$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010390 if test "$ac_cv_pthread_system_supported" = "yes"; then
10391
Matthias Kloseb9621712010-04-24 17:59:49 +000010392$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010393
10394 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 for ac_func in pthread_sigmask
10396do :
10397 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010398if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010399 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010400#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010401_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010402 case $ac_sys_system in
10403 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010404
Matthias Kloseb9621712010-04-24 17:59:49 +000010405$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010406
10407 ;;
10408 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010409fi
10410done
10411
Christian Heimesf77b4b22013-08-21 13:26:05 +020010412 for ac_func in pthread_atfork
10413do :
10414 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10415if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10416 cat >>confdefs.h <<_ACEOF
10417#define HAVE_PTHREAD_ATFORK 1
10418_ACEOF
10419
10420fi
10421done
10422
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010423fi
10424
10425
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010426# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010427
Matthias Kloseb9621712010-04-24 17:59:49 +000010428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10429$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010431if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010433 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10435$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010436 ipv6=no
10437 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010438 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10439$as_echo "yes" >&6; }
10440 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010441
10442 ipv6=yes
10443 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010444 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010445else
Martin v. Löwis11437992002-04-12 09:54:03 +000010446
Matthias Kloseb9621712010-04-24 17:59:49 +000010447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010448/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010449 /* AF_INET6 available check */
10450#include <sys/types.h>
10451#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010452int
10453main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010454{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010455int domain = AF_INET6;
10456 ;
10457 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010458}
Martin v. Löwis11437992002-04-12 09:54:03 +000010459_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010460if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10463$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010464 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010465
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010466else
Matthias Kloseb159a552010-04-25 21:00:44 +000010467
Matthias Kloseb9621712010-04-24 17:59:49 +000010468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10469$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010470 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010471
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010472fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010475if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10477$as_echo_n "checking if RFC2553 API is available... " >&6; }
10478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010479/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010480
10481 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010482#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010483int
10484main ()
10485{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010486struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010487 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010488 ;
10489 return 0;
10490}
Matthias Kloseb159a552010-04-25 21:00:44 +000010491
Martin v. Löwis11437992002-04-12 09:54:03 +000010492_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010493if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010494
10495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010496$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010497 ipv6=yes
10498
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010499else
Matthias Kloseb159a552010-04-25 21:00:44 +000010500
10501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010502$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010503 ipv6=no
10504
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010505fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010507fi
10508
10509if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010510 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010511
10512fi
10513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010514fi
10515
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010516
10517ipv6type=unknown
10518ipv6lib=none
10519ipv6trylibc=no
10520
10521if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10523$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010524 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10525 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010526 case $i in
10527 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010529/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010530
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010531#include <netinet/in.h>
10532#ifdef IPV6_INRIA_VERSION
10533yes
10534#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010535_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010537 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010538 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010539fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010540rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010541
10542 ;;
10543 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010545/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010546
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010547#include <netinet/in.h>
10548#ifdef __KAME__
10549yes
10550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010551_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010552if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010554 ipv6type=$i;
10555 ipv6lib=inet6
10556 ipv6libdir=/usr/local/v6/lib
10557 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010558fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010559rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010560
10561 ;;
10562 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010564/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010565
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010566#include <features.h>
10567#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10568yes
10569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010570_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010572 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010573 ipv6type=$i;
10574 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010575fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010576rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010577
10578 ;;
10579 linux-inet6)
10580 if test -d /usr/inet6; then
10581 ipv6type=$i
10582 ipv6lib=inet6
10583 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010584 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010585 fi
10586 ;;
10587 solaris)
10588 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010589 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010590 ipv6type=$i
10591 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010592 fi
10593 fi
10594 ;;
10595 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010597/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010598
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010599#include <sys/param.h>
10600#ifdef _TOSHIBA_INET6
10601yes
10602#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010603_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010604if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010605 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010606 ipv6type=$i;
10607 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010608 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010609fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010610rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010611
10612 ;;
10613 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010614 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010615/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010616
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010617#include </usr/local/v6/include/sys/v6config.h>
10618#ifdef __V6D__
10619yes
10620#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010621_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010623 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010624 ipv6type=$i;
10625 ipv6lib=v6;
10626 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010627 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010628fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010629rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010630
10631 ;;
10632 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010634/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010635
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010636#include <sys/param.h>
10637#ifdef _ZETA_MINAMI_INET6
10638yes
10639#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010640_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010641if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010642 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010643 ipv6type=$i;
10644 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010645 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010646fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010647rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010648
10649 ;;
10650 esac
10651 if test "$ipv6type" != "unknown"; then
10652 break
10653 fi
10654 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10656$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010657fi
10658
10659if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10660 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10661 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10662 echo "using lib$ipv6lib"
10663 else
10664 if test $ipv6trylibc = "yes"; then
10665 echo "using libc"
10666 else
10667 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10668 echo "You need to fetch lib$ipv6lib.a from appropriate"
10669 echo 'ipv6 kit and compile beforehand.'
10670 exit 1
10671 fi
10672 fi
10673fi
10674
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10676$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10678/* end confdefs.h. */
10679 /* CAN_RAW_FD_FRAMES available check */
10680#include <linux/can/raw.h>
10681int
10682main ()
10683{
10684int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10685 ;
10686 return 0;
10687}
10688_ACEOF
10689if ac_fn_c_try_compile "$LINENO"; then :
10690
10691
10692$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10693
10694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10695$as_echo "yes" >&6; }
10696
10697else
10698
10699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10700$as_echo "no" >&6; }
10701
10702fi
10703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10704
Matthias Kloseb9621712010-04-24 17:59:49 +000010705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10706$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010708/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010709
10710 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010711int
10712main ()
10713{
10714FSIORefNum fRef = 0
10715 ;
10716 return 0;
10717}
Matthias Kloseb159a552010-04-25 21:00:44 +000010718
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010719_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010720if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010721
Matthias Kloseb159a552010-04-25 21:00:44 +000010722
Matthias Kloseb9621712010-04-24 17:59:49 +000010723$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010724
Matthias Kloseb9621712010-04-24 17:59:49 +000010725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10726$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010727
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010728else
Matthias Kloseb159a552010-04-25 21:00:44 +000010729
Matthias Kloseb9621712010-04-24 17:59:49 +000010730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10731$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010732
10733fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10735
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010736# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10738$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010741if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742 withval=$with_doc_strings;
10743fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010744
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010745
10746if test -z "$with_doc_strings"
10747then with_doc_strings="yes"
10748fi
10749if test "$with_doc_strings" != "no"
10750then
10751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010753
10754fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10756$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010757
Antoine Pitrou042b1282010-08-13 21:15:58 +000010758# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10760$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010763if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010764 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010765if test "$withval" != no
10766then
10767
Matthias Kloseb9621712010-04-24 17:59:49 +000010768$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010769
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10771$as_echo "yes" >&6; }
10772else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10773$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010774fi
10775else
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10777$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010778fi
10779
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010780
10781# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10783$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010784
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010786if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010787 withval=$with_pymalloc;
10788fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010789
Neil Schemenauera35c6882001-02-27 04:45:05 +000010790
Neil Schemenauer16c22972002-03-22 15:34:49 +000010791if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010792then
10793 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010794fi
10795if test "$with_pymalloc" != "no"
10796then
Martin v. Löwis11437992002-04-12 09:54:03 +000010797
Matthias Kloseb9621712010-04-24 17:59:49 +000010798$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010799
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010800 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010801fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10803$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010804
Benjamin Peterson05159c42009-12-03 03:01:27 +000010805# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10807$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010808
10809# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010810if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010811 withval=$with_valgrind;
10812else
10813 with_valgrind=no
10814fi
10815
Matthias Kloseb9621712010-04-24 17:59:49 +000010816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10817$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010818if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 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 +020010820if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010821
Matthias Kloseb9621712010-04-24 17:59:49 +000010822$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010823
10824else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010825 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010826
10827fi
10828
10829
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010830 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010831fi
10832
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010833# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010834
Guido van Rossum98935bf2001-09-05 19:13:16 +000010835DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010836
Guido van Rossume97ee181999-12-20 21:27:22 +000010837# the dlopen() function means we might want to use dynload_shlib.o. some
10838# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010839for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010840do :
10841 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010842if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010843 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010844#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010845_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010846
Guido van Rossume97ee181999-12-20 21:27:22 +000010847fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010848done
Guido van Rossume97ee181999-12-20 21:27:22 +000010849
Michael W. Hudson54241132001-12-07 15:38:26 +000010850
Guido van Rossume97ee181999-12-20 21:27:22 +000010851# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10852# loading of modules.
10853
Matthias Kloseb9621712010-04-24 17:59:49 +000010854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10855$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010856if test -z "$DYNLOADFILE"
10857then
10858 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010859 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10860 if test "$ac_cv_func_dlopen" = yes
10861 then DYNLOADFILE="dynload_shlib.o"
10862 else DYNLOADFILE="dynload_aix.o"
10863 fi
10864 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010865 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010866 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10867 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010868 *)
10869 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10870 # out any dynamic loading
10871 if test "$ac_cv_func_dlopen" = yes
10872 then DYNLOADFILE="dynload_shlib.o"
10873 else DYNLOADFILE="dynload_stub.o"
10874 fi
10875 ;;
10876 esac
10877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10879$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010880if test "$DYNLOADFILE" != "dynload_stub.o"
10881then
Martin v. Löwis11437992002-04-12 09:54:03 +000010882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010884
10885fi
10886
Neil Schemenauer4e425612001-06-19 15:44:15 +000010887# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10888
Michael W. Hudson54241132001-12-07 15:38:26 +000010889
Matthias Kloseb9621712010-04-24 17:59:49 +000010890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10891$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010892if test -z "$MACHDEP_OBJS"
10893then
Jack Jansene578a632001-08-15 01:27:14 +000010894 MACHDEP_OBJS=$extra_machdep_objs
10895else
10896 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010897fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010898if test -z "$MACHDEP_OBJS"; then
10899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10900$as_echo "none" >&6; }
10901else
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10903$as_echo "$MACHDEP_OBJS" >&6; }
10904fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010905
Guido van Rossum627b2d71993-12-24 10:39:16 +000010906# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010907for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010908 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010909 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010910 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010911 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010912 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010913 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010914 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10915 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010916 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010917 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010918 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010919 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010920 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010921 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010922 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10923 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010924 sigaction sigaltstack siginterrupt sigpending sigrelse \
10925 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010926 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010927 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010928 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010929do :
10930 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10931ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010932if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010933 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010934#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010935_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010936
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010937fi
10938done
10939
Michael W. Hudson54241132001-12-07 15:38:26 +000010940
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010941ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10942 #include <dirent.h>
10943"
10944if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10945
10946$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10947
10948fi
10949
10950
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010951# For some functions, having a definition is not sufficient, since
10952# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10954$as_echo_n "checking for chroot... " >&6; }
10955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010956/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010957#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010958int
10959main ()
10960{
10961void *x=chroot
10962 ;
10963 return 0;
10964}
10965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010966if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010967
Matthias Kloseb9621712010-04-24 17:59:49 +000010968$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010969
Matthias Kloseb159a552010-04-25 21:00:44 +000010970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010971$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010972else
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10974$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010975
10976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10979$as_echo_n "checking for link... " >&6; }
10980cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010981/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010982#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010983int
10984main ()
10985{
10986void *x=link
10987 ;
10988 return 0;
10989}
10990_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010991if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010992
Matthias Kloseb9621712010-04-24 17:59:49 +000010993$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010994
Matthias Kloseb159a552010-04-25 21:00:44 +000010995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010996$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010997else
Matthias Kloseb9621712010-04-24 17:59:49 +000010998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10999$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011000
11001fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11004$as_echo_n "checking for symlink... " >&6; }
11005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011006/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011007#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011008int
11009main ()
11010{
11011void *x=symlink
11012 ;
11013 return 0;
11014}
11015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011016if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011017
Matthias Kloseb9621712010-04-24 17:59:49 +000011018$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011019
Matthias Kloseb159a552010-04-25 21:00:44 +000011020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011021$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011022else
Matthias Kloseb9621712010-04-24 17:59:49 +000011023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11024$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011025
11026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11029$as_echo_n "checking for fchdir... " >&6; }
11030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011031/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011032#include <unistd.h>
11033int
11034main ()
11035{
11036void *x=fchdir
11037 ;
11038 return 0;
11039}
11040_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011041if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011042
Matthias Kloseb9621712010-04-24 17:59:49 +000011043$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011044
Matthias Kloseb159a552010-04-25 21:00:44 +000011045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011046$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011047else
Matthias Kloseb9621712010-04-24 17:59:49 +000011048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11049$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011050
11051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11054$as_echo_n "checking for fsync... " >&6; }
11055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011056/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011057#include <unistd.h>
11058int
11059main ()
11060{
11061void *x=fsync
11062 ;
11063 return 0;
11064}
11065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011066if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011067
Matthias Kloseb9621712010-04-24 17:59:49 +000011068$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011069
Matthias Kloseb159a552010-04-25 21:00:44 +000011070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011071$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011072else
Matthias Kloseb9621712010-04-24 17:59:49 +000011073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11074$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011075
11076fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11079$as_echo_n "checking for fdatasync... " >&6; }
11080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011081/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011082#include <unistd.h>
11083int
11084main ()
11085{
11086void *x=fdatasync
11087 ;
11088 return 0;
11089}
11090_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011091if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011092
Matthias Kloseb9621712010-04-24 17:59:49 +000011093$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011094
Matthias Kloseb159a552010-04-25 21:00:44 +000011095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011096$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011097else
Matthias Kloseb9621712010-04-24 17:59:49 +000011098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11099$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011100
11101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11104$as_echo_n "checking for epoll... " >&6; }
11105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011106/* end confdefs.h. */
11107#include <sys/epoll.h>
11108int
11109main ()
11110{
11111void *x=epoll_create
11112 ;
11113 return 0;
11114}
11115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011116if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011117
Matthias Kloseb9621712010-04-24 17:59:49 +000011118$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011119
Matthias Kloseb159a552010-04-25 21:00:44 +000011120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011121$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011122else
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011125
11126fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11129$as_echo_n "checking for epoll_create1... " >&6; }
11130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11131/* end confdefs.h. */
11132#include <sys/epoll.h>
11133int
11134main ()
11135{
11136void *x=epoll_create1
11137 ;
11138 return 0;
11139}
11140_ACEOF
11141if ac_fn_c_try_compile "$LINENO"; then :
11142
11143$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11144
11145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11146$as_echo "yes" >&6; }
11147else
11148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11149$as_echo "no" >&6; }
11150
11151fi
11152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11154$as_echo_n "checking for kqueue... " >&6; }
11155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011156/* end confdefs.h. */
11157
11158#include <sys/types.h>
11159#include <sys/event.h>
11160
11161int
11162main ()
11163{
11164int x=kqueue()
11165 ;
11166 return 0;
11167}
11168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011169if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011170
Matthias Kloseb9621712010-04-24 17:59:49 +000011171$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +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; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011175else
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11177$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011178
11179fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11182$as_echo_n "checking for prlimit... " >&6; }
11183cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11184/* end confdefs.h. */
11185
11186#include <sys/time.h>
11187#include <sys/resource.h>
11188
11189int
11190main ()
11191{
11192void *x=prlimit
11193 ;
11194 return 0;
11195}
11196_ACEOF
11197if ac_fn_c_try_compile "$LINENO"; then :
11198
11199$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11200
11201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11202$as_echo "yes" >&6; }
11203else
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11205$as_echo "no" >&6; }
11206
11207fi
11208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11209
Martin v. Löwisd5843682002-11-21 20:41:28 +000011210# On some systems (eg. FreeBSD 5), we would find a definition of the
11211# functions ctermid_r, setgroups in the library, but no prototype
11212# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11213# address to avoid compiler warnings and potential miscompilations
11214# because of the missing prototypes.
11215
Matthias Kloseb9621712010-04-24 17:59:49 +000011216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11217$as_echo_n "checking for ctermid_r... " >&6; }
11218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011219/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011220
Martin v. Löwisd5843682002-11-21 20:41:28 +000011221#include <stdio.h>
11222
Martin v. Löwisd5843682002-11-21 20:41:28 +000011223int
11224main ()
11225{
11226void* p = ctermid_r
11227 ;
11228 return 0;
11229}
11230_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011231if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011232
Matthias Kloseb9621712010-04-24 17:59:49 +000011233$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011234
Matthias Kloseb159a552010-04-25 21:00:44 +000011235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011236$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011237else
Matthias Kloseb9621712010-04-24 17:59:49 +000011238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011240
11241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11243
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11245$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011246if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011247 $as_echo_n "(cached) " >&6
11248else
11249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011250/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011251#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011252int
11253main ()
11254{
11255void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011256
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011257 ;
11258 return 0;
11259}
11260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011261if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011262 ac_cv_flock_decl=yes
11263else
11264 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011265
11266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011268
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011269fi
11270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11271$as_echo "$ac_cv_flock_decl" >&6; }
11272if test "x${ac_cv_flock_decl}" = xyes; then
11273 for ac_func in flock
11274do :
11275 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011276if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011277 cat >>confdefs.h <<_ACEOF
11278#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011279_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011280
Antoine Pitroua3000072010-09-07 14:52:42 +000011281else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011283$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011284if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011285 $as_echo_n "(cached) " >&6
11286else
11287 ac_check_lib_save_LIBS=$LIBS
11288LIBS="-lbsd $LIBS"
11289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11290/* end confdefs.h. */
11291
11292/* Override any GCC internal prototype to avoid an error.
11293 Use char because int might match the return type of a GCC
11294 builtin and then its argument prototype would still apply. */
11295#ifdef __cplusplus
11296extern "C"
11297#endif
11298char flock ();
11299int
11300main ()
11301{
11302return flock ();
11303 ;
11304 return 0;
11305}
11306_ACEOF
11307if ac_fn_c_try_link "$LINENO"; then :
11308 ac_cv_lib_bsd_flock=yes
11309else
11310 ac_cv_lib_bsd_flock=no
11311fi
11312rm -f core conftest.err conftest.$ac_objext \
11313 conftest$ac_exeext conftest.$ac_ext
11314LIBS=$ac_check_lib_save_LIBS
11315fi
11316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11317$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011318if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011319 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011320
11321
11322$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11323
11324
11325fi
11326
11327
11328fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011329done
11330
Antoine Pitroua3000072010-09-07 14:52:42 +000011331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332
Matthias Kloseb9621712010-04-24 17:59:49 +000011333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11334$as_echo_n "checking for getpagesize... " >&6; }
11335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011336/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011337
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011338#include <unistd.h>
11339
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011340int
11341main ()
11342{
11343void* p = getpagesize
11344 ;
11345 return 0;
11346}
11347_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011348if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011349
Matthias Kloseb9621712010-04-24 17:59:49 +000011350$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011351
Matthias Kloseb159a552010-04-25 21:00:44 +000011352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011353$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011354else
Matthias Kloseb9621712010-04-24 17:59:49 +000011355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011357
11358fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011360
Victor Stinner984890f2011-11-24 13:53:38 +010011361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11362$as_echo_n "checking for broken unsetenv... " >&6; }
11363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11364/* end confdefs.h. */
11365
11366#include <stdlib.h>
11367
11368int
11369main ()
11370{
11371int res = unsetenv("DUMMY")
11372 ;
11373 return 0;
11374}
11375_ACEOF
11376if ac_fn_c_try_compile "$LINENO"; then :
11377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11378$as_echo "no" >&6; }
11379else
11380
11381$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11382
11383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11384$as_echo "yes" >&6; }
11385
11386fi
11387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11388
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011389for ac_prog in true
11390do
11391 # Extract the first word of "$ac_prog", so it can be a program name with args.
11392set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11394$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011395if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011397else
11398 if test -n "$TRUE"; then
11399 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11400else
11401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11402for as_dir in $PATH
11403do
11404 IFS=$as_save_IFS
11405 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011406 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011407 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011408 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011409 $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 +000011410 break 2
11411 fi
11412done
Matthias Kloseb9621712010-04-24 17:59:49 +000011413 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011414IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011415
11416fi
11417fi
11418TRUE=$ac_cv_prog_TRUE
11419if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11421$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011422else
Matthias Kloseb9621712010-04-24 17:59:49 +000011423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11424$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011425fi
11426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011428 test -n "$TRUE" && break
11429done
11430test -n "$TRUE" || TRUE="/bin/true"
11431
11432
Matthias Kloseb9621712010-04-24 17:59:49 +000011433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11434$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011435if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011436 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011437else
11438 ac_check_lib_save_LIBS=$LIBS
11439LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011441/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011443/* Override any GCC internal prototype to avoid an error.
11444 Use char because int might match the return type of a GCC
11445 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011446#ifdef __cplusplus
11447extern "C"
11448#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011449char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011450int
11451main ()
11452{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011453return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011454 ;
11455 return 0;
11456}
11457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011458if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011459 ac_cv_lib_c_inet_aton=yes
11460else
Matthias Kloseb9621712010-04-24 17:59:49 +000011461 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011462fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011463rm -f core conftest.err conftest.$ac_objext \
11464 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011465LIBS=$ac_check_lib_save_LIBS
11466fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11468$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011469if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011470 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011471else
Matthias Kloseb9621712010-04-24 17:59:49 +000011472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11473$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011474if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011475 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011476else
11477 ac_check_lib_save_LIBS=$LIBS
11478LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011482/* Override any GCC internal prototype to avoid an error.
11483 Use char because int might match the return type of a GCC
11484 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011485#ifdef __cplusplus
11486extern "C"
11487#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011488char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011489int
11490main ()
11491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011492return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011493 ;
11494 return 0;
11495}
11496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011497if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011498 ac_cv_lib_resolv_inet_aton=yes
11499else
Matthias Kloseb9621712010-04-24 17:59:49 +000011500 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011501fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011502rm -f core conftest.err conftest.$ac_objext \
11503 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011504LIBS=$ac_check_lib_save_LIBS
11505fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11507$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011508if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011509 cat >>confdefs.h <<_ACEOF
11510#define HAVE_LIBRESOLV 1
11511_ACEOF
11512
11513 LIBS="-lresolv $LIBS"
11514
11515fi
11516
11517
11518fi
11519
11520
Christian Heimesd0764e22007-12-04 15:00:33 +000011521# On Tru64, chflags seems to be present, but calling it will
11522# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11524$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011525if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011526 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011527else
Matthias Kloseb9621712010-04-24 17:59:49 +000011528 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011529 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011530else
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011532/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011533
Christian Heimesd0764e22007-12-04 15:00:33 +000011534#include <sys/stat.h>
11535#include <unistd.h>
11536int main(int argc, char*argv[])
11537{
11538 if(chflags(argv[0], 0) != 0)
11539 return 1;
11540 return 0;
11541}
Ned Deily3eb67d52011-06-28 00:00:28 -070011542
Christian Heimesd0764e22007-12-04 15:00:33 +000011543_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011544if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011545 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011546else
Matthias Kloseb9621712010-04-24 17:59:49 +000011547 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011548fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011549rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11550 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011551fi
11552
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011553
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011554fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11556$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011557if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011558 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011559if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011560 ac_cv_have_chflags="yes"
11561else
11562 ac_cv_have_chflags="no"
11563fi
11564
11565fi
11566if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011569
11570fi
11571
Matthias Kloseb9621712010-04-24 17:59:49 +000011572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11573$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011574if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011575 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011576else
Matthias Kloseb9621712010-04-24 17:59:49 +000011577 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011578 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011579else
Matthias Kloseb9621712010-04-24 17:59:49 +000011580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011581/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011582
Christian Heimesd0764e22007-12-04 15:00:33 +000011583#include <sys/stat.h>
11584#include <unistd.h>
11585int main(int argc, char*argv[])
11586{
11587 if(lchflags(argv[0], 0) != 0)
11588 return 1;
11589 return 0;
11590}
Ned Deily3eb67d52011-06-28 00:00:28 -070011591
Christian Heimesd0764e22007-12-04 15:00:33 +000011592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011593if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011594 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011595else
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011597fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11599 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011600fi
11601
11602
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11605$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011606if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011607 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011608if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011609 ac_cv_have_lchflags="yes"
11610else
11611 ac_cv_have_lchflags="no"
11612fi
11613
11614fi
11615if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011616
Matthias Kloseb9621712010-04-24 17:59:49 +000011617$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011618
11619fi
11620
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011621case $ac_sys_system/$ac_sys_release in
11622Darwin/*)
11623 _CUR_CFLAGS="${CFLAGS}"
11624 _CUR_LDFLAGS="${LDFLAGS}"
11625 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11626 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11627 ;;
11628esac
11629
Matthias Kloseb9621712010-04-24 17:59:49 +000011630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11631$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011632if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011633 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011634else
11635 ac_check_lib_save_LIBS=$LIBS
11636LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011638/* end confdefs.h. */
11639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011640/* Override any GCC internal prototype to avoid an error.
11641 Use char because int might match the return type of a GCC
11642 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011643#ifdef __cplusplus
11644extern "C"
11645#endif
11646char inflateCopy ();
11647int
11648main ()
11649{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011650return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011651 ;
11652 return 0;
11653}
11654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011655if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011656 ac_cv_lib_z_inflateCopy=yes
11657else
Matthias Kloseb9621712010-04-24 17:59:49 +000011658 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011659fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011660rm -f core conftest.err conftest.$ac_objext \
11661 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011662LIBS=$ac_check_lib_save_LIBS
11663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11665$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011666if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011667
Matthias Kloseb9621712010-04-24 17:59:49 +000011668$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011669
11670fi
11671
11672
11673case $ac_sys_system/$ac_sys_release in
11674Darwin/*)
11675 CFLAGS="${_CUR_CFLAGS}"
11676 LDFLAGS="${_CUR_LDFLAGS}"
11677 ;;
11678esac
11679
Matthias Kloseb9621712010-04-24 17:59:49 +000011680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11681$as_echo_n "checking for hstrerror... " >&6; }
11682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011683/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011684
Martin v. Löwise9416172003-05-03 10:12:45 +000011685#include <netdb.h>
11686
Martin v. Löwise9416172003-05-03 10:12:45 +000011687int
11688main ()
11689{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011690void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011691 ;
11692 return 0;
11693}
11694_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011695if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011696
Matthias Kloseb9621712010-04-24 17:59:49 +000011697$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011698
Matthias Kloseb159a552010-04-25 21:00:44 +000011699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011700$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011701else
Matthias Kloseb9621712010-04-24 17:59:49 +000011702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11703$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011704
11705fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011706rm -f core conftest.err conftest.$ac_objext \
11707 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011708
Matthias Kloseb9621712010-04-24 17:59:49 +000011709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11710$as_echo_n "checking for inet_aton... " >&6; }
11711cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011712/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011713
Martin v. Löwis86d66262006-02-17 08:40:11 +000011714#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011715#include <sys/socket.h>
11716#include <netinet/in.h>
11717#include <arpa/inet.h>
11718
Martin v. Löwise9416172003-05-03 10:12:45 +000011719int
11720main ()
11721{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011722void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011723 ;
11724 return 0;
11725}
11726_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011727if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011728
Matthias Kloseb9621712010-04-24 17:59:49 +000011729$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011730
Matthias Kloseb159a552010-04-25 21:00:44 +000011731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011732$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011733else
Matthias Kloseb9621712010-04-24 17:59:49 +000011734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11735$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011736
11737fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011738rm -f core conftest.err conftest.$ac_objext \
11739 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011740
Matthias Kloseb9621712010-04-24 17:59:49 +000011741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11742$as_echo_n "checking for inet_pton... " >&6; }
11743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011744/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011745
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011746#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011747#include <sys/socket.h>
11748#include <netinet/in.h>
11749#include <arpa/inet.h>
11750
Martin v. Löwise9416172003-05-03 10:12:45 +000011751int
11752main ()
11753{
11754void* p = inet_pton
11755 ;
11756 return 0;
11757}
11758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011759if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011760
Matthias Kloseb9621712010-04-24 17:59:49 +000011761$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011762
Matthias Kloseb159a552010-04-25 21:00:44 +000011763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011764$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011765else
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11767$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011768
11769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011771
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011772# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11774$as_echo_n "checking for setgroups... " >&6; }
11775cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011776/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011777
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011778#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011779#ifdef HAVE_GRP_H
11780#include <grp.h>
11781#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011782
Martin v. Löwisd5843682002-11-21 20:41:28 +000011783int
11784main ()
11785{
11786void* p = setgroups
11787 ;
11788 return 0;
11789}
11790_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011791if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011792
Matthias Kloseb9621712010-04-24 17:59:49 +000011793$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011794
Matthias Kloseb159a552010-04-25 21:00:44 +000011795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011796$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011797else
Matthias Kloseb9621712010-04-24 17:59:49 +000011798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11799$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011800
11801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011803
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011804# check for openpty and forkpty
11805
11806for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011807do :
11808 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011809if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011810 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011811#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011812_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011813
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011814else
Matthias Kloseb9621712010-04-24 17:59:49 +000011815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11816$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011817if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011818 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011819else
Martin v. Löwis11437992002-04-12 09:54:03 +000011820 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011821LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011823/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011825/* Override any GCC internal prototype to avoid an error.
11826 Use char because int might match the return type of a GCC
11827 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011828#ifdef __cplusplus
11829extern "C"
11830#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011831char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011832int
11833main ()
11834{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011836 ;
11837 return 0;
11838}
11839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011840if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011841 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011842else
Matthias Kloseb9621712010-04-24 17:59:49 +000011843 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011844fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011845rm -f core conftest.err conftest.$ac_objext \
11846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011847LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11850$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011851if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011852 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011853 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011854else
Matthias Kloseb9621712010-04-24 17:59:49 +000011855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11856$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011857if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011859else
11860 ac_check_lib_save_LIBS=$LIBS
11861LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011862cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011863/* end confdefs.h. */
11864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011865/* Override any GCC internal prototype to avoid an error.
11866 Use char because int might match the return type of a GCC
11867 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011868#ifdef __cplusplus
11869extern "C"
11870#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011871char openpty ();
11872int
11873main ()
11874{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011875return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011876 ;
11877 return 0;
11878}
11879_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011880if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011881 ac_cv_lib_bsd_openpty=yes
11882else
Matthias Kloseb9621712010-04-24 17:59:49 +000011883 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011885rm -f core conftest.err conftest.$ac_objext \
11886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011887LIBS=$ac_check_lib_save_LIBS
11888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11890$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011891if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011893 LIBS="$LIBS -lbsd"
11894fi
11895
11896
11897fi
11898
Fred Drake8cef4cf2000-06-28 16:40:38 +000011899
11900fi
11901done
11902
11903for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011904do :
11905 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011906if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011907 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011908#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011909_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011910
Fred Drake8cef4cf2000-06-28 16:40:38 +000011911else
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11913$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011914if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011915 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011916else
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011918LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011922/* Override any GCC internal prototype to avoid an error.
11923 Use char because int might match the return type of a GCC
11924 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011925#ifdef __cplusplus
11926extern "C"
11927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011928char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011929int
11930main ()
11931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011932return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011933 ;
11934 return 0;
11935}
11936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011937if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011938 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011939else
Matthias Kloseb9621712010-04-24 17:59:49 +000011940 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011942rm -f core conftest.err conftest.$ac_objext \
11943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011944LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11947$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011948if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011949 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011950 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011951else
Matthias Kloseb9621712010-04-24 17:59:49 +000011952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11953$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011954if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011956else
11957 ac_check_lib_save_LIBS=$LIBS
11958LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011960/* end confdefs.h. */
11961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011962/* Override any GCC internal prototype to avoid an error.
11963 Use char because int might match the return type of a GCC
11964 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011965#ifdef __cplusplus
11966extern "C"
11967#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011968char forkpty ();
11969int
11970main ()
11971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011972return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011973 ;
11974 return 0;
11975}
11976_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011977if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011978 ac_cv_lib_bsd_forkpty=yes
11979else
Matthias Kloseb9621712010-04-24 17:59:49 +000011980 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011981fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011982rm -f core conftest.err conftest.$ac_objext \
11983 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011984LIBS=$ac_check_lib_save_LIBS
11985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11987$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011988if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011989 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011990 LIBS="$LIBS -lbsd"
11991fi
11992
11993
11994fi
11995
Fred Drake8cef4cf2000-06-28 16:40:38 +000011996
11997fi
11998done
11999
Jack Jansendd19cf82001-12-06 22:36:17 +000012000
Christian Heimesb186d002008-03-18 15:15:01 +000012001# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012002for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012003do :
12004 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012005if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012006 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012007#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012008_ACEOF
12009
12010fi
12011done
12012
12013
Michael W. Hudson54241132001-12-07 15:38:26 +000012014# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012015for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012016do :
12017 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12018ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012019if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012020 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012021#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012022_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012023
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012024fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012025done
12026
Michael W. Hudson54241132001-12-07 15:38:26 +000012027
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012028ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012029if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012030 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012031
Martin v. Löwis1142de32002-03-29 16:28:31 +000012032else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012034 *" dup2.$ac_objext "* ) ;;
12035 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012036 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012037esac
12038
Martin v. Löwis1142de32002-03-29 16:28:31 +000012039fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012040
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012041ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012042if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012043 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12044
12045else
12046 case " $LIBOBJS " in
12047 *" strdup.$ac_objext "* ) ;;
12048 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12049 ;;
12050esac
12051
12052fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012053
12054
12055for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012056do :
12057 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012058if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012059 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012060#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012061_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012063/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012064#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012065int
12066main ()
12067{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012068getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012069 ;
12070 return 0;
12071}
12072_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012073if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012074
Matthias Kloseb9621712010-04-24 17:59:49 +000012075$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012076
Guido van Rossum627b2d71993-12-24 10:39:16 +000012077fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012079
Guido van Rossum627b2d71993-12-24 10:39:16 +000012080fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012081done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012082
Jack Jansen150753c2003-03-29 22:07:47 +000012083for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012084do :
12085 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012086if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012087 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012088#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012091/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012092#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012093int
12094main ()
12095{
12096setpgrp(0,0);
12097 ;
12098 return 0;
12099}
12100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012101if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012102
Matthias Kloseb9621712010-04-24 17:59:49 +000012103$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012104
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012105fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012107
12108fi
12109done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012110
Thomas Wouters3a584202000-08-05 23:28:51 +000012111for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012112do :
12113 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012114if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012115 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012116#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012117_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012119/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012120#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012121int
12122main ()
12123{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012124gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012125 ;
12126 return 0;
12127}
12128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012129if ac_fn_c_try_compile "$LINENO"; then :
12130
Guido van Rossum627b2d71993-12-24 10:39:16 +000012131else
Skip Montanaro6dead952003-09-25 14:50:04 +000012132
Matthias Kloseb9621712010-04-24 17:59:49 +000012133$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012134
Martin v. Löwis11437992002-04-12 09:54:03 +000012135
Guido van Rossum627b2d71993-12-24 10:39:16 +000012136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012138
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012139fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012140done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012141
Michael W. Hudson54241132001-12-07 15:38:26 +000012142
Victor Stinnere0be4232011-10-25 13:06:09 +020012143for ac_func in clock_gettime
12144do :
12145 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12146if test "x$ac_cv_func_clock_gettime" = xyes; then :
12147 cat >>confdefs.h <<_ACEOF
12148#define HAVE_CLOCK_GETTIME 1
12149_ACEOF
12150
12151else
12152
12153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12154$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12155if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12156 $as_echo_n "(cached) " >&6
12157else
12158 ac_check_lib_save_LIBS=$LIBS
12159LIBS="-lrt $LIBS"
12160cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12161/* end confdefs.h. */
12162
12163/* Override any GCC internal prototype to avoid an error.
12164 Use char because int might match the return type of a GCC
12165 builtin and then its argument prototype would still apply. */
12166#ifdef __cplusplus
12167extern "C"
12168#endif
12169char clock_gettime ();
12170int
12171main ()
12172{
12173return clock_gettime ();
12174 ;
12175 return 0;
12176}
12177_ACEOF
12178if ac_fn_c_try_link "$LINENO"; then :
12179 ac_cv_lib_rt_clock_gettime=yes
12180else
12181 ac_cv_lib_rt_clock_gettime=no
12182fi
12183rm -f core conftest.err conftest.$ac_objext \
12184 conftest$ac_exeext conftest.$ac_ext
12185LIBS=$ac_check_lib_save_LIBS
12186fi
12187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12188$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12189if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12190
Victor Stinner7efb8332014-08-29 15:41:08 +020012191 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012192 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12193
12194
12195$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12196
12197
12198fi
12199
12200
12201fi
12202done
12203
12204
12205for ac_func in clock_getres
12206do :
12207 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12208if test "x$ac_cv_func_clock_getres" = xyes; then :
12209 cat >>confdefs.h <<_ACEOF
12210#define HAVE_CLOCK_GETRES 1
12211_ACEOF
12212
12213else
12214
12215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12216$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12217if ${ac_cv_lib_rt_clock_getres+:} false; then :
12218 $as_echo_n "(cached) " >&6
12219else
12220 ac_check_lib_save_LIBS=$LIBS
12221LIBS="-lrt $LIBS"
12222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12223/* end confdefs.h. */
12224
12225/* Override any GCC internal prototype to avoid an error.
12226 Use char because int might match the return type of a GCC
12227 builtin and then its argument prototype would still apply. */
12228#ifdef __cplusplus
12229extern "C"
12230#endif
12231char clock_getres ();
12232int
12233main ()
12234{
12235return clock_getres ();
12236 ;
12237 return 0;
12238}
12239_ACEOF
12240if ac_fn_c_try_link "$LINENO"; then :
12241 ac_cv_lib_rt_clock_getres=yes
12242else
12243 ac_cv_lib_rt_clock_getres=no
12244fi
12245rm -f core conftest.err conftest.$ac_objext \
12246 conftest$ac_exeext conftest.$ac_ext
12247LIBS=$ac_check_lib_save_LIBS
12248fi
12249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12250$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12251if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12252
12253 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12254
12255
12256fi
12257
12258
12259fi
12260done
12261
12262
Matthias Kloseb9621712010-04-24 17:59:49 +000012263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12264$as_echo_n "checking for major... " >&6; }
12265cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012266/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012267
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012268#if defined(MAJOR_IN_MKDEV)
12269#include <sys/mkdev.h>
12270#elif defined(MAJOR_IN_SYSMACROS)
12271#include <sys/sysmacros.h>
12272#else
12273#include <sys/types.h>
12274#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012275
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012276int
12277main ()
12278{
12279
12280 makedev(major(0),minor(0));
12281
12282 ;
12283 return 0;
12284}
12285_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012286if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012287
12288
Matthias Kloseb9621712010-04-24 17:59:49 +000012289$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012290
Matthias Kloseb9621712010-04-24 17:59:49 +000012291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12292$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012293
12294else
Skip Montanaro6dead952003-09-25 14:50:04 +000012295
Matthias Kloseb9621712010-04-24 17:59:49 +000012296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12297$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012298
12299fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012300rm -f core conftest.err conftest.$ac_objext \
12301 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012302
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012303# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012304# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12306$as_echo_n "checking for getaddrinfo... " >&6; }
12307cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012308/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012309
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012310#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012311#include <sys/socket.h>
12312#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012313#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012314
Martin v. Löwis11437992002-04-12 09:54:03 +000012315int
12316main ()
12317{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012318getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012319 ;
12320 return 0;
12321}
12322_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012323if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012324 have_getaddrinfo=yes
12325else
Matthias Kloseb9621712010-04-24 17:59:49 +000012326 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012327fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012328rm -f core conftest.err conftest.$ac_objext \
12329 conftest$ac_exeext conftest.$ac_ext
12330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12331$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012332if test $have_getaddrinfo = yes
12333then
Matthias Kloseb9621712010-04-24 17:59:49 +000012334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12335$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012336 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012337 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012338else
Matthias Kloseb9621712010-04-24 17:59:49 +000012339 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012340
12341if test "${enable_ipv6+set}" = set; then
12342 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12343else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012344 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012345fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012346else
Matthias Kloseb9621712010-04-24 17:59:49 +000012347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012348/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012349
Stefan Krah19c21392012-11-22 23:47:32 +010012350#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012351#include <sys/types.h>
12352#include <netdb.h>
12353#include <string.h>
12354#include <sys/socket.h>
12355#include <netinet/in.h>
12356
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012357int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012358{
12359 int passive, gaierr, inet4 = 0, inet6 = 0;
12360 struct addrinfo hints, *ai, *aitop;
12361 char straddr[INET6_ADDRSTRLEN], strport[16];
12362
12363 for (passive = 0; passive <= 1; passive++) {
12364 memset(&hints, 0, sizeof(hints));
12365 hints.ai_family = AF_UNSPEC;
12366 hints.ai_flags = passive ? AI_PASSIVE : 0;
12367 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012368 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012369 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12370 (void)gai_strerror(gaierr);
12371 goto bad;
12372 }
12373 for (ai = aitop; ai; ai = ai->ai_next) {
12374 if (ai->ai_addr == NULL ||
12375 ai->ai_addrlen == 0 ||
12376 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12377 straddr, sizeof(straddr), strport, sizeof(strport),
12378 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12379 goto bad;
12380 }
12381 switch (ai->ai_family) {
12382 case AF_INET:
12383 if (strcmp(strport, "54321") != 0) {
12384 goto bad;
12385 }
12386 if (passive) {
12387 if (strcmp(straddr, "0.0.0.0") != 0) {
12388 goto bad;
12389 }
12390 } else {
12391 if (strcmp(straddr, "127.0.0.1") != 0) {
12392 goto bad;
12393 }
12394 }
12395 inet4++;
12396 break;
12397 case AF_INET6:
12398 if (strcmp(strport, "54321") != 0) {
12399 goto bad;
12400 }
12401 if (passive) {
12402 if (strcmp(straddr, "::") != 0) {
12403 goto bad;
12404 }
12405 } else {
12406 if (strcmp(straddr, "::1") != 0) {
12407 goto bad;
12408 }
12409 }
12410 inet6++;
12411 break;
12412 case AF_UNSPEC:
12413 goto bad;
12414 break;
12415 default:
12416 /* another family support? */
12417 break;
12418 }
12419 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012420 freeaddrinfo(aitop);
12421 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012422 }
12423
12424 if (!(inet4 == 0 || inet4 == 2))
12425 goto bad;
12426 if (!(inet6 == 0 || inet6 == 2))
12427 goto bad;
12428
12429 if (aitop)
12430 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012431 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012432
12433 bad:
12434 if (aitop)
12435 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012436 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012437}
12438
Martin v. Löwis11437992002-04-12 09:54:03 +000012439_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012440if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012441 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012442else
Matthias Kloseb9621712010-04-24 17:59:49 +000012443 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012444fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012445rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12446 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012447fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012449fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012450
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012452
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12454$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12455
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012456if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012457then
12458 if test $ipv6 = yes
12459 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012460 echo 'Fatal: You must get working getaddrinfo() function.'
12461 echo ' or you can specify "--disable-ipv6"'.
12462 exit 1
12463 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012464else
Martin v. Löwis11437992002-04-12 09:54:03 +000012465
Matthias Kloseb9621712010-04-24 17:59:49 +000012466$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012467
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012468fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012469
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012470for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012471do :
12472 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012473if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012474 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012475#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012476_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012477
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012478fi
12479done
12480
Michael W. Hudson54241132001-12-07 15:38:26 +000012481
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012482# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12484$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012485if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012487else
Matthias Kloseb9621712010-04-24 17:59:49 +000012488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012489/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012490#include <sys/types.h>
12491#include <sys/time.h>
12492#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012493
Martin v. Löwis11437992002-04-12 09:54:03 +000012494int
12495main ()
12496{
12497if ((struct tm *) 0)
12498return 0;
12499 ;
12500 return 0;
12501}
12502_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012503if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012504 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012505else
Matthias Kloseb9621712010-04-24 17:59:49 +000012506 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012509fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12511$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012512if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012513
Matthias Kloseb9621712010-04-24 17:59:49 +000012514$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012515
12516fi
12517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12519$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012520if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012521 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522else
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012524/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012525#include <sys/types.h>
12526#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
Martin v. Löwis11437992002-04-12 09:54:03 +000012528int
12529main ()
12530{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012531struct tm tm;
12532 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012534 ;
12535 return 0;
12536}
12537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012538if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012539 ac_cv_struct_tm=time.h
12540else
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12546$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012547if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012548
Matthias Kloseb9621712010-04-24 17:59:49 +000012549$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012550
12551fi
12552
Matthias Kloseb9621712010-04-24 17:59:49 +000012553ac_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 +000012554#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
Matthias Kloseb9621712010-04-24 17:59:49 +000012556"
Victor Stinnere0be4232011-10-25 13:06:09 +020012557if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012558
12559cat >>confdefs.h <<_ACEOF
12560#define HAVE_STRUCT_TM_TM_ZONE 1
12561_ACEOF
12562
12563
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012564fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012565
Martin v. Löwis11437992002-04-12 09:54:03 +000012566if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12567
Matthias Kloseb9621712010-04-24 17:59:49 +000012568$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012569
12570else
Matthias Kloseb9621712010-04-24 17:59:49 +000012571 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12572"
Victor Stinnere0be4232011-10-25 13:06:09 +020012573if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575else
Matthias Kloseb9621712010-04-24 17:59:49 +000012576 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577fi
12578
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012579cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012580#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012581_ACEOF
12582
Matthias Kloseb9621712010-04-24 17:59:49 +000012583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12584$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012585if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012586 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012587else
Matthias Kloseb9621712010-04-24 17:59:49 +000012588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012589/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012590#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591#if !HAVE_DECL_TZNAME
12592extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012593#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012594
Martin v. Löwis11437992002-04-12 09:54:03 +000012595int
12596main ()
12597{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012599 ;
12600 return 0;
12601}
12602_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012603if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012604 ac_cv_var_tzname=yes
12605else
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012607fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012608rm -f core conftest.err conftest.$ac_objext \
12609 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012610fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12612$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012613 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012614
Matthias Kloseb9621712010-04-24 17:59:49 +000012615$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012616
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012617 fi
12618fi
12619
Matthias Kloseb9621712010-04-24 17:59:49 +000012620ac_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 +020012621if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012622
12623cat >>confdefs.h <<_ACEOF
12624#define HAVE_STRUCT_STAT_ST_RDEV 1
12625_ACEOF
12626
12627
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012628fi
12629
Matthias Kloseb9621712010-04-24 17:59:49 +000012630ac_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 +020012631if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012632
Martin v. Löwis11437992002-04-12 09:54:03 +000012633cat >>confdefs.h <<_ACEOF
12634#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12635_ACEOF
12636
12637
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012638fi
12639
Matthias Kloseb9621712010-04-24 17:59:49 +000012640ac_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 +020012641if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012642
12643cat >>confdefs.h <<_ACEOF
12644#define HAVE_STRUCT_STAT_ST_FLAGS 1
12645_ACEOF
12646
12647
12648fi
12649
Matthias Kloseb9621712010-04-24 17:59:49 +000012650ac_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 +020012651if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012652
12653cat >>confdefs.h <<_ACEOF
12654#define HAVE_STRUCT_STAT_ST_GEN 1
12655_ACEOF
12656
12657
12658fi
12659
Matthias Kloseb9621712010-04-24 17:59:49 +000012660ac_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 +020012661if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012662
12663cat >>confdefs.h <<_ACEOF
12664#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12665_ACEOF
12666
12667
12668fi
12669
Matthias Kloseb9621712010-04-24 17:59:49 +000012670ac_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 +020012671if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012672
Martin v. Löwis11437992002-04-12 09:54:03 +000012673cat >>confdefs.h <<_ACEOF
12674#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12675_ACEOF
12676
12677
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012678fi
12679
Stefan Krah267b6392016-04-26 01:09:18 +020012680ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12681 #include <sys/types.h>
12682 #include <pwd.h>
12683
12684"
12685if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12686
12687cat >>confdefs.h <<_ACEOF
12688#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12689_ACEOF
12690
12691
12692fi
12693ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12694 #include <sys/types.h>
12695 #include <pwd.h>
12696
12697"
12698if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12699
12700cat >>confdefs.h <<_ACEOF
12701#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12702_ACEOF
12703
12704
12705fi
12706
Michael W. Hudson54241132001-12-07 15:38:26 +000012707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12709$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012710if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012712else
Matthias Kloseb159a552010-04-25 21:00:44 +000012713
Matthias Kloseb9621712010-04-24 17:59:49 +000012714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012715/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012716#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012717int
12718main ()
12719{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012720return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012721 ;
12722 return 0;
12723}
12724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012725if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012726 ac_cv_header_time_altzone=yes
12727else
Matthias Kloseb9621712010-04-24 17:59:49 +000012728 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012729fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012731
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012732fi
12733
Matthias Kloseb9621712010-04-24 17:59:49 +000012734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12735$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012736if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012737
Matthias Kloseb9621712010-04-24 17:59:49 +000012738$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012739
12740fi
12741
Guido van Rossumda88dad1995-01-26 00:46:29 +000012742was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12744$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012746/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012747
12748#include <sys/types.h>
12749#include <sys/select.h>
12750#include <sys/time.h>
12751
Martin v. Löwis11437992002-04-12 09:54:03 +000012752int
12753main ()
12754{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012755;
Martin v. Löwis11437992002-04-12 09:54:03 +000012756 ;
12757 return 0;
12758}
12759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012760if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012761
12762
Matthias Kloseb9621712010-04-24 17:59:49 +000012763$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012764
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012765 was_it_defined=yes
12766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12770$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771
Matthias Kloseb9621712010-04-24 17:59:49 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12773$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012774if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012776else
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012778/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012779#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012780int
12781main ()
12782{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012783struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012784 ;
12785 return 0;
12786}
12787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012788if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012789 ac_cv_struct_addrinfo=yes
12790else
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12794fi
12795
Matthias Kloseb9621712010-04-24 17:59:49 +000012796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12797$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012798if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
Matthias Kloseb9621712010-04-24 17:59:49 +000012800$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012801
12802fi
12803
Matthias Kloseb9621712010-04-24 17:59:49 +000012804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12805$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012806if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012807 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012808else
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012810/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012811
12812# include <sys/types.h>
12813# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012814int
12815main ()
12816{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012817struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012818 ;
12819 return 0;
12820}
12821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012822if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012823 ac_cv_struct_sockaddr_storage=yes
12824else
Matthias Kloseb9621712010-04-24 17:59:49 +000012825 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12828fi
12829
Matthias Kloseb9621712010-04-24 17:59:49 +000012830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12831$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012832if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012833
Matthias Kloseb9621712010-04-24 17:59:49 +000012834$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012835
12836fi
12837
Christian Heimesdffa3942016-09-05 23:54:41 +020012838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12839$as_echo_n "checking for sockaddr_alg... " >&6; }
12840if ${ac_cv_struct_sockaddr_alg+:} false; then :
12841 $as_echo_n "(cached) " >&6
12842else
12843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12844/* end confdefs.h. */
12845
12846# include <sys/types.h>
12847# include <sys/socket.h>
12848# include <linux/if_alg.h>
12849int
12850main ()
12851{
12852struct sockaddr_alg s
12853 ;
12854 return 0;
12855}
12856_ACEOF
12857if ac_fn_c_try_compile "$LINENO"; then :
12858 ac_cv_struct_sockaddr_alg=yes
12859else
12860 ac_cv_struct_sockaddr_alg=no
12861fi
12862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12863fi
12864
12865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12866$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12867if test $ac_cv_struct_sockaddr_alg = yes; then
12868
12869$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12870
12871fi
12872
Guido van Rossum627b2d71993-12-24 10:39:16 +000012873# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012874
Matthias Kloseb9621712010-04-24 17:59:49 +000012875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12876$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012877if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012878 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012879else
Matthias Kloseb9621712010-04-24 17:59:49 +000012880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012882$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012883int
12884main ()
12885{
12886static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012887test_array [0] = 0;
12888return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012889
12890 ;
12891 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012892}
Martin v. Löwis11437992002-04-12 09:54:03 +000012893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012894if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012895 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012896else
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12902$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012903if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012904 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012905
12906fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012907
Matthias Kloseb9621712010-04-24 17:59:49 +000012908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12909$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012910if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012911 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012912else
Matthias Kloseb9621712010-04-24 17:59:49 +000012913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012914/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012915
Martin v. Löwis11437992002-04-12 09:54:03 +000012916int
12917main ()
12918{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012919
Martin v. Löwis11437992002-04-12 09:54:03 +000012920#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012921 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012922 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012923 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012925 char const *const *pcpcc;
12926 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 /* NEC SVR4.0.2 mips cc rejects this. */
12928 struct point {int x, y;};
12929 static struct point const zero = {0,0};
12930 /* AIX XL C 1.02.0.0 rejects this.
12931 It does not let you subtract one const X* pointer from another in
12932 an arm of an if-expression whose if-part is not a constant
12933 expression */
12934 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012935 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012937 ++pcpcc;
12938 ppc = (char**) pcpcc;
12939 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012940 { /* SCO 3.2v4 cc rejects this sort of thing. */
12941 char tx;
12942 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012944
Martin v. Löwis11437992002-04-12 09:54:03 +000012945 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 }
12948 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12949 int x[] = {25, 17};
12950 const int *foo = &x[0];
12951 ++foo;
12952 }
12953 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12954 typedef const int *iptr;
12955 iptr p = 0;
12956 ++p;
12957 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012958 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012959 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012960 struct s { int j; const int *ap[3]; } bx;
12961 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012962 }
12963 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12964 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012967 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012968#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012969
Martin v. Löwis11437992002-04-12 09:54:03 +000012970 ;
12971 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012972}
Martin v. Löwis11437992002-04-12 09:54:03 +000012973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012974if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012975 ac_cv_c_const=yes
12976else
Matthias Kloseb9621712010-04-24 17:59:49 +000012977 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012978fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12982$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012984
Matthias Kloseb9621712010-04-24 17:59:49 +000012985$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012986
12987fi
12988
Michael W. Hudson54241132001-12-07 15:38:26 +000012989
Guido van Rossumda88dad1995-01-26 00:46:29 +000012990works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12992$as_echo_n "checking for working volatile... " >&6; }
12993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012994/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012995
Martin v. Löwis11437992002-04-12 09:54:03 +000012996int
12997main ()
12998{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012999volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 ;
13001 return 0;
13002}
13003_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013004if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013005 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013006else
Skip Montanaro6dead952003-09-25 14:50:04 +000013007
Matthias Kloseb9621712010-04-24 17:59:49 +000013008$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013009
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013010
Guido van Rossum627b2d71993-12-24 10:39:16 +000013011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13014$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013015
Guido van Rossumda88dad1995-01-26 00:46:29 +000013016works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13018$as_echo_n "checking for working signed char... " >&6; }
13019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013020/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013021
Martin v. Löwis11437992002-04-12 09:54:03 +000013022int
13023main ()
13024{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013025signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013026 ;
13027 return 0;
13028}
13029_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013030if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013031 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013032else
Skip Montanaro6dead952003-09-25 14:50:04 +000013033
Matthias Kloseb9621712010-04-24 17:59:49 +000013034$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013035
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013036
Guido van Rossum7f43da71994-08-01 12:15:30 +000013037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13040$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013041
Guido van Rossumda88dad1995-01-26 00:46:29 +000013042have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13044$as_echo_n "checking for prototypes... " >&6; }
13045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013046/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013047int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013048int
13049main ()
13050{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013051return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013052 ;
13053 return 0;
13054}
13055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013056if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013057
Matthias Kloseb9621712010-04-24 17:59:49 +000013058$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013059
Matthias Kloseb159a552010-04-25 21:00:44 +000013060 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13064$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013065
Guido van Rossumda88dad1995-01-26 00:46:29 +000013066works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13068$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013070/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013071
13072#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013073int foo(int x, ...) {
13074 va_list va;
13075 va_start(va, x);
13076 va_arg(va, int);
13077 va_arg(va, char *);
13078 va_arg(va, double);
13079 return 0;
13080}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013081
Martin v. Löwis11437992002-04-12 09:54:03 +000013082int
13083main ()
13084{
Guido van Rossum90eea071996-08-30 20:58:57 +000013085return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 ;
13087 return 0;
13088}
13089_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013091
13092
Matthias Kloseb9621712010-04-24 17:59:49 +000013093$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013094
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013095 works=yes
13096
Guido van Rossum627b2d71993-12-24 10:39:16 +000013097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13100$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013101
Martin v. Löwisd6320502004-08-12 13:45:08 +000013102# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13104$as_echo_n "checking for socketpair... " >&6; }
13105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013106/* end confdefs.h. */
13107
13108#include <sys/types.h>
13109#include <sys/socket.h>
13110
13111int
13112main ()
13113{
13114void *x=socketpair
13115 ;
13116 return 0;
13117}
13118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013119if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013120
Matthias Kloseb9621712010-04-24 17:59:49 +000013121$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013122
Matthias Kloseb159a552010-04-25 21:00:44 +000013123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013124$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013125else
Matthias Kloseb9621712010-04-24 17:59:49 +000013126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13127$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013128
13129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013131
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013132# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13134$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013136/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013137#include <sys/types.h>
13138#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013139int
13140main ()
13141{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013142struct sockaddr x;
13143x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 ;
13145 return 0;
13146}
13147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013148if ac_fn_c_try_compile "$LINENO"; then :
13149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13150$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013151
Matthias Kloseb9621712010-04-24 17:59:49 +000013152$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013153
13154else
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13156$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013157
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013160
Guido van Rossumda88dad1995-01-26 00:46:29 +000013161va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13163$as_echo_n "checking whether va_list is an array... " >&6; }
13164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013165/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013166
13167#ifdef HAVE_STDARG_PROTOTYPES
13168#include <stdarg.h>
13169#else
13170#include <varargs.h>
13171#endif
13172
Martin v. Löwis11437992002-04-12 09:54:03 +000013173int
13174main ()
13175{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013176va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013177 ;
13178 return 0;
13179}
13180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013181if ac_fn_c_try_compile "$LINENO"; then :
13182
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013183else
Skip Montanaro6dead952003-09-25 14:50:04 +000013184
Martin v. Löwis11437992002-04-12 09:54:03 +000013185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013187
Guido van Rossumda88dad1995-01-26 00:46:29 +000013188 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013189
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13193$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013194
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013195# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013196
13197
Matthias Kloseb9621712010-04-24 17:59:49 +000013198ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013199if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013200
Matthias Kloseb9621712010-04-24 17:59:49 +000013201 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013202
Matthias Kloseb9621712010-04-24 17:59:49 +000013203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13204$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013205 OLD_CFLAGS=$CFLAGS
13206 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013208/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013209
13210# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
Martin v. Löwis11437992002-04-12 09:54:03 +000013212int
13213main ()
13214{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013215
13216 char *name;
13217 struct hostent *he, *res;
13218 char buffer[2048];
13219 int buflen = 2048;
13220 int h_errnop;
13221
13222 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013223
13224 ;
13225 return 0;
13226}
13227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013228if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013229
Matthias Kloseb9621712010-04-24 17:59:49 +000013230 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013231
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
Matthias Kloseb9621712010-04-24 17:59:49 +000013233$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013234
Matthias Kloseb9621712010-04-24 17:59:49 +000013235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13236$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013237
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013238else
Skip Montanaro6dead952003-09-25 14:50:04 +000013239
Matthias Kloseb9621712010-04-24 17:59:49 +000013240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13241$as_echo "no" >&6; }
13242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13243$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013245/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013246
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013247# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013248
Martin v. Löwis11437992002-04-12 09:54:03 +000013249int
13250main ()
13251{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013252
13253 char *name;
13254 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013255 char buffer[2048];
13256 int buflen = 2048;
13257 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013258
Matthias Kloseb159a552010-04-25 21:00:44 +000013259 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013260
13261 ;
13262 return 0;
13263}
13264_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013265if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Matthias Kloseb9621712010-04-24 17:59:49 +000013267 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013268
Martin v. Löwis11437992002-04-12 09:54:03 +000013269
Matthias Kloseb159a552010-04-25 21:00:44 +000013270$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013271
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13273$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013274
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013275else
Skip Montanaro6dead952003-09-25 14:50:04 +000013276
Matthias Kloseb9621712010-04-24 17:59:49 +000013277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13278$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13280$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13282/* end confdefs.h. */
13283
13284# include <netdb.h>
13285
13286int
13287main ()
13288{
13289
13290 char *name;
13291 struct hostent *he;
13292 struct hostent_data data;
13293
13294 (void) gethostbyname_r(name, he, &data);
13295
13296 ;
13297 return 0;
13298}
13299_ACEOF
13300if ac_fn_c_try_compile "$LINENO"; then :
13301
13302 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13303
13304
13305$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13306
13307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13308$as_echo "yes" >&6; }
13309
13310else
13311
13312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13313$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013314
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013317
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013320
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013321fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013323 CFLAGS=$OLD_CFLAGS
13324
13325else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013326
Matthias Kloseb9621712010-04-24 17:59:49 +000013327 for ac_func in gethostbyname
13328do :
13329 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013330if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013331 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013332#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013333_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013334
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013335fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013336done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013337
Michael W. Hudson54241132001-12-07 15:38:26 +000013338
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013339fi
13340
Michael W. Hudson54241132001-12-07 15:38:26 +000013341
13342
13343
13344
13345
13346
Guido van Rossum627b2d71993-12-24 10:39:16 +000013347# checks for system services
13348# (none yet)
13349
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013350# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013351ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013352if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013353
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013354else
Matthias Kloseb9621712010-04-24 17:59:49 +000013355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13356$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013357if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013358 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013359else
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013361LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013365/* Override any GCC internal prototype to avoid an error.
13366 Use char because int might match the return type of a GCC
13367 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013368#ifdef __cplusplus
13369extern "C"
13370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013371char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013372int
13373main ()
13374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013375return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 ;
13377 return 0;
13378}
13379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013380if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013381 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013382else
Matthias Kloseb9621712010-04-24 17:59:49 +000013383 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013384fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013385rm -f core conftest.err conftest.$ac_objext \
13386 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013387LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013388fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13390$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013391if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 cat >>confdefs.h <<_ACEOF
13393#define HAVE_LIBIEEE 1
13394_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013395
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013396 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013397
Guido van Rossum627b2d71993-12-24 10:39:16 +000013398fi
13399
Michael W. Hudson54241132001-12-07 15:38:26 +000013400
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013401fi
13402
Michael W. Hudson54241132001-12-07 15:38:26 +000013403
Guido van Rossum7f253911997-05-09 02:42:48 +000013404# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13406$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013409if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013410 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013411if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013412then
13413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
Matthias Kloseb9621712010-04-24 17:59:49 +000013416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13417$as_echo "yes" >&6; }
13418else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13419$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013420fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013421else
Matthias Kloseb9621712010-04-24 17:59:49 +000013422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13423$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013424fi
13425
Guido van Rossum7f253911997-05-09 02:42:48 +000013426
Guido van Rossum7f43da71994-08-01 12:15:30 +000013427# check for --with-libm=...
13428
Guido van Rossum563e7081996-09-10 18:20:48 +000013429case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013430Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013431*) LIBM=-lm
13432esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13434$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013436# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013437if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013438 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013439if test "$withval" = no
13440then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13442$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013443elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013444then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13446$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013447else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013448fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013449else
Matthias Kloseb9621712010-04-24 17:59:49 +000013450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13451$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013452fi
13453
Guido van Rossum7f43da71994-08-01 12:15:30 +000013454
13455# check for --with-libc=...
13456
Matthias Kloseb9621712010-04-24 17:59:49 +000013457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13458$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013459
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013460# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013461if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013462 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013463if test "$withval" = no
13464then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13466$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013467elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013468then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13470$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013471else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013472fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013473else
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13475$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013476fi
13477
Guido van Rossum7f43da71994-08-01 12:15:30 +000013478
Stefan Krah1919b7e2012-03-21 18:25:23 +010013479# **************************************
13480# * Check for gcc x64 inline assembler *
13481# **************************************
13482
13483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13484$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13486/* end confdefs.h. */
13487
13488int
13489main ()
13490{
13491
13492 __asm__ __volatile__ ("movq %rcx, %rax");
13493
13494 ;
13495 return 0;
13496}
13497_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013498if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013499 have_gcc_asm_for_x64=yes
13500else
13501 have_gcc_asm_for_x64=no
13502fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013503rm -f core conftest.err conftest.$ac_objext \
13504 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13506$as_echo "$have_gcc_asm_for_x64" >&6; }
13507if test "$have_gcc_asm_for_x64" = yes
13508then
13509
13510$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13511
13512fi
13513
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013514# **************************************************
13515# * Check for various properties of floating point *
13516# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013517
Matthias Kloseb9621712010-04-24 17:59:49 +000013518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13519$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013520if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013521 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013522else
13523
Matthias Kloseb9621712010-04-24 17:59:49 +000013524if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013525 ac_cv_little_endian_double=no
13526else
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013528/* end confdefs.h. */
13529
13530#include <string.h>
13531int main() {
13532 double x = 9006104071832581.0;
13533 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13534 return 0;
13535 else
13536 return 1;
13537}
13538
13539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013540if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013541 ac_cv_little_endian_double=yes
13542else
Matthias Kloseb9621712010-04-24 17:59:49 +000013543 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013545rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13546 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013547fi
13548
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013549fi
13550
Matthias Kloseb9621712010-04-24 17:59:49 +000013551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13552$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013553if test "$ac_cv_little_endian_double" = yes
13554then
13555
Matthias Kloseb9621712010-04-24 17:59:49 +000013556$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013557
13558fi
13559
Matthias Kloseb9621712010-04-24 17:59:49 +000013560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13561$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013562if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013563 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013564else
13565
Matthias Kloseb9621712010-04-24 17:59:49 +000013566if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013567 ac_cv_big_endian_double=no
13568else
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013570/* end confdefs.h. */
13571
13572#include <string.h>
13573int main() {
13574 double x = 9006104071832581.0;
13575 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13576 return 0;
13577 else
13578 return 1;
13579}
13580
13581_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013582if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013583 ac_cv_big_endian_double=yes
13584else
Matthias Kloseb9621712010-04-24 17:59:49 +000013585 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013586fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13588 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013589fi
13590
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013591fi
13592
Matthias Kloseb9621712010-04-24 17:59:49 +000013593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13594$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013595if test "$ac_cv_big_endian_double" = yes
13596then
13597
Matthias Kloseb9621712010-04-24 17:59:49 +000013598$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013599
13600fi
13601
13602# Some ARM platforms use a mixed-endian representation for doubles.
13603# While Python doesn't currently have full support for these platforms
13604# (see e.g., issue 1762561), we can at least make sure that float <-> string
13605# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13607$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013608if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013609 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013610else
13611
Matthias Kloseb9621712010-04-24 17:59:49 +000013612if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013613 ac_cv_mixed_endian_double=no
13614else
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013616/* end confdefs.h. */
13617
13618#include <string.h>
13619int main() {
13620 double x = 9006104071832581.0;
13621 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13622 return 0;
13623 else
13624 return 1;
13625}
13626
13627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013628if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013629 ac_cv_mixed_endian_double=yes
13630else
Matthias Kloseb9621712010-04-24 17:59:49 +000013631 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13634 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013635fi
13636
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013637fi
13638
Matthias Kloseb9621712010-04-24 17:59:49 +000013639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13640$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013641if test "$ac_cv_mixed_endian_double" = yes
13642then
13643
Matthias Kloseb9621712010-04-24 17:59:49 +000013644$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013645
13646fi
13647
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013648# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013649# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013650# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013651# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013652# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013653# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013654
13655# This inline assembler syntax may also work for suncc and icc,
13656# so we try it on all platforms.
13657
Matthias Kloseb9621712010-04-24 17:59:49 +000013658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13659$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013661/* end confdefs.h. */
13662
13663int
13664main ()
13665{
13666
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013667 unsigned short cw;
13668 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13669 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013670
13671 ;
13672 return 0;
13673}
13674_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013675if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013676 have_gcc_asm_for_x87=yes
13677else
Matthias Kloseb9621712010-04-24 17:59:49 +000013678 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013679fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013680rm -f core conftest.err conftest.$ac_objext \
13681 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13683$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013684if test "$have_gcc_asm_for_x87" = yes
13685then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013686
Matthias Kloseb9621712010-04-24 17:59:49 +000013687$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013688
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013689fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013690
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13692$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13694/* end confdefs.h. */
13695
13696int
13697main ()
13698{
13699
13700 unsigned int fpcr;
13701 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13702 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13703
13704 ;
13705 return 0;
13706}
13707_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013708if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013709 have_gcc_asm_for_mc68881=yes
13710else
13711 have_gcc_asm_for_mc68881=no
13712fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013713rm -f core conftest.err conftest.$ac_objext \
13714 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13716$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13717if test "$have_gcc_asm_for_mc68881" = yes
13718then
13719
13720$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13721
13722fi
13723
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013724# Detect whether system arithmetic is subject to x87-style double
13725# rounding issues. The result of this test has little meaning on non
13726# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13727# mode is round-to-nearest and double rounding issues are present, and
13728# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13730$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013731# $BASECFLAGS may affect the result
13732ac_save_cc="$CC"
13733CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013734if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013735 ac_cv_x87_double_rounding=no
13736else
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013738/* end confdefs.h. */
13739
13740#include <stdlib.h>
13741#include <math.h>
13742int main() {
13743 volatile double x, y, z;
13744 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13745 x = 0.99999999999999989; /* 1-2**-53 */
13746 y = 1./x;
13747 if (y != 1.)
13748 exit(0);
13749 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13750 x = 1e16;
13751 y = 2.99999;
13752 z = x + y;
13753 if (z != 1e16+4.)
13754 exit(0);
13755 /* both tests show evidence of double rounding */
13756 exit(1);
13757}
13758
13759_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013760if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013761 ac_cv_x87_double_rounding=no
13762else
Matthias Kloseb9621712010-04-24 17:59:49 +000013763 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013764fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013765rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13766 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013767fi
13768
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013769CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13771$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013772if test "$ac_cv_x87_double_rounding" = yes
13773then
13774
Matthias Kloseb9621712010-04-24 17:59:49 +000013775$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013776
13777fi
13778
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013779# ************************************
13780# * Check for mathematical functions *
13781# ************************************
13782
13783LIBS_SAVE=$LIBS
13784LIBS="$LIBS $LIBM"
13785
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013786for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13787do :
13788 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13789ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013790if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013791 cat >>confdefs.h <<_ACEOF
13792#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13793_ACEOF
13794
13795fi
13796done
13797
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013798for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013799do :
13800 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13801ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013802if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013803 cat >>confdefs.h <<_ACEOF
13804#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13805_ACEOF
13806
13807fi
13808done
13809
13810ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13811"
Victor Stinnere0be4232011-10-25 13:06:09 +020013812if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013813 ac_have_decl=1
13814else
13815 ac_have_decl=0
13816fi
13817
13818cat >>confdefs.h <<_ACEOF
13819#define HAVE_DECL_ISINF $ac_have_decl
13820_ACEOF
13821ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13822"
Victor Stinnere0be4232011-10-25 13:06:09 +020013823if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013824 ac_have_decl=1
13825else
13826 ac_have_decl=0
13827fi
13828
13829cat >>confdefs.h <<_ACEOF
13830#define HAVE_DECL_ISNAN $ac_have_decl
13831_ACEOF
13832ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13833"
Victor Stinnere0be4232011-10-25 13:06:09 +020013834if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013835 ac_have_decl=1
13836else
13837 ac_have_decl=0
13838fi
13839
13840cat >>confdefs.h <<_ACEOF
13841#define HAVE_DECL_ISFINITE $ac_have_decl
13842_ACEOF
13843
13844
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013845# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13846# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13848$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013849if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013851else
13852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013854 ac_cv_tanh_preserves_zero_sign=no
13855else
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013857/* end confdefs.h. */
13858
13859#include <math.h>
13860#include <stdlib.h>
13861int main() {
13862 /* return 0 if either negative zeros don't exist
13863 on this platform or if negative zeros exist
13864 and tanh(-0.) == -0. */
13865 if (atan2(0., -1.) == atan2(-0., -1.) ||
13866 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13867 else exit(1);
13868}
13869
13870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013871if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013872 ac_cv_tanh_preserves_zero_sign=yes
13873else
Matthias Kloseb9621712010-04-24 17:59:49 +000013874 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013878fi
13879
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013880fi
13881
Matthias Kloseb9621712010-04-24 17:59:49 +000013882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13883$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013884if test "$ac_cv_tanh_preserves_zero_sign" = yes
13885then
13886
Matthias Kloseb9621712010-04-24 17:59:49 +000013887$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013888
13889fi
13890
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013891if test "$ac_cv_func_log1p" = yes
13892then
13893 # On some versions of AIX, log1p(-0.) returns 0. instead of
13894 # -0. See issue #9920.
13895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13896$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013897 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013898 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013899else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013900
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013901 if test "$cross_compiling" = yes; then :
13902 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013903else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13905/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013906
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013907 #include <math.h>
13908 #include <stdlib.h>
13909 int main() {
13910 /* Fail if the signs of log1p(-0.) and -0. can be
13911 distinguished. */
13912 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13913 return 0;
13914 else
13915 return 1;
13916 }
13917
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013918_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013919if ac_fn_c_try_run "$LINENO"; then :
13920 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013921else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013922 ac_cv_log1p_drops_zero_sign=yes
13923fi
13924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013926fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013927
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013928fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013929
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13931$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13932fi
13933if test "$ac_cv_log1p_drops_zero_sign" = yes
13934then
13935
13936$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13937
13938fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013939
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013940LIBS=$LIBS_SAVE
13941
Mark Dickinsona614f042009-11-28 12:48:43 +000013942# For multiprocessing module, check that sem_open
13943# actually works. For FreeBSD versions <= 7.2,
13944# the kernel module that provides POSIX semaphores
13945# isn't loaded by default, so an attempt to call
13946# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13948$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013949if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013951else
Matthias Kloseb9621712010-04-24 17:59:49 +000013952 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013953 ac_cv_posix_semaphores_enabled=yes
13954else
Matthias Kloseb9621712010-04-24 17:59:49 +000013955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013956/* end confdefs.h. */
13957
13958#include <unistd.h>
13959#include <fcntl.h>
13960#include <stdio.h>
13961#include <semaphore.h>
13962#include <sys/stat.h>
13963
13964int main(void) {
13965 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13966 if (a == SEM_FAILED) {
13967 perror("sem_open");
13968 return 1;
13969 }
13970 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013971 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013972 return 0;
13973}
13974
13975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013976if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013977 ac_cv_posix_semaphores_enabled=yes
13978else
Matthias Kloseb9621712010-04-24 17:59:49 +000013979 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013983fi
13984
13985
Mark Dickinsona614f042009-11-28 12:48:43 +000013986fi
13987
Matthias Kloseb9621712010-04-24 17:59:49 +000013988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13989$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013990if test $ac_cv_posix_semaphores_enabled = no
13991then
13992
Matthias Kloseb9621712010-04-24 17:59:49 +000013993$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013994
13995fi
13996
Mark Dickinson10683072009-04-18 21:18:19 +000013997# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13999$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014000if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014002else
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014004 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014005else
Matthias Kloseb9621712010-04-24 17:59:49 +000014006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014007/* end confdefs.h. */
14008
14009#include <unistd.h>
14010#include <fcntl.h>
14011#include <stdio.h>
14012#include <semaphore.h>
14013#include <sys/stat.h>
14014
14015int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014016 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014017 int count;
14018 int res;
14019 if(a==SEM_FAILED){
14020 perror("sem_open");
14021 return 1;
14022
14023 }
14024 res = sem_getvalue(a, &count);
14025 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014026 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014027 return res==-1 ? 1 : 0;
14028}
14029
Mark Dickinson10683072009-04-18 21:18:19 +000014030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014031if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014032 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014033else
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014038fi
14039
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014040
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014041fi
14042
Matthias Kloseb9621712010-04-24 17:59:49 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14044$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014045if test $ac_cv_broken_sem_getvalue = yes
14046then
14047
Matthias Kloseb9621712010-04-24 17:59:49 +000014048$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014049
14050fi
14051
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014052ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14053"
14054if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14055 ac_have_decl=1
14056else
14057 ac_have_decl=0
14058fi
14059
14060cat >>confdefs.h <<_ACEOF
14061#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14062_ACEOF
14063ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14064"
14065if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14066 ac_have_decl=1
14067else
14068 ac_have_decl=0
14069fi
14070
14071cat >>confdefs.h <<_ACEOF
14072#define HAVE_DECL_RTLD_NOW $ac_have_decl
14073_ACEOF
14074ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14075"
14076if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14077 ac_have_decl=1
14078else
14079 ac_have_decl=0
14080fi
14081
14082cat >>confdefs.h <<_ACEOF
14083#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14084_ACEOF
14085ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14086"
14087if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14088 ac_have_decl=1
14089else
14090 ac_have_decl=0
14091fi
14092
14093cat >>confdefs.h <<_ACEOF
14094#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14095_ACEOF
14096ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14097"
14098if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14099 ac_have_decl=1
14100else
14101 ac_have_decl=0
14102fi
14103
14104cat >>confdefs.h <<_ACEOF
14105#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14106_ACEOF
14107ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14108"
14109if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14110 ac_have_decl=1
14111else
14112 ac_have_decl=0
14113fi
14114
14115cat >>confdefs.h <<_ACEOF
14116#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14117_ACEOF
14118ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14119"
14120if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14121 ac_have_decl=1
14122else
14123 ac_have_decl=0
14124fi
14125
14126cat >>confdefs.h <<_ACEOF
14127#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14128_ACEOF
14129
14130
Mark Dickinsonbd792642009-03-18 20:06:12 +000014131# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14133$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014134# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014135if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014136 enableval=$enable_big_digits; case $enable_big_digits in
14137yes)
14138 enable_big_digits=30 ;;
14139no)
14140 enable_big_digits=15 ;;
1414115|30)
14142 ;;
14143*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014144 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 +000014145esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14147$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014148
14149cat >>confdefs.h <<_ACEOF
14150#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14151_ACEOF
14152
14153
14154else
Matthias Kloseb9621712010-04-24 17:59:49 +000014155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14156$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014157fi
14158
14159
Guido van Rossumef2255b2000-03-10 22:30:29 +000014160# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014161ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014162if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014163
14164
Matthias Kloseb9621712010-04-24 17:59:49 +000014165$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014166
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014167 wchar_h="yes"
14168
Guido van Rossumef2255b2000-03-10 22:30:29 +000014169else
Martin v. Löwis11437992002-04-12 09:54:03 +000014170 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014171
14172fi
14173
Michael W. Hudson54241132001-12-07 15:38:26 +000014174
Martin v. Löwis11437992002-04-12 09:54:03 +000014175
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014176# determine wchar_t size
14177if test "$wchar_h" = yes
14178then
Matthias Kloseb9621712010-04-24 17:59:49 +000014179 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014180# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14181# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14182# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14184$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014185if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014186 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014187else
Matthias Kloseb9621712010-04-24 17:59:49 +000014188 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14189"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014190
Martin v. Löwis11437992002-04-12 09:54:03 +000014191else
Matthias Kloseb9621712010-04-24 17:59:49 +000014192 if test "$ac_cv_type_wchar_t" = yes; then
14193 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14194$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014195as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014196See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014197 else
14198 ac_cv_sizeof_wchar_t=0
14199 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014201
Martin v. Löwis11437992002-04-12 09:54:03 +000014202fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14204$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014205
14206
14207
Martin v. Löwis11437992002-04-12 09:54:03 +000014208cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014209#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014210_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014211
Michael W. Hudson54241132001-12-07 15:38:26 +000014212
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014213fi
14214
Matthias Kloseb9621712010-04-24 17:59:49 +000014215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14216$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014217have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014219/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014220
14221#include <tcl.h>
14222#if TCL_UTF_MAX != 6
14223# error "NOT UCS4_TCL"
14224#endif
14225int
14226main ()
14227{
14228
14229 ;
14230 return 0;
14231}
14232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014233if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014234
14235
Matthias Kloseb9621712010-04-24 17:59:49 +000014236$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014237
14238 have_ucs4_tcl=yes
14239
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14243$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014244
Skip Montanaro6dead952003-09-25 14:50:04 +000014245# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014246if test "$wchar_h" = yes
14247then
14248 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14250$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014251 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014252 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014253else
14254
Matthias Kloseb9621712010-04-24 17:59:49 +000014255 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014256 ac_cv_wchar_t_signed=yes
14257else
Matthias Kloseb9621712010-04-24 17:59:49 +000014258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014259/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014260
14261 #include <wchar.h>
14262 int main()
14263 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014264 /* Success: exit code 0 */
14265 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014266 }
14267
14268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014269if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014270 ac_cv_wchar_t_signed=yes
14271else
Matthias Kloseb9621712010-04-24 17:59:49 +000014272 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14275 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014276fi
14277
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014278fi
14279
Matthias Kloseb9621712010-04-24 17:59:49 +000014280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14281$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014282fi
14283
Georg Brandl52d168a2008-01-07 18:10:24 +000014284# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014285if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014286 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014287then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014288 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014289
Matthias Kloseb9621712010-04-24 17:59:49 +000014290$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014291
Georg Brandl52d168a2008-01-07 18:10:24 +000014292else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014293 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014294fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14296$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014297
14298# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14300$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014301if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014303else
Matthias Kloseb9621712010-04-24 17:59:49 +000014304 ac_cv_c_bigendian=unknown
14305 # See if we're dealing with a universal compiler.
14306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14307/* end confdefs.h. */
14308#ifndef __APPLE_CC__
14309 not a universal capable compiler
14310 #endif
14311 typedef int dummy;
14312
Skip Montanaro6dead952003-09-25 14:50:04 +000014313_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014314if ac_fn_c_try_compile "$LINENO"; then :
14315
14316 # Check for potential -arch flags. It is not universal unless
14317 # there are at least two -arch flags with different values.
14318 ac_arch=
14319 ac_prev=
14320 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14321 if test -n "$ac_prev"; then
14322 case $ac_word in
14323 i?86 | x86_64 | ppc | ppc64)
14324 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14325 ac_arch=$ac_word
14326 else
14327 ac_cv_c_bigendian=universal
14328 break
14329 fi
14330 ;;
14331 esac
14332 ac_prev=
14333 elif test "x$ac_word" = "x-arch"; then
14334 ac_prev=arch
14335 fi
14336 done
14337fi
14338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14339 if test $ac_cv_c_bigendian = unknown; then
14340 # See if sys/param.h defines the BYTE_ORDER macro.
14341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014342/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014343#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014344 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014345
Martin v. Löwis11437992002-04-12 09:54:03 +000014346int
14347main ()
14348{
Matthias Kloseb9621712010-04-24 17:59:49 +000014349#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14350 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14351 && LITTLE_ENDIAN)
14352 bogus endian macros
14353 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014354
14355 ;
14356 return 0;
14357}
14358_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014359if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014360 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014362/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014363#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014365
Martin v. Löwis11437992002-04-12 09:54:03 +000014366int
14367main ()
14368{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014369#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014370 not big endian
14371 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014372
14373 ;
14374 return 0;
14375}
14376_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014377if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014378 ac_cv_c_bigendian=yes
14379else
Matthias Kloseb9621712010-04-24 17:59:49 +000014380 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014383fi
14384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14385 fi
14386 if test $ac_cv_c_bigendian = unknown; then
14387 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014389/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014390#include <limits.h>
14391
Martin v. Löwis11437992002-04-12 09:54:03 +000014392int
14393main ()
14394{
Matthias Kloseb9621712010-04-24 17:59:49 +000014395#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14396 bogus endian macros
14397 #endif
14398
Martin v. Löwis11437992002-04-12 09:54:03 +000014399 ;
14400 return 0;
14401}
14402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014403if ac_fn_c_try_compile "$LINENO"; then :
14404 # It does; now see whether it defined to _BIG_ENDIAN or not.
14405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14406/* end confdefs.h. */
14407#include <limits.h>
14408
14409int
14410main ()
14411{
14412#ifndef _BIG_ENDIAN
14413 not big endian
14414 #endif
14415
14416 ;
14417 return 0;
14418}
14419_ACEOF
14420if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014421 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014422else
Matthias Kloseb9621712010-04-24 17:59:49 +000014423 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014424fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14426fi
14427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14428 fi
14429 if test $ac_cv_c_bigendian = unknown; then
14430 # Compile a test program.
14431 if test "$cross_compiling" = yes; then :
14432 # Try to guess by grepping values from an object file.
14433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14434/* end confdefs.h. */
14435short int ascii_mm[] =
14436 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14437 short int ascii_ii[] =
14438 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14439 int use_ascii (int i) {
14440 return ascii_mm[i] + ascii_ii[i];
14441 }
14442 short int ebcdic_ii[] =
14443 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14444 short int ebcdic_mm[] =
14445 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14446 int use_ebcdic (int i) {
14447 return ebcdic_mm[i] + ebcdic_ii[i];
14448 }
14449 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014450
Matthias Kloseb9621712010-04-24 17:59:49 +000014451int
14452main ()
14453{
14454return use_ascii (foo) == use_ebcdic (foo);
14455 ;
14456 return 0;
14457}
14458_ACEOF
14459if ac_fn_c_try_compile "$LINENO"; then :
14460 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14461 ac_cv_c_bigendian=yes
14462 fi
14463 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14464 if test "$ac_cv_c_bigendian" = unknown; then
14465 ac_cv_c_bigendian=no
14466 else
14467 # finding both strings is unlikely to happen, but who knows?
14468 ac_cv_c_bigendian=unknown
14469 fi
14470 fi
14471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014473else
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014475/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014476$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014477int
14478main ()
14479{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014480
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 /* Are we little or big endian? From Harbison&Steele. */
14482 union
14483 {
14484 long int l;
14485 char c[sizeof (long int)];
14486 } u;
14487 u.l = 1;
14488 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014489
14490 ;
14491 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014492}
Martin v. Löwis11437992002-04-12 09:54:03 +000014493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014494if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014495 ac_cv_c_bigendian=no
14496else
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14500 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014502
Matthias Kloseb9621712010-04-24 17:59:49 +000014503 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014504fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14506$as_echo "$ac_cv_c_bigendian" >&6; }
14507 case $ac_cv_c_bigendian in #(
14508 yes)
14509 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14510;; #(
14511 no)
14512 ;; #(
14513 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014514
Matthias Kloseb9621712010-04-24 17:59:49 +000014515$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517 ;; #(
14518 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014519 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014520 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014522
Michael W. Hudson54241132001-12-07 15:38:26 +000014523
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014524# ABI version string for Python extension modules. This appears between the
14525# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14526# from the following attributes which affect the ABI of this Python build (in
14527# this order):
14528#
14529# * The Python implementation (always 'cpython-' for us)
14530# * The major and minor version numbers
14531# * --with-pydebug (adds a 'd')
14532# * --with-pymalloc (adds a 'm')
14533# * --with-wide-unicode (adds a 'u')
14534#
14535# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014536# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14537# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014538
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14540$as_echo_n "checking ABIFLAGS... " >&6; }
14541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14542$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14544$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014545SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14547$as_echo "$SOABI" >&6; }
14548
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014549
14550case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014551 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014552 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14553 *)
14554 EXT_SUFFIX=${SHLIB_SUFFIX};;
14555esac
14556
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14558$as_echo_n "checking LDVERSION... " >&6; }
14559LDVERSION='$(VERSION)$(ABIFLAGS)'
14560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14561$as_echo "$LDVERSION" >&6; }
14562
doko@python.org87421192013-01-26 11:39:31 +010014563
doko@ubuntu.com55532312016-06-14 08:55:19 +020014564if test x$PLATFORM_TRIPLET = x; then
14565 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14566else
14567 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14568fi
doko@python.org87421192013-01-26 11:39:31 +010014569
14570
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014571# Check whether right shifting a negative integer extends the sign bit
14572# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14574$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014575if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014577else
Martin v. Löwis11437992002-04-12 09:54:03 +000014578
Matthias Kloseb9621712010-04-24 17:59:49 +000014579if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014580 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014581else
Matthias Kloseb9621712010-04-24 17:59:49 +000014582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014583/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014584
14585int main()
14586{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014587 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014588}
14589
Martin v. Löwis11437992002-04-12 09:54:03 +000014590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014591if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014592 ac_cv_rshift_extends_sign=yes
14593else
Matthias Kloseb9621712010-04-24 17:59:49 +000014594 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014595fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014596rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14597 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014598fi
14599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014600fi
14601
Matthias Kloseb9621712010-04-24 17:59:49 +000014602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14603$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014604if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014605then
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
Matthias Kloseb9621712010-04-24 17:59:49 +000014607$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014608
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014609fi
14610
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014611# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14613$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014614if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014615 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014616else
Martin v. Löwis11437992002-04-12 09:54:03 +000014617
Matthias Kloseb9621712010-04-24 17:59:49 +000014618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014619/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014620#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014621int
14622main ()
14623{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014624
14625 FILE *f = fopen("/dev/null", "r");
14626 flockfile(f);
14627 getc_unlocked(f);
14628 funlockfile(f);
14629
Martin v. Löwis11437992002-04-12 09:54:03 +000014630 ;
14631 return 0;
14632}
14633_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014634if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014635 ac_cv_have_getc_unlocked=yes
14636else
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 ac_cv_have_getc_unlocked=no
14638fi
14639rm -f core conftest.err conftest.$ac_objext \
14640 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014642
Matthias Kloseb9621712010-04-24 17:59:49 +000014643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14644$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014645if test "$ac_cv_have_getc_unlocked" = yes
14646then
Martin v. Löwis11437992002-04-12 09:54:03 +000014647
Matthias Kloseb9621712010-04-24 17:59:49 +000014648$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014649
14650fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014651
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014652# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014653# save the value of LIBS so we don't actually link Python with readline
14654LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014655
Gregory P. Smith18820942008-09-07 06:24:49 +000014656# On some systems we need to link readline to a termcap compatible
14657# library. NOTE: Keep the precedence of listed libraries synchronised
14658# with setup.py.
14659py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14661$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014662for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014663 if test -z "$py_libtermcap"; then
14664 READLINE_LIBS="-lreadline"
14665 else
14666 READLINE_LIBS="-lreadline -l$py_libtermcap"
14667 fi
14668 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014670/* end confdefs.h. */
14671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014672/* Override any GCC internal prototype to avoid an error.
14673 Use char because int might match the return type of a GCC
14674 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014675#ifdef __cplusplus
14676extern "C"
14677#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014678char readline ();
14679int
14680main ()
14681{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014682return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014683 ;
14684 return 0;
14685}
14686_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014687if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014688 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014690rm -f core conftest.err conftest.$ac_objext \
14691 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014692 if test $py_cv_lib_readline = yes; then
14693 break
14694 fi
14695done
14696# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14697#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014698if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14700$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014701else
Matthias Kloseb9621712010-04-24 17:59:49 +000014702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14703$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014704
Matthias Kloseb9621712010-04-24 17:59:49 +000014705$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014706
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014707fi
14708
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014709# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14711$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014712if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014713 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014714else
14715 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014716LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014717cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014718/* end confdefs.h. */
14719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014720/* Override any GCC internal prototype to avoid an error.
14721 Use char because int might match the return type of a GCC
14722 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014723#ifdef __cplusplus
14724extern "C"
14725#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014726char rl_callback_handler_install ();
14727int
14728main ()
14729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014730return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014731 ;
14732 return 0;
14733}
14734_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014735if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014736 ac_cv_lib_readline_rl_callback_handler_install=yes
14737else
Matthias Kloseb9621712010-04-24 17:59:49 +000014738 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014739fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014740rm -f core conftest.err conftest.$ac_objext \
14741 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014742LIBS=$ac_check_lib_save_LIBS
14743fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14745$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014746if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014747
Matthias Kloseb9621712010-04-24 17:59:49 +000014748$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014749
14750fi
14751
14752
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014753# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014755/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014756#include <readline/readline.h>
14757_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014758if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014759 have_readline=yes
14760else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014761 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014762
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014763fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014764rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014765if test $have_readline = yes
14766then
Matthias Kloseb9621712010-04-24 17:59:49 +000014767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014768/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014769#include <readline/readline.h>
14770
14771_ACEOF
14772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014773 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014774
Matthias Kloseb9621712010-04-24 17:59:49 +000014775$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014776
14777fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014778rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014781/* end confdefs.h. */
14782#include <readline/readline.h>
14783
14784_ACEOF
14785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014786 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014787
Matthias Kloseb9621712010-04-24 17:59:49 +000014788$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014789
14790fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014791rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014792
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014793fi
14794
Martin v. Löwis0daad592001-09-30 21:09:59 +000014795# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14797$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014798if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014799 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014800else
Martin v. Löwis11437992002-04-12 09:54:03 +000014801 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014802LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014806/* Override any GCC internal prototype to avoid an error.
14807 Use char because int might match the return type of a GCC
14808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014809#ifdef __cplusplus
14810extern "C"
14811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014812char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014813int
14814main ()
14815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014816return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014817 ;
14818 return 0;
14819}
14820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014822 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014823else
Matthias Kloseb9621712010-04-24 17:59:49 +000014824 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014825fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014826rm -f core conftest.err conftest.$ac_objext \
14827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014828LIBS=$ac_check_lib_save_LIBS
14829fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14831$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014832if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014833
Matthias Kloseb9621712010-04-24 17:59:49 +000014834$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014835
Martin v. Löwis0daad592001-09-30 21:09:59 +000014836fi
14837
Michael W. Hudson54241132001-12-07 15:38:26 +000014838
Thomas Wouters89d996e2007-09-08 17:39:28 +000014839# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14841$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014842if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014843 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014844else
14845 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014846LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014848/* end confdefs.h. */
14849
14850/* Override any GCC internal prototype to avoid an error.
14851 Use char because int might match the return type of a GCC
14852 builtin and then its argument prototype would still apply. */
14853#ifdef __cplusplus
14854extern "C"
14855#endif
14856char rl_completion_display_matches_hook ();
14857int
14858main ()
14859{
14860return rl_completion_display_matches_hook ();
14861 ;
14862 return 0;
14863}
14864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014865if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014866 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14867else
Matthias Kloseb9621712010-04-24 17:59:49 +000014868 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014870rm -f core conftest.err conftest.$ac_objext \
14871 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014872LIBS=$ac_check_lib_save_LIBS
14873fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14875$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014876if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014877
Matthias Kloseb9621712010-04-24 17:59:49 +000014878$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014879
14880fi
14881
14882
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014883# also in 4.0, but not in editline
14884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14885$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14886if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14887 $as_echo_n "(cached) " >&6
14888else
14889 ac_check_lib_save_LIBS=$LIBS
14890LIBS="-lreadline $READLINE_LIBS $LIBS"
14891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14892/* end confdefs.h. */
14893
14894/* Override any GCC internal prototype to avoid an error.
14895 Use char because int might match the return type of a GCC
14896 builtin and then its argument prototype would still apply. */
14897#ifdef __cplusplus
14898extern "C"
14899#endif
14900char rl_resize_terminal ();
14901int
14902main ()
14903{
14904return rl_resize_terminal ();
14905 ;
14906 return 0;
14907}
14908_ACEOF
14909if ac_fn_c_try_link "$LINENO"; then :
14910 ac_cv_lib_readline_rl_resize_terminal=yes
14911else
14912 ac_cv_lib_readline_rl_resize_terminal=no
14913fi
14914rm -f core conftest.err conftest.$ac_objext \
14915 conftest$ac_exeext conftest.$ac_ext
14916LIBS=$ac_check_lib_save_LIBS
14917fi
14918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14919$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14920if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14921
14922$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14923
14924fi
14925
14926
Martin v. Löwis0daad592001-09-30 21:09:59 +000014927# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14929$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014930if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014931 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014932else
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014934LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014935cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014938/* Override any GCC internal prototype to avoid an error.
14939 Use char because int might match the return type of a GCC
14940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014941#ifdef __cplusplus
14942extern "C"
14943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014944char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014945int
14946main ()
14947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014948return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014949 ;
14950 return 0;
14951}
14952_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014953if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014955else
Matthias Kloseb9621712010-04-24 17:59:49 +000014956 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014957fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014958rm -f core conftest.err conftest.$ac_objext \
14959 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014960LIBS=$ac_check_lib_save_LIBS
14961fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14963$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014964if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014965
Matthias Kloseb9621712010-04-24 17:59:49 +000014966$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014967
Guido van Rossum353ae582001-07-10 16:45:32 +000014968fi
14969
Jack Jansendd19cf82001-12-06 22:36:17 +000014970
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014971# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014973/* end confdefs.h. */
14974#include <readline/readline.h>
14975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014976if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014977 have_readline=yes
14978else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014979 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014980
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014981fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014982rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014983if test $have_readline = yes
14984then
Matthias Kloseb9621712010-04-24 17:59:49 +000014985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014986/* end confdefs.h. */
14987#include <readline/readline.h>
14988
14989_ACEOF
14990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014991 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014992
Matthias Kloseb9621712010-04-24 17:59:49 +000014993$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014994
14995fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014996rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014997
14998fi
14999
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15001$as_echo_n "checking for append_history in -lreadline... " >&6; }
15002if ${ac_cv_lib_readline_append_history+:} false; then :
15003 $as_echo_n "(cached) " >&6
15004else
15005 ac_check_lib_save_LIBS=$LIBS
15006LIBS="-lreadline $READLINE_LIBS $LIBS"
15007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15008/* end confdefs.h. */
15009
15010/* Override any GCC internal prototype to avoid an error.
15011 Use char because int might match the return type of a GCC
15012 builtin and then its argument prototype would still apply. */
15013#ifdef __cplusplus
15014extern "C"
15015#endif
15016char append_history ();
15017int
15018main ()
15019{
15020return append_history ();
15021 ;
15022 return 0;
15023}
15024_ACEOF
15025if ac_fn_c_try_link "$LINENO"; then :
15026 ac_cv_lib_readline_append_history=yes
15027else
15028 ac_cv_lib_readline_append_history=no
15029fi
15030rm -f core conftest.err conftest.$ac_objext \
15031 conftest$ac_exeext conftest.$ac_ext
15032LIBS=$ac_check_lib_save_LIBS
15033fi
15034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15035$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15036if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15037
15038$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15039
15040fi
15041
15042
Martin v. Löwis82bca632006-02-10 20:49:30 +000015043# End of readline checks: restore LIBS
15044LIBS=$LIBS_no_readline
15045
Matthias Kloseb9621712010-04-24 17:59:49 +000015046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15047$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015048if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015049 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015050else
Martin v. Löwis11437992002-04-12 09:54:03 +000015051
Matthias Kloseb9621712010-04-24 17:59:49 +000015052if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015053 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015054else
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015056/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015057
15058int main()
15059{
15060 int val1 = nice(1);
15061 if (val1 != -1 && val1 == nice(2))
15062 exit(0);
15063 exit(1);
15064}
15065
Martin v. Löwis11437992002-04-12 09:54:03 +000015066_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015067if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015068 ac_cv_broken_nice=yes
15069else
Matthias Kloseb9621712010-04-24 17:59:49 +000015070 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015071fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015072rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15073 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015074fi
15075
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015076fi
15077
Matthias Kloseb9621712010-04-24 17:59:49 +000015078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15079$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015080if test "$ac_cv_broken_nice" = yes
15081then
Martin v. Löwis11437992002-04-12 09:54:03 +000015082
Matthias Kloseb9621712010-04-24 17:59:49 +000015083$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015084
15085fi
15086
Matthias Kloseb9621712010-04-24 17:59:49 +000015087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15088$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015089if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015090 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015091else
Matthias Kloseb9621712010-04-24 17:59:49 +000015092 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015093 ac_cv_broken_poll=no
15094else
Matthias Kloseb9621712010-04-24 17:59:49 +000015095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015096/* end confdefs.h. */
15097
15098#include <poll.h>
15099
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015100int main()
15101{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015102 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015103 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015104
15105 close (42);
15106
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015107 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015108 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015109 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015110 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015111 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015112 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015113 return 1;
15114}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015115
15116_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015117if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015118 ac_cv_broken_poll=yes
15119else
Matthias Kloseb9621712010-04-24 17:59:49 +000015120 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015121fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15123 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015124fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015125
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015126fi
15127
Matthias Kloseb9621712010-04-24 17:59:49 +000015128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15129$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015130if test "$ac_cv_broken_poll" = yes
15131then
15132
Matthias Kloseb9621712010-04-24 17:59:49 +000015133$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015134
15135fi
15136
Brett Cannon43802422005-02-10 20:48:03 +000015137# 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 +000015138# (which is not required by ISO C or UNIX spec) and/or if we support
15139# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015140ac_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 +000015141#include <$ac_cv_struct_tm>
15142
Matthias Kloseb9621712010-04-24 17:59:49 +000015143"
Victor Stinnere0be4232011-10-25 13:06:09 +020015144if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015145
15146cat >>confdefs.h <<_ACEOF
15147#define HAVE_STRUCT_TM_TM_ZONE 1
15148_ACEOF
15149
15150
15151fi
15152
15153if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15154
Matthias Kloseb9621712010-04-24 17:59:49 +000015155$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015156
15157else
Matthias Kloseb9621712010-04-24 17:59:49 +000015158 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15159"
Victor Stinnere0be4232011-10-25 13:06:09 +020015160if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015161 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162else
Matthias Kloseb9621712010-04-24 17:59:49 +000015163 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164fi
15165
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015166cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015167#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168_ACEOF
15169
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15171$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015172if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015173 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015174else
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015176/* end confdefs.h. */
15177#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015178#if !HAVE_DECL_TZNAME
15179extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015180#endif
15181
15182int
15183main ()
15184{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015186 ;
15187 return 0;
15188}
15189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015190if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015191 ac_cv_var_tzname=yes
15192else
Matthias Kloseb9621712010-04-24 17:59:49 +000015193 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015195rm -f core conftest.err conftest.$ac_objext \
15196 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15199$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015200 if test $ac_cv_var_tzname = yes; then
15201
Matthias Kloseb9621712010-04-24 17:59:49 +000015202$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015203
15204 fi
15205fi
15206
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015207
Martin v. Löwis1d459062005-03-14 21:23:33 +000015208# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15210$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015211if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015212 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015213else
15214
Matthias Kloseb9621712010-04-24 17:59:49 +000015215if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015216 ac_cv_working_tzset=no
15217else
Matthias Kloseb9621712010-04-24 17:59:49 +000015218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015219/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015220
15221#include <stdlib.h>
15222#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015223#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015224
15225#if HAVE_TZNAME
15226extern char *tzname[];
15227#endif
15228
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015229int main()
15230{
Brett Cannon18367812003-09-19 00:59:16 +000015231 /* Note that we need to ensure that not only does tzset(3)
15232 do 'something' with localtime, but it works as documented
15233 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015234 This includes making sure that tzname is set properly if
15235 tm->tm_zone does not exist since it is the alternative way
15236 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015237
15238 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015239 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015240 */
15241
Martin v. Löwis1d459062005-03-14 21:23:33 +000015242 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015243 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15244
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015245 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015246 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015247 if (localtime(&groundhogday)->tm_hour != 0)
15248 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015249#if HAVE_TZNAME
15250 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15251 if (strcmp(tzname[0], "UTC") ||
15252 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15253 exit(1);
15254#endif
Brett Cannon18367812003-09-19 00:59:16 +000015255
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015256 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015257 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015258 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015259 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015260#if HAVE_TZNAME
15261 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15262 exit(1);
15263#endif
Brett Cannon18367812003-09-19 00:59:16 +000015264
15265 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15266 tzset();
15267 if (localtime(&groundhogday)->tm_hour != 11)
15268 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015269#if HAVE_TZNAME
15270 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15271 exit(1);
15272#endif
15273
15274#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015275 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15276 exit(1);
15277 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15278 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015279#endif
Brett Cannon18367812003-09-19 00:59:16 +000015280
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015281 exit(0);
15282}
15283
15284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015285if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015286 ac_cv_working_tzset=yes
15287else
Matthias Kloseb9621712010-04-24 17:59:49 +000015288 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015289fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015290rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15291 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015292fi
15293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015294fi
15295
Matthias Kloseb9621712010-04-24 17:59:49 +000015296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15297$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015298if test "$ac_cv_working_tzset" = yes
15299then
15300
Matthias Kloseb9621712010-04-24 17:59:49 +000015301$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015302
15303fi
15304
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015305# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15307$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015308if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015309 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015310else
Matthias Kloseb9621712010-04-24 17:59:49 +000015311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015312/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015313#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015314int
15315main ()
15316{
15317
15318struct stat st;
15319st.st_mtim.tv_nsec = 1;
15320
15321 ;
15322 return 0;
15323}
15324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015325if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015326 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015327else
Matthias Kloseb9621712010-04-24 17:59:49 +000015328 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015329fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15331fi
15332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15334$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015335if test "$ac_cv_stat_tv_nsec" = yes
15336then
15337
Matthias Kloseb9621712010-04-24 17:59:49 +000015338$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015339
15340fi
15341
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015342# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15344$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015345if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015346 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015347else
Matthias Kloseb9621712010-04-24 17:59:49 +000015348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015349/* end confdefs.h. */
15350#include <sys/stat.h>
15351int
15352main ()
15353{
15354
15355struct stat st;
15356st.st_mtimespec.tv_nsec = 1;
15357
15358 ;
15359 return 0;
15360}
15361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015362if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015363 ac_cv_stat_tv_nsec2=yes
15364else
Matthias Kloseb9621712010-04-24 17:59:49 +000015365 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15368fi
15369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15371$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015372if test "$ac_cv_stat_tv_nsec2" = yes
15373then
15374
Matthias Kloseb9621712010-04-24 17:59:49 +000015375$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015376
15377fi
15378
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015379# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015380ac_save_cppflags="$CPPFLAGS"
15381CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015382
15383for ac_header in curses.h ncurses.h
15384do :
15385 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15386ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15387if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15388 cat >>confdefs.h <<_ACEOF
15389#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15390_ACEOF
15391
15392fi
15393
15394done
15395
15396
15397# On Solaris, term.h requires curses.h
15398for ac_header in term.h
15399do :
15400 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15401#ifdef HAVE_CURSES_H
15402#include <curses.h>
15403#endif
15404
15405"
15406if test "x$ac_cv_header_term_h" = xyes; then :
15407 cat >>confdefs.h <<_ACEOF
15408#define HAVE_TERM_H 1
15409_ACEOF
15410
15411fi
15412
15413done
15414
15415
Jack Jansen666b1e72001-10-31 12:11:48 +000015416# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15418$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015419if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015420 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015421else
Matthias Kloseb9621712010-04-24 17:59:49 +000015422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015423/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015424#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015425int
15426main ()
15427{
Jack Jansen666b1e72001-10-31 12:11:48 +000015428
15429 int rtn;
15430 rtn = mvwdelch(0,0,0);
15431
Martin v. Löwis11437992002-04-12 09:54:03 +000015432 ;
15433 return 0;
15434}
15435_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015436if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015437 ac_cv_mvwdelch_is_expression=yes
15438else
Matthias Kloseb9621712010-04-24 17:59:49 +000015439 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15442fi
15443
Matthias Kloseb9621712010-04-24 17:59:49 +000015444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15445$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015446
15447if test "$ac_cv_mvwdelch_is_expression" = yes
15448then
Martin v. Löwis11437992002-04-12 09:54:03 +000015449
Matthias Kloseb9621712010-04-24 17:59:49 +000015450$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015451
15452fi
15453
Matthias Kloseb9621712010-04-24 17:59:49 +000015454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15455$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015456if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015457 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015458else
Matthias Kloseb9621712010-04-24 17:59:49 +000015459 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015460/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015461#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015462int
15463main ()
15464{
Jack Jansen666b1e72001-10-31 12:11:48 +000015465
15466 WINDOW *w;
15467 w->_flags = 0;
15468
Martin v. Löwis11437992002-04-12 09:54:03 +000015469 ;
15470 return 0;
15471}
15472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015473if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015474 ac_cv_window_has_flags=yes
15475else
Matthias Kloseb9621712010-04-24 17:59:49 +000015476 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15479fi
15480
Matthias Kloseb9621712010-04-24 17:59:49 +000015481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15482$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015483
Jack Jansen666b1e72001-10-31 12:11:48 +000015484
15485if test "$ac_cv_window_has_flags" = yes
15486then
Martin v. Löwis11437992002-04-12 09:54:03 +000015487
Matthias Kloseb9621712010-04-24 17:59:49 +000015488$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015489
15490fi
15491
Matthias Kloseb9621712010-04-24 17:59:49 +000015492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15493$as_echo_n "checking for is_term_resized... " >&6; }
15494cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015495/* end confdefs.h. */
15496#include <curses.h>
15497int
15498main ()
15499{
15500void *x=is_term_resized
15501 ;
15502 return 0;
15503}
15504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015505if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015506
Matthias Kloseb9621712010-04-24 17:59:49 +000015507$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015508
Matthias Kloseb159a552010-04-25 21:00:44 +000015509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015510$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015511else
Matthias Kloseb9621712010-04-24 17:59:49 +000015512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15513$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015514
15515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15517
Matthias Kloseb9621712010-04-24 17:59:49 +000015518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15519$as_echo_n "checking for resize_term... " >&6; }
15520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015521/* end confdefs.h. */
15522#include <curses.h>
15523int
15524main ()
15525{
15526void *x=resize_term
15527 ;
15528 return 0;
15529}
15530_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015531if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015532
Matthias Kloseb9621712010-04-24 17:59:49 +000015533$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015534
Matthias Kloseb159a552010-04-25 21:00:44 +000015535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015536$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015537else
Matthias Kloseb9621712010-04-24 17:59:49 +000015538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15539$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015540
15541fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15543
Matthias Kloseb9621712010-04-24 17:59:49 +000015544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15545$as_echo_n "checking for resizeterm... " >&6; }
15546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015547/* end confdefs.h. */
15548#include <curses.h>
15549int
15550main ()
15551{
15552void *x=resizeterm
15553 ;
15554 return 0;
15555}
15556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015557if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015558
Matthias Kloseb9621712010-04-24 17:59:49 +000015559$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015560
Matthias Kloseb159a552010-04-25 21:00:44 +000015561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015562$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015563else
Matthias Kloseb9621712010-04-24 17:59:49 +000015564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15565$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015566
15567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015569# last curses configure check
15570CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015571
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15573$as_echo "$as_me: checking for device files" >&6;}
15574
15575if test "x$cross_compiling" = xyes; then
15576 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15578$as_echo_n "checking for /dev/ptmx... " >&6; }
15579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15580$as_echo "not set" >&6; }
15581 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15582 fi
15583 if test "${ac_cv_file__dev_ptc+set}" != set; then
15584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15585$as_echo_n "checking for /dev/ptc... " >&6; }
15586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15587$as_echo "not set" >&6; }
15588 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15589 fi
15590fi
15591
Matthias Kloseb9621712010-04-24 17:59:49 +000015592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15593$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015594if ${ac_cv_file__dev_ptmx+:} false; then :
15595 $as_echo_n "(cached) " >&6
15596else
15597 test "$cross_compiling" = yes &&
15598 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15599if test -r "/dev/ptmx"; then
15600 ac_cv_file__dev_ptmx=yes
15601else
15602 ac_cv_file__dev_ptmx=no
15603fi
15604fi
15605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15606$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15607if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015608
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015609fi
15610
15611if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015612
Matthias Kloseb9621712010-04-24 17:59:49 +000015613$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015614
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015615fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15617$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015618if ${ac_cv_file__dev_ptc+:} false; then :
15619 $as_echo_n "(cached) " >&6
15620else
15621 test "$cross_compiling" = yes &&
15622 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15623if test -r "/dev/ptc"; then
15624 ac_cv_file__dev_ptc=yes
15625else
15626 ac_cv_file__dev_ptc=no
15627fi
15628fi
15629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15630$as_echo "$ac_cv_file__dev_ptc" >&6; }
15631if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015632
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015633fi
15634
15635if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015636
Matthias Kloseb9621712010-04-24 17:59:49 +000015637$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015638
Neal Norwitz865400f2003-03-21 01:42:58 +000015639fi
15640
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015642$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015643if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015644 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015645else
Matthias Kloseb9621712010-04-24 17:59:49 +000015646 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015647 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015648if test x$GCC = xyes; then
15649save_CFLAGS=$CFLAGS
15650CFLAGS="$CFLAGS -Werror -Wformat"
15651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015652/* end confdefs.h. */
15653
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015654#include <stdio.h>
15655#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015656
15657int
15658main ()
15659{
15660
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015661char *buffer;
15662sprintf(buffer, "%lld", (long long)123);
15663sprintf(buffer, "%lld", (long long)-123);
15664sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015665
15666 ;
15667 return 0;
15668}
15669_ACEOF
15670if ac_fn_c_try_compile "$LINENO"; then :
15671 ac_cv_have_long_long_format=yes
15672
15673fi
15674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015675CFLAGS=$save_CFLAGS
15676fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015677else
Matthias Kloseb9621712010-04-24 17:59:49 +000015678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015679/* end confdefs.h. */
15680
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015681#include <stdio.h>
15682#include <stddef.h>
15683#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015684
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015685#ifdef HAVE_SYS_TYPES_H
15686#include <sys/types.h>
15687#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015688
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015689int main()
15690{
15691char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015692
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015693if (sprintf(buffer, "%lld", (long long)123) < 0)
15694return 1;
15695if (strcmp(buffer, "123"))
15696return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015697
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015698if (sprintf(buffer, "%lld", (long long)-123) < 0)
15699return 1;
15700if (strcmp(buffer, "-123"))
15701return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015702
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015703if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15704return 1;
15705if (strcmp(buffer, "123"))
15706return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015707
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015708return 0;
15709}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015710
15711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015712if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015713 ac_cv_have_long_long_format=yes
15714else
Matthias Kloseb9621712010-04-24 17:59:49 +000015715 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015719fi
15720
15721
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015722fi
15723
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015725$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015726
Mark Dickinson89d7d412009-12-31 20:50:59 +000015727if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015728then
15729
Matthias Kloseb9621712010-04-24 17:59:49 +000015730$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015731
15732fi
15733
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015734if test $ac_sys_system = Darwin
15735then
15736 LIBS="$LIBS -framework CoreFoundation"
15737fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015738
Matthias Kloseb9621712010-04-24 17:59:49 +000015739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15740$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015741if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015742 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015743else
Matthias Kloseb9621712010-04-24 17:59:49 +000015744 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015745 ac_cv_have_size_t_format="cross -- assuming yes"
15746
Thomas Wouters477c8d52006-05-27 19:21:47 +000015747else
Matthias Kloseb9621712010-04-24 17:59:49 +000015748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015749/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015750
Thomas Wouters477c8d52006-05-27 19:21:47 +000015751#include <stdio.h>
15752#include <stddef.h>
15753#include <string.h>
15754
Christian Heimes2c181612007-12-17 20:04:13 +000015755#ifdef HAVE_SYS_TYPES_H
15756#include <sys/types.h>
15757#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015758
15759#ifdef HAVE_SSIZE_T
15760typedef ssize_t Py_ssize_t;
15761#elif SIZEOF_VOID_P == SIZEOF_LONG
15762typedef long Py_ssize_t;
15763#else
15764typedef int Py_ssize_t;
15765#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015766
Christian Heimes2c181612007-12-17 20:04:13 +000015767int main()
15768{
15769 char buffer[256];
15770
Thomas Wouters477c8d52006-05-27 19:21:47 +000015771 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15772 return 1;
15773
Thomas Wouters89f507f2006-12-13 04:49:30 +000015774 if (strcmp(buffer, "123"))
15775 return 1;
15776
15777 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15778 return 1;
15779
15780 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015781 return 1;
15782
15783 return 0;
15784}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015785
Thomas Wouters477c8d52006-05-27 19:21:47 +000015786_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015787if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015788 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015789else
Matthias Kloseb9621712010-04-24 17:59:49 +000015790 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015791fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015792rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15793 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015794fi
15795
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15798$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015799if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015800
Matthias Kloseb9621712010-04-24 17:59:49 +000015801$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015802
15803fi
15804
Matthias Kloseb9621712010-04-24 17:59:49 +000015805ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015806#ifdef HAVE_SYS_TYPES_H
15807#include <sys/types.h>
15808#endif
15809#ifdef HAVE_SYS_SOCKET_H
15810#include <sys/socket.h>
15811#endif
15812
Matthias Kloseb9621712010-04-24 17:59:49 +000015813"
Victor Stinnere0be4232011-10-25 13:06:09 +020015814if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015817
Matthias Kloseb9621712010-04-24 17:59:49 +000015818$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015819
15820fi
15821
Michael W. Hudson54241132001-12-07 15:38:26 +000015822
Matthias Kloseb9621712010-04-24 17:59:49 +000015823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15824$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015825if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015826 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015827else
Matthias Kloseb9621712010-04-24 17:59:49 +000015828 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015829 ac_cv_broken_mbstowcs=no
15830else
Matthias Kloseb9621712010-04-24 17:59:49 +000015831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015832/* end confdefs.h. */
15833
Stefan Krah19c21392012-11-22 23:47:32 +010015834#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015835#include<stdlib.h>
15836int main() {
15837 size_t len = -1;
15838 const char *str = "text";
15839 len = mbstowcs(NULL, str, 0);
15840 return (len != 4);
15841}
15842
15843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015844if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015845 ac_cv_broken_mbstowcs=no
15846else
Matthias Kloseb9621712010-04-24 17:59:49 +000015847 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015848fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15850 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015851fi
15852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015853fi
15854
Matthias Kloseb9621712010-04-24 17:59:49 +000015855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15856$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015857if test "$ac_cv_broken_mbstowcs" = yes
15858then
15859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015861
15862fi
15863
Antoine Pitroub52ec782009-01-25 16:34:23 +000015864# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15866$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015867
15868# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015869if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015870 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015871if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015872then
15873
Matthias Kloseb9621712010-04-24 17:59:49 +000015874$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015875
Matthias Kloseb9621712010-04-24 17:59:49 +000015876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15877$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015878fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015879if test "$withval" = no
15880then
15881
15882$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15883
Matthias Kloseb9621712010-04-24 17:59:49 +000015884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15885$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015886fi
15887
Antoine Pitrou042b1282010-08-13 21:15:58 +000015888else
15889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15890$as_echo "no value specified" >&6; }
15891fi
15892
Antoine Pitroub52ec782009-01-25 16:34:23 +000015893
Matthias Kloseb17289e2012-03-15 19:51:34 +010015894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15895$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15896if ${ac_cv_computed_gotos+:} false; then :
15897 $as_echo_n "(cached) " >&6
15898else
15899 if test "$cross_compiling" = yes; then :
15900 if test "${with_computed_gotos+set}" = set; then
15901 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15902 else
15903 ac_cv_computed_gotos=no
15904 fi
15905else
15906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15907/* end confdefs.h. */
15908
15909int main(int argc, char **argv)
15910{
15911 static void *targets[1] = { &&LABEL1 };
15912 goto LABEL2;
15913LABEL1:
15914 return 0;
15915LABEL2:
15916 goto *targets[0];
15917 return 1;
15918}
15919
15920_ACEOF
15921if ac_fn_c_try_run "$LINENO"; then :
15922 ac_cv_computed_gotos=yes
15923else
15924 ac_cv_computed_gotos=no
15925fi
15926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15927 conftest.$ac_objext conftest.beam conftest.$ac_ext
15928fi
15929
15930fi
15931
15932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15933$as_echo "$ac_cv_computed_gotos" >&6; }
15934case "$ac_cv_computed_gotos" in yes*)
15935
15936$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15937
15938esac
15939
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015940case $ac_sys_system in
15941AIX*)
15942
15943$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15944 ;;
15945esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015946
Michael W. Hudson54241132001-12-07 15:38:26 +000015947
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015948
15949
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015950for h in `(cd $srcdir;echo Python/thread_*.h)`
15951do
15952 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15953done
15954
Michael W. Hudson54241132001-12-07 15:38:26 +000015955
Ned Deily0db50cf2014-07-25 12:41:31 -070015956SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15958$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015959for dir in $SRCDIRS; do
15960 if test ! -d $dir; then
15961 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015962 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015963done
Matthias Kloseb9621712010-04-24 17:59:49 +000015964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15965$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015966
Stefan Krah1919b7e2012-03-21 18:25:23 +010015967# Availability of -O2:
15968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15969$as_echo_n "checking for -O2... " >&6; }
15970saved_cflags="$CFLAGS"
15971CFLAGS="-O2"
15972cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15973/* end confdefs.h. */
15974
15975int
15976main ()
15977{
15978
15979
15980 ;
15981 return 0;
15982}
15983_ACEOF
15984if ac_fn_c_try_compile "$LINENO"; then :
15985 have_O2=yes
15986else
15987 have_O2=no
15988fi
15989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15991$as_echo "$have_O2" >&6; }
15992CFLAGS="$saved_cflags"
15993
15994# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15995# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15997$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15998saved_cflags="$CFLAGS"
15999CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16000if test "$have_O2" = no; then
16001 CFLAGS=""
16002fi
16003if test "$cross_compiling" = yes; then :
16004 have_glibc_memmove_bug=undefined
16005else
16006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16007/* end confdefs.h. */
16008
16009#include <stdio.h>
16010#include <stdlib.h>
16011#include <string.h>
16012void foo(void *p, void *q) { memmove(p, q, 19); }
16013int main() {
16014 char a[32] = "123456789000000000";
16015 foo(&a[9], a);
16016 if (strcmp(a, "123456789123456789000000000") != 0)
16017 return 1;
16018 foo(a, &a[9]);
16019 if (strcmp(a, "123456789000000000") != 0)
16020 return 1;
16021 return 0;
16022}
16023
16024_ACEOF
16025if ac_fn_c_try_run "$LINENO"; then :
16026 have_glibc_memmove_bug=no
16027else
16028 have_glibc_memmove_bug=yes
16029fi
16030rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16031 conftest.$ac_objext conftest.beam conftest.$ac_ext
16032fi
16033
16034CFLAGS="$saved_cflags"
16035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16036$as_echo "$have_glibc_memmove_bug" >&6; }
16037if test "$have_glibc_memmove_bug" = yes; then
16038
16039$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16040
16041fi
16042
16043if test "$have_gcc_asm_for_x87" = yes; then
16044 # Some versions of gcc miscompile inline asm:
16045 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16046 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16047 case $CC in
16048 *gcc*)
16049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16050$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16051 saved_cflags="$CFLAGS"
16052 CFLAGS="-O2"
16053 if test "$cross_compiling" = yes; then :
16054 have_ipa_pure_const_bug=undefined
16055else
16056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16057/* end confdefs.h. */
16058
16059 __attribute__((noinline)) int
16060 foo(int *p) {
16061 int r;
16062 asm ( "movl \$6, (%1)\n\t"
16063 "xorl %0, %0\n\t"
16064 : "=r" (r) : "r" (p) : "memory"
16065 );
16066 return r;
16067 }
16068 int main() {
16069 int p = 8;
16070 if ((foo(&p) ? : p) != 6)
16071 return 1;
16072 return 0;
16073 }
16074
16075_ACEOF
16076if ac_fn_c_try_run "$LINENO"; then :
16077 have_ipa_pure_const_bug=no
16078else
16079 have_ipa_pure_const_bug=yes
16080fi
16081rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16082 conftest.$ac_objext conftest.beam conftest.$ac_ext
16083fi
16084
16085 CFLAGS="$saved_cflags"
16086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16087$as_echo "$have_ipa_pure_const_bug" >&6; }
16088 if test "$have_ipa_pure_const_bug" = yes; then
16089
16090$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16091
16092 fi
16093 ;;
16094 esac
16095fi
16096
Victor Stinner4f5366e2015-01-09 02:13:19 +010016097# Check for stdatomic.h
16098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16099$as_echo_n "checking for stdatomic.h... " >&6; }
16100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16101/* end confdefs.h. */
16102
16103
16104 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016105 atomic_int value = ATOMIC_VAR_INIT(1);
16106 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016107 int main() {
16108 int loaded_value = atomic_load(&value);
16109 return 0;
16110 }
16111
16112
16113_ACEOF
16114if ac_fn_c_try_link "$LINENO"; then :
16115 have_stdatomic_h=yes
16116else
16117 have_stdatomic_h=no
16118fi
16119rm -f core conftest.err conftest.$ac_objext \
16120 conftest$ac_exeext conftest.$ac_ext
16121
16122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16123$as_echo "$have_stdatomic_h" >&6; }
16124
16125if test "$have_stdatomic_h" = yes; then
16126
16127$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16128
16129fi
16130
16131# Check for GCC >= 4.7 __atomic builtins
16132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16133$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16135/* end confdefs.h. */
16136
16137
16138 volatile int val = 1;
16139 int main() {
16140 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16141 return 0;
16142 }
16143
16144
16145_ACEOF
16146if ac_fn_c_try_link "$LINENO"; then :
16147 have_builtin_atomic=yes
16148else
16149 have_builtin_atomic=no
16150fi
16151rm -f core conftest.err conftest.$ac_objext \
16152 conftest$ac_exeext conftest.$ac_ext
16153
16154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16155$as_echo "$have_builtin_atomic" >&6; }
16156
16157if test "$have_builtin_atomic" = yes; then
16158
16159$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16160
16161fi
16162
Ned Deily322f5ba2013-11-21 23:01:59 -080016163# ensurepip option
16164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16165$as_echo_n "checking for ensurepip... " >&6; }
16166
16167# Check whether --with-ensurepip was given.
16168if test "${with_ensurepip+set}" = set; then :
16169 withval=$with_ensurepip;
16170else
16171 with_ensurepip=upgrade
16172fi
16173
16174case $with_ensurepip in #(
16175 yes|upgrade) :
16176 ENSUREPIP=upgrade ;; #(
16177 install) :
16178 ENSUREPIP=install ;; #(
16179 no) :
16180 ENSUREPIP=no ;; #(
16181 *) :
16182 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16183esac
16184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16185$as_echo "$ENSUREPIP" >&6; }
16186
16187
Victor Stinner35a97c02015-03-08 02:59:09 +010016188# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16190$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16191cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16192/* end confdefs.h. */
16193
16194
16195 #include <dirent.h>
16196
16197 int main() {
16198 struct dirent entry;
16199 return entry.d_type == DT_UNKNOWN;
16200 }
16201
16202
16203_ACEOF
16204if ac_fn_c_try_link "$LINENO"; then :
16205 have_dirent_d_type=yes
16206else
16207 have_dirent_d_type=no
16208fi
16209rm -f core conftest.err conftest.$ac_objext \
16210 conftest$ac_exeext conftest.$ac_ext
16211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16212$as_echo "$have_dirent_d_type" >&6; }
16213
16214if test "$have_dirent_d_type" = yes; then
16215
16216$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16217
16218fi
16219
Victor Stinner9eb57c52015-03-19 22:21:49 +010016220# check if the Linux getrandom() syscall is available
16221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16222$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16224/* end confdefs.h. */
16225
16226
Victor Stinner1b80b242016-04-12 22:34:58 +020016227 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016228 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016229 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016230
16231 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016232 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016233 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016234 const int flags = GRND_NONBLOCK;
16235 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016236 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016237 return 0;
16238 }
16239
16240
16241_ACEOF
16242if ac_fn_c_try_link "$LINENO"; then :
16243 have_getrandom_syscall=yes
16244else
16245 have_getrandom_syscall=no
16246fi
16247rm -f core conftest.err conftest.$ac_objext \
16248 conftest$ac_exeext conftest.$ac_ext
16249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16250$as_echo "$have_getrandom_syscall" >&6; }
16251
16252if test "$have_getrandom_syscall" = yes; then
16253
16254$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16255
16256fi
16257
Victor Stinner3abf44e2015-09-18 15:38:37 +020016258# check if the getrandom() function is available
16259# the test was written for the Solaris function of <sys/random.h>
16260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16261$as_echo_n "checking for the getrandom() function... " >&6; }
16262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16263/* end confdefs.h. */
16264
16265
16266 #include <sys/random.h>
16267
16268 int main() {
16269 char buffer[1];
16270 const size_t buflen = sizeof(buffer);
16271 const int flags = 0;
16272 /* ignore the result, Python checks for ENOSYS at runtime */
16273 (void)getrandom(buffer, buflen, flags);
16274 return 0;
16275 }
16276
16277
16278_ACEOF
16279if ac_fn_c_try_link "$LINENO"; then :
16280 have_getrandom=yes
16281else
16282 have_getrandom=no
16283fi
16284rm -f core conftest.err conftest.$ac_objext \
16285 conftest$ac_exeext conftest.$ac_ext
16286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16287$as_echo "$have_getrandom" >&6; }
16288
16289if test "$have_getrandom" = yes; then
16290
16291$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16292
16293fi
16294
Guido van Rossum627b2d71993-12-24 10:39:16 +000016295# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016296ac_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 +000016297
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016298ac_config_files="$ac_config_files Modules/ld_so_aix"
16299
Martin v. Löwis11437992002-04-12 09:54:03 +000016300cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016301# This file is a shell script that caches the results of configure
16302# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016303# scripts and configure runs, see configure's option --config-cache.
16304# It is not useful on other systems. If it contains results you don't
16305# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016306#
Martin v. Löwis11437992002-04-12 09:54:03 +000016307# config.status only pays attention to the cache file if you give it
16308# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016309#
Skip Montanaro6dead952003-09-25 14:50:04 +000016310# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016311# loading this file, other *unset* `ac_cv_foo' will be assigned the
16312# following values.
16313
16314_ACEOF
16315
Guido van Rossumf78abae1997-01-21 22:02:36 +000016316# The following way of writing the cache mishandles newlines in values,
16317# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016318# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016319# Ultrix sh set writes to stderr and can't be redirected directly,
16320# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321(
16322 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16323 eval ac_val=\$$ac_var
16324 case $ac_val in #(
16325 *${as_nl}*)
16326 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016327 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16328$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016329 esac
16330 case $ac_var in #(
16331 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016332 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16333 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016334 esac ;;
16335 esac
16336 done
16337
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16340 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016341 # `set' does not quote correctly, so add quotes: double-quote
16342 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016343 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016344 "s/'/'\\\\''/g;
16345 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016346 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 *)
16348 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351 esac |
16352 sort
16353) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016354 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016358 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16359 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016360 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16361 :end' >>confcache
16362if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16363 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016364 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016365 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16366$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016367 if test ! -f "$cache_file" || test -h "$cache_file"; then
16368 cat confcache >"$cache_file"
16369 else
16370 case $cache_file in #(
16371 */* | ?:*)
16372 mv -f confcache "$cache_file"$$ &&
16373 mv -f "$cache_file"$$ "$cache_file" ;; #(
16374 *)
16375 mv -f confcache "$cache_file" ;;
16376 esac
16377 fi
16378 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016379 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016380 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16381$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016382 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016383fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016384rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016385
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016386test "x$prefix" = xNONE && prefix=$ac_default_prefix
16387# Let make expand exec_prefix.
16388test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016389
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016390DEFS=-DHAVE_CONFIG_H
16391
Skip Montanaro6dead952003-09-25 14:50:04 +000016392ac_libobjs=
16393ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016394U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016395for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16396 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016398 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16400 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016401 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16402 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016403done
16404LIBOBJS=$ac_libobjs
16405
16406LTLIBOBJS=$ac_ltlibobjs
16407
16408
Martin v. Löwis11437992002-04-12 09:54:03 +000016409
Matthias Kloseb9621712010-04-24 17:59:49 +000016410
Victor Stinnere0be4232011-10-25 13:06:09 +020016411: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016412ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016413ac_clean_files_save=$ac_clean_files
16414ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016415{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16416$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16417as_write_fail=0
16418cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016419#! $SHELL
16420# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016421# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016422# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016423# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016424
Martin v. Löwis11437992002-04-12 09:54:03 +000016425debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016426ac_cs_recheck=false
16427ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016428
Matthias Kloseb9621712010-04-24 17:59:49 +000016429SHELL=\${CONFIG_SHELL-$SHELL}
16430export SHELL
16431_ASEOF
16432cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16433## -------------------- ##
16434## M4sh Initialization. ##
16435## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016437# Be more Bourne compatible
16438DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016439if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016440 emulate sh
16441 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016442 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016443 # is contrary to our usage. Disable this feature.
16444 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016445 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016446else
Matthias Kloseb9621712010-04-24 17:59:49 +000016447 case `(set -o) 2>/dev/null` in #(
16448 *posix*) :
16449 set -o posix ;; #(
16450 *) :
16451 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016453fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016454
16455
Matthias Kloseb9621712010-04-24 17:59:49 +000016456as_nl='
16457'
16458export as_nl
16459# Printing a long string crashes Solaris 7 /usr/bin/printf.
16460as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16461as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16462as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16463# Prefer a ksh shell builtin over an external printf program on Solaris,
16464# but without wasting forks for bash or zsh.
16465if test -z "$BASH_VERSION$ZSH_VERSION" \
16466 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16467 as_echo='print -r --'
16468 as_echo_n='print -rn --'
16469elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16470 as_echo='printf %s\n'
16471 as_echo_n='printf %s'
16472else
16473 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16474 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16475 as_echo_n='/usr/ucb/echo -n'
16476 else
16477 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16478 as_echo_n_body='eval
16479 arg=$1;
16480 case $arg in #(
16481 *"$as_nl"*)
16482 expr "X$arg" : "X\\(.*\\)$as_nl";
16483 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16484 esac;
16485 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16486 '
16487 export as_echo_n_body
16488 as_echo_n='sh -c $as_echo_n_body as_echo'
16489 fi
16490 export as_echo_body
16491 as_echo='sh -c $as_echo_body as_echo'
16492fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016493
16494# The user is always right.
16495if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016496 PATH_SEPARATOR=:
16497 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16498 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16499 PATH_SEPARATOR=';'
16500 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016501fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016503
16504# IFS
16505# We need space, tab and new line, in precisely that order. Quoting is
16506# there to prevent editors from complaining about space-tab.
16507# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16508# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509IFS=" "" $as_nl"
16510
16511# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016512as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016513case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016514 *[\\/]* ) as_myself=$0 ;;
16515 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016516for as_dir in $PATH
16517do
16518 IFS=$as_save_IFS
16519 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016520 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16521 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016522IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016524 ;;
16525esac
16526# We did not find ourselves, most probably we were run as `sh COMMAND'
16527# in which case we are not to be found in the path.
16528if test "x$as_myself" = x; then
16529 as_myself=$0
16530fi
16531if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016532 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16533 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016534fi
16535
Matthias Kloseb9621712010-04-24 17:59:49 +000016536# Unset variables that we do not need and which cause bugs (e.g. in
16537# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16538# suppresses any "Segmentation fault" message there. '((' could
16539# trigger a bug in pdksh 5.2.14.
16540for as_var in BASH_ENV ENV MAIL MAILPATH
16541do eval test x\${$as_var+set} = xset \
16542 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016543done
16544PS1='$ '
16545PS2='> '
16546PS4='+ '
16547
16548# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016549LC_ALL=C
16550export LC_ALL
16551LANGUAGE=C
16552export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016553
Matthias Kloseb9621712010-04-24 17:59:49 +000016554# CDPATH.
16555(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16556
16557
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016558# as_fn_error STATUS ERROR [LINENO LOG_FD]
16559# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016560# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16561# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016562# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016563as_fn_error ()
16564{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016565 as_status=$1; test $as_status -eq 0 && as_status=1
16566 if test "$4"; then
16567 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16568 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016569 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016570 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016571 as_fn_exit $as_status
16572} # as_fn_error
16573
16574
16575# as_fn_set_status STATUS
16576# -----------------------
16577# Set $? to STATUS, without forking.
16578as_fn_set_status ()
16579{
16580 return $1
16581} # as_fn_set_status
16582
16583# as_fn_exit STATUS
16584# -----------------
16585# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16586as_fn_exit ()
16587{
16588 set +e
16589 as_fn_set_status $1
16590 exit $1
16591} # as_fn_exit
16592
16593# as_fn_unset VAR
16594# ---------------
16595# Portably unset VAR.
16596as_fn_unset ()
16597{
16598 { eval $1=; unset $1;}
16599}
16600as_unset=as_fn_unset
16601# as_fn_append VAR VALUE
16602# ----------------------
16603# Append the text in VALUE to the end of the definition contained in VAR. Take
16604# advantage of any shell optimizations that allow amortized linear growth over
16605# repeated appends, instead of the typical quadratic growth present in naive
16606# implementations.
16607if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16608 eval 'as_fn_append ()
16609 {
16610 eval $1+=\$2
16611 }'
16612else
16613 as_fn_append ()
16614 {
16615 eval $1=\$$1\$2
16616 }
16617fi # as_fn_append
16618
16619# as_fn_arith ARG...
16620# ------------------
16621# Perform arithmetic evaluation on the ARGs, and store the result in the
16622# global $as_val. Take advantage of shells that can avoid forks. The arguments
16623# must be portable across $(()) and expr.
16624if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16625 eval 'as_fn_arith ()
16626 {
16627 as_val=$(( $* ))
16628 }'
16629else
16630 as_fn_arith ()
16631 {
16632 as_val=`expr "$@" || test $? -eq 1`
16633 }
16634fi # as_fn_arith
16635
16636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637if expr a : '\(a\)' >/dev/null 2>&1 &&
16638 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16639 as_expr=expr
16640else
16641 as_expr=false
16642fi
16643
16644if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16645 as_basename=basename
16646else
16647 as_basename=false
16648fi
16649
Matthias Kloseb9621712010-04-24 17:59:49 +000016650if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16651 as_dirname=dirname
16652else
16653 as_dirname=false
16654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016656as_me=`$as_basename -- "$0" ||
16657$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16658 X"$0" : 'X\(//\)$' \| \
16659 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016660$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016661 sed '/^.*\/\([^/][^/]*\)\/*$/{
16662 s//\1/
16663 q
16664 }
16665 /^X\/\(\/\/\)$/{
16666 s//\1/
16667 q
16668 }
16669 /^X\/\(\/\).*/{
16670 s//\1/
16671 q
16672 }
16673 s/.*/./; q'`
16674
Matthias Kloseb9621712010-04-24 17:59:49 +000016675# Avoid depending upon Character Ranges.
16676as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16677as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16678as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16679as_cr_digits='0123456789'
16680as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016681
16682ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016683case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016684-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016685 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016687 xy) ECHO_C='\c';;
16688 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16689 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016690 esac;;
16691*)
16692 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016693esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016694
Martin v. Löwis11437992002-04-12 09:54:03 +000016695rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016696if test -d conf$$.dir; then
16697 rm -f conf$$.dir/conf$$.file
16698else
16699 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016700 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016701fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016702if (echo >conf$$.file) 2>/dev/null; then
16703 if ln -s conf$$.file conf$$ 2>/dev/null; then
16704 as_ln_s='ln -s'
16705 # ... but there are two gotchas:
16706 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16707 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016708 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016709 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016710 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016711 elif ln conf$$.file conf$$ 2>/dev/null; then
16712 as_ln_s=ln
16713 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016714 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016715 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016716else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016717 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16720rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016721
Matthias Kloseb9621712010-04-24 17:59:49 +000016722
16723# as_fn_mkdir_p
16724# -------------
16725# Create "$as_dir" as a directory, including parents if necessary.
16726as_fn_mkdir_p ()
16727{
16728
16729 case $as_dir in #(
16730 -*) as_dir=./$as_dir;;
16731 esac
16732 test -d "$as_dir" || eval $as_mkdir_p || {
16733 as_dirs=
16734 while :; do
16735 case $as_dir in #(
16736 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16737 *) as_qdir=$as_dir;;
16738 esac
16739 as_dirs="'$as_qdir' $as_dirs"
16740 as_dir=`$as_dirname -- "$as_dir" ||
16741$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16742 X"$as_dir" : 'X\(//\)[^/]' \| \
16743 X"$as_dir" : 'X\(//\)$' \| \
16744 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16745$as_echo X"$as_dir" |
16746 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16747 s//\1/
16748 q
16749 }
16750 /^X\(\/\/\)[^/].*/{
16751 s//\1/
16752 q
16753 }
16754 /^X\(\/\/\)$/{
16755 s//\1/
16756 q
16757 }
16758 /^X\(\/\).*/{
16759 s//\1/
16760 q
16761 }
16762 s/.*/./; q'`
16763 test -d "$as_dir" && break
16764 done
16765 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016766 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016767
16768
16769} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016770if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016771 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016772else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016773 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016774 as_mkdir_p=false
16775fi
16776
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016777
16778# as_fn_executable_p FILE
16779# -----------------------
16780# Test if FILE is an executable regular file.
16781as_fn_executable_p ()
16782{
16783 test -f "$1" && test -x "$1"
16784} # as_fn_executable_p
16785as_test_x='test -x'
16786as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016787
16788# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016789as_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 +000016790
16791# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016792as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016793
16794
Martin v. Löwis11437992002-04-12 09:54:03 +000016795exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016796## ----------------------------------- ##
16797## Main body of $CONFIG_STATUS script. ##
16798## ----------------------------------- ##
16799_ASEOF
16800test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016801
Matthias Kloseb9621712010-04-24 17:59:49 +000016802cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16803# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016804# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016805# values after options handling.
16806ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016807This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016808generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016809
16810 CONFIG_FILES = $CONFIG_FILES
16811 CONFIG_HEADERS = $CONFIG_HEADERS
16812 CONFIG_LINKS = $CONFIG_LINKS
16813 CONFIG_COMMANDS = $CONFIG_COMMANDS
16814 $ $0 $@
16815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016816on `(hostname || uname -n) 2>/dev/null | sed 1q`
16817"
16818
Martin v. Löwis11437992002-04-12 09:54:03 +000016819_ACEOF
16820
Matthias Kloseb9621712010-04-24 17:59:49 +000016821case $ac_config_files in *"
16822"*) set x $ac_config_files; shift; ac_config_files=$*;;
16823esac
16824
16825case $ac_config_headers in *"
16826"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16827esac
16828
16829
16830cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016831# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016832config_files="$ac_config_files"
16833config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016834
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016835_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016836
Matthias Kloseb9621712010-04-24 17:59:49 +000016837cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016838ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016839\`$as_me' instantiates files and other configuration actions
16840from templates according to the current configuration. Unless the files
16841and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016842
Matthias Kloseb9621712010-04-24 17:59:49 +000016843Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016844
16845 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016846 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016847 --config print configuration, then exit
16848 -q, --quiet, --silent
16849 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016850 -d, --debug don't remove temporary files
16851 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016852 --file=FILE[:TEMPLATE]
16853 instantiate the configuration file FILE
16854 --header=FILE[:TEMPLATE]
16855 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016856
16857Configuration files:
16858$config_files
16859
16860Configuration headers:
16861$config_headers
16862
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016863Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016866cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16867ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016868ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016869python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016870configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016871 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016872
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016873Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016874This config.status script is free software; the Free Software Foundation
16875gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016876
16877ac_pwd='$ac_pwd'
16878srcdir='$srcdir'
16879INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016880MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016881test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016882_ACEOF
16883
Matthias Kloseb9621712010-04-24 17:59:49 +000016884cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16885# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016886ac_need_defaults=:
16887while test $# != 0
16888do
16889 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016890 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016891 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16892 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016893 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016895 --*=)
16896 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16897 ac_optarg=
16898 ac_shift=:
16899 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016900 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016901 ac_option=$1
16902 ac_optarg=$2
16903 ac_shift=shift
16904 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 esac
16906
Skip Montanaro6dead952003-09-25 14:50:04 +000016907 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016908 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016909 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16910 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016911 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016912 $as_echo "$ac_cs_version"; exit ;;
16913 --config | --confi | --conf | --con | --co | --c )
16914 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016915 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016916 debug=: ;;
16917 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016918 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016919 case $ac_optarg in
16920 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016921 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016922 esac
16923 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016924 ac_need_defaults=false;;
16925 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016926 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016927 case $ac_optarg in
16928 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16929 esac
16930 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016931 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016932 --he | --h)
16933 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016934 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016935Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016936 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016937 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016938 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16939 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16940 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016941
16942 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016943 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016944Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016945
Matthias Kloseb9621712010-04-24 17:59:49 +000016946 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016947 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016948
16949 esac
16950 shift
16951done
16952
Skip Montanaro6dead952003-09-25 14:50:04 +000016953ac_configure_extra_args=
16954
16955if $ac_cs_silent; then
16956 exec 6>/dev/null
16957 ac_configure_extra_args="$ac_configure_extra_args --silent"
16958fi
16959
16960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016961cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016962if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016963 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016964 shift
16965 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16966 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016968 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016969fi
16970
Martin v. Löwis11437992002-04-12 09:54:03 +000016971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016972cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016973exec 5>>config.log
16974{
16975 echo
16976 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16977## Running $as_me. ##
16978_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016979 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016980} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016981
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016982_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016983cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016984_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016985
Matthias Kloseb9621712010-04-24 17:59:49 +000016986cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987
16988# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016989for ac_config_target in $ac_config_targets
16990do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991 case $ac_config_target in
16992 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16993 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16994 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016995 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16996 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016997 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16998 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016999 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017000 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017001 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002
Victor Stinnere0be4232011-10-25 13:06:09 +020017003 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017004 esac
17005done
17006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007
Martin v. Löwis11437992002-04-12 09:54:03 +000017008# If the user did not use the arguments to specify the items to instantiate,
17009# then the envvar interface is used. Set only those that are not.
17010# We use the long form for the default assignment because of an extremely
17011# bizarre bug on SunOS 4.1.3.
17012if $ac_need_defaults; then
17013 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17014 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17015fi
17016
Skip Montanaro6dead952003-09-25 14:50:04 +000017017# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017018# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017019# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020# Hook for its removal unless debugging.
17021# Note that there is a small window in which the directory will not be cleaned:
17022# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017023$debug ||
17024{
Victor Stinnere0be4232011-10-25 13:06:09 +020017025 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017026 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017027 : "${ac_tmp:=$tmp}"
17028 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017029' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017030 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017031}
Martin v. Löwis11437992002-04-12 09:54:03 +000017032# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017033
Martin v. Löwis11437992002-04-12 09:54:03 +000017034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017036 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017037} ||
17038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017039 tmp=./conf$$-$RANDOM
17040 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017041} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017042ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017043
Matthias Kloseb9621712010-04-24 17:59:49 +000017044# Set up the scripts for CONFIG_FILES section.
17045# No need to generate them if there are no CONFIG_FILES.
17046# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017047if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017048
Matthias Kloseb9621712010-04-24 17:59:49 +000017049
17050ac_cr=`echo X | tr X '\015'`
17051# On cygwin, bash can eat \r inside `` if the user requested igncr.
17052# But we know of no other shell where ac_cr would be empty at this
17053# point, so we can use a bashism as a fallback.
17054if test "x$ac_cr" = x; then
17055 eval ac_cr=\$\'\\r\'
17056fi
17057ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17058if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017059 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017060else
17061 ac_cs_awk_cr=$ac_cr
17062fi
17063
Victor Stinnere0be4232011-10-25 13:06:09 +020017064echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017065_ACEOF
17066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067
Matthias Kloseb9621712010-04-24 17:59:49 +000017068{
17069 echo "cat >conf$$subs.awk <<_ACEOF" &&
17070 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17071 echo "_ACEOF"
17072} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017073 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17074ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017075ac_delim='%!_!# '
17076for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017077 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017078 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017079
Matthias Kloseb9621712010-04-24 17:59:49 +000017080 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17081 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017082 break
17083 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017084 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017085 else
17086 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088done
Matthias Kloseb9621712010-04-24 17:59:49 +000017089rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090
Matthias Kloseb9621712010-04-24 17:59:49 +000017091cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017092cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017094sed -n '
17095h
17096s/^/S["/; s/!.*/"]=/
17097p
17098g
17099s/^[^!]*!//
17100:repl
17101t repl
17102s/'"$ac_delim"'$//
17103t delim
17104:nl
17105h
17106s/\(.\{148\}\)..*/\1/
17107t more1
17108s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17109p
17110n
17111b repl
17112:more1
17113s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17114p
17115g
17116s/.\{148\}//
17117t nl
17118:delim
17119h
17120s/\(.\{148\}\)..*/\1/
17121t more2
17122s/["\\]/\\&/g; s/^/"/; s/$/"/
17123p
17124b
17125:more2
17126s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17127p
17128g
17129s/.\{148\}//
17130t delim
17131' <conf$$subs.awk | sed '
17132/^[^""]/{
17133 N
17134 s/\n//
17135}
17136' >>$CONFIG_STATUS || ac_write_fail=1
17137rm -f conf$$subs.awk
17138cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17139_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017140cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017141 for (key in S) S_is_set[key] = 1
17142 FS = ""
17143
17144}
17145{
17146 line = $ 0
17147 nfields = split(line, field, "@")
17148 substed = 0
17149 len = length(field[1])
17150 for (i = 2; i < nfields; i++) {
17151 key = field[i]
17152 keylen = length(key)
17153 if (S_is_set[key]) {
17154 value = S[key]
17155 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17156 len += length(value) + length(field[++i])
17157 substed = 1
17158 } else
17159 len += 1 + keylen
17160 }
17161
17162 print line
17163}
17164
17165_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017167cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17168if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17169 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17170else
17171 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017172fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017173 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017174_ACEOF
17175
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017176# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17177# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017178# trailing colons and then remove the whole line if VPATH becomes empty
17179# (actually we leave an empty line to preserve line numbers).
17180if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017181 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17182h
17183s///
17184s/^/:/
17185s/[ ]*$/:/
17186s/:\$(srcdir):/:/g
17187s/:\${srcdir}:/:/g
17188s/:@srcdir@:/:/g
17189s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017190s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017191x
17192s/\(=[ ]*\).*/\1/
17193G
17194s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195s/^[^=]*=[ ]*$//
17196}'
17197fi
17198
Matthias Kloseb9621712010-04-24 17:59:49 +000017199cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017200fi # test -n "$CONFIG_FILES"
17201
Matthias Kloseb9621712010-04-24 17:59:49 +000017202# Set up the scripts for CONFIG_HEADERS section.
17203# No need to generate them if there are no CONFIG_HEADERS.
17204# This happens for instance with `./config.status Makefile'.
17205if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017206cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017207BEGIN {
17208_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017209
Matthias Kloseb9621712010-04-24 17:59:49 +000017210# Transform confdefs.h into an awk script `defines.awk', embedded as
17211# here-document in config.status, that substitutes the proper values into
17212# config.h.in to produce config.h.
17213
17214# Create a delimiter string that does not exist in confdefs.h, to ease
17215# handling of long lines.
17216ac_delim='%!_!# '
17217for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017218 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17219 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017220 break
17221 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017222 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017223 else
17224 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17225 fi
17226done
17227
17228# For the awk script, D is an array of macro values keyed by name,
17229# likewise P contains macro parameters if any. Preserve backslash
17230# newline sequences.
17231
17232ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17233sed -n '
17234s/.\{148\}/&'"$ac_delim"'/g
17235t rset
17236:rset
17237s/^[ ]*#[ ]*define[ ][ ]*/ /
17238t def
17239d
17240:def
17241s/\\$//
17242t bsnl
17243s/["\\]/\\&/g
17244s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17245D["\1"]=" \3"/p
17246s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17247d
17248:bsnl
17249s/["\\]/\\&/g
17250s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17251D["\1"]=" \3\\\\\\n"\\/p
17252t cont
17253s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17254t cont
17255d
17256:cont
17257n
17258s/.\{148\}/&'"$ac_delim"'/g
17259t clear
17260:clear
17261s/\\$//
17262t bsnlc
17263s/["\\]/\\&/g; s/^/"/; s/$/"/p
17264d
17265:bsnlc
17266s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17267b cont
17268' <confdefs.h | sed '
17269s/'"$ac_delim"'/"\\\
17270"/g' >>$CONFIG_STATUS || ac_write_fail=1
17271
17272cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17273 for (key in D) D_is_set[key] = 1
17274 FS = ""
17275}
17276/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17277 line = \$ 0
17278 split(line, arg, " ")
17279 if (arg[1] == "#") {
17280 defundef = arg[2]
17281 mac1 = arg[3]
17282 } else {
17283 defundef = substr(arg[1], 2)
17284 mac1 = arg[2]
17285 }
17286 split(mac1, mac2, "(") #)
17287 macro = mac2[1]
17288 prefix = substr(line, 1, index(line, defundef) - 1)
17289 if (D_is_set[macro]) {
17290 # Preserve the white space surrounding the "#".
17291 print prefix "define", macro P[macro] D[macro]
17292 next
17293 } else {
17294 # Replace #undef with comments. This is necessary, for example,
17295 # in the case of _POSIX_SOURCE, which is predefined and required
17296 # on some systems where configure will not decide to define it.
17297 if (defundef == "undef") {
17298 print "/*", prefix defundef, macro, "*/"
17299 next
17300 }
17301 }
17302}
17303{ print }
17304_ACAWK
17305_ACEOF
17306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017307 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017308fi # test -n "$CONFIG_HEADERS"
17309
17310
17311eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17312shift
17313for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017314do
17315 case $ac_tag in
17316 :[FHLC]) ac_mode=$ac_tag; continue;;
17317 esac
17318 case $ac_mode$ac_tag in
17319 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017320 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321 :[FH]-) ac_tag=-:-;;
17322 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17323 esac
17324 ac_save_IFS=$IFS
17325 IFS=:
17326 set x $ac_tag
17327 IFS=$ac_save_IFS
17328 shift
17329 ac_file=$1
17330 shift
17331
17332 case $ac_mode in
17333 :L) ac_source=$1;;
17334 :[FH])
17335 ac_file_inputs=
17336 for ac_f
17337 do
17338 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017339 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017340 *) # Look for the file first in the build tree, then in the source tree
17341 # (if the path is not absolute). The absolute path cannot be DOS-style,
17342 # because $ac_f cannot contain `:'.
17343 test -f "$ac_f" ||
17344 case $ac_f in
17345 [\\/$]*) false;;
17346 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17347 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017348 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017349 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017350 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17351 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352 done
17353
17354 # Let's still pretend it is `configure' which instantiates (i.e., don't
17355 # use $as_me), people would be surprised to read:
17356 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017357 configure_input='Generated from '`
17358 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17359 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360 if test x"$ac_file" != x-; then
17361 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017362 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17363$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017365 # Neutralize special characters interpreted by sed in replacement strings.
17366 case $configure_input in #(
17367 *\&* | *\|* | *\\* )
17368 ac_sed_conf_input=`$as_echo "$configure_input" |
17369 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17370 *) ac_sed_conf_input=$configure_input;;
17371 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017372
17373 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017374 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17375 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376 esac
17377 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017378 esac
17379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017380 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017381$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017382 X"$ac_file" : 'X\(//\)[^/]' \| \
17383 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017385$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017386 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17387 s//\1/
17388 q
17389 }
17390 /^X\(\/\/\)[^/].*/{
17391 s//\1/
17392 q
17393 }
17394 /^X\(\/\/\)$/{
17395 s//\1/
17396 q
17397 }
17398 /^X\(\/\).*/{
17399 s//\1/
17400 q
17401 }
17402 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017403 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017404 ac_builddir=.
17405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017406case "$ac_dir" in
17407.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17408*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017409 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017410 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017411 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412 case $ac_top_builddir_sub in
17413 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17414 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17415 esac ;;
17416esac
17417ac_abs_top_builddir=$ac_pwd
17418ac_abs_builddir=$ac_pwd$ac_dir_suffix
17419# for backward compatibility:
17420ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017421
17422case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425 ac_top_srcdir=$ac_top_builddir_sub
17426 ac_abs_top_srcdir=$ac_pwd ;;
17427 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017428 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017429 ac_top_srcdir=$srcdir
17430 ac_abs_top_srcdir=$srcdir ;;
17431 *) # Relative name.
17432 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17433 ac_top_srcdir=$ac_top_build_prefix$srcdir
17434 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017435esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017436ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017437
Martin v. Löwis11437992002-04-12 09:54:03 +000017438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439 case $ac_mode in
17440 :F)
17441 #
17442 # CONFIG_FILE
17443 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017444
17445 case $INSTALL in
17446 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017447 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017449 ac_MKDIR_P=$MKDIR_P
17450 case $MKDIR_P in
17451 [\\/$]* | ?:[\\/]* ) ;;
17452 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17453 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017454_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455
Matthias Kloseb9621712010-04-24 17:59:49 +000017456cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017457# If the template does not know about datarootdir, expand it.
17458# FIXME: This hack should be removed a few years after 2.60.
17459ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017460ac_sed_dataroot='
17461/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017462 p
17463 q
17464}
17465/@datadir@/p
17466/@docdir@/p
17467/@infodir@/p
17468/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017469/@mandir@/p'
17470case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471*datarootdir*) ac_datarootdir_seen=yes;;
17472*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017473 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17474$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017476cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477 ac_datarootdir_hack='
17478 s&@datadir@&$datadir&g
17479 s&@docdir@&$docdir&g
17480 s&@infodir@&$infodir&g
17481 s&@localedir@&$localedir&g
17482 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017483 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484esac
17485_ACEOF
17486
17487# Neutralize VPATH when `$srcdir' = `.'.
17488# Shell code in configure.ac might set extrasub.
17489# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017490cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17491ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017492$extrasub
17493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017494cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017495:t
17496/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017497s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017499s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017500s&@srcdir@&$ac_srcdir&;t t
17501s&@abs_srcdir@&$ac_abs_srcdir&;t t
17502s&@top_srcdir@&$ac_top_srcdir&;t t
17503s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17504s&@builddir@&$ac_builddir&;t t
17505s&@abs_builddir@&$ac_abs_builddir&;t t
17506s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17507s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017508s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017510"
Victor Stinnere0be4232011-10-25 13:06:09 +020017511eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17512 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017514test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017515 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17516 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17517 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017518 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017519which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017520$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017521which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017522
Victor Stinnere0be4232011-10-25 13:06:09 +020017523 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017524 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017525 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17526 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017527 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017528 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017529 ;;
17530 :H)
17531 #
17532 # CONFIG_HEADER
17533 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017534 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017535 {
17536 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017537 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17538 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017539 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017540 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017541 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17542$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017543 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017544 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017545 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017546 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017547 fi
17548 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017549 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017550 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017551 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017553 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017555
17556 esac
17557
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017558
17559 case $ac_file$ac_mode in
17560 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17561
17562 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563done # for ac_tag
17564
Guido van Rossum627b2d71993-12-24 10:39:16 +000017565
Matthias Kloseb9621712010-04-24 17:59:49 +000017566as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017567_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017568ac_clean_files=$ac_clean_files_save
17569
Matthias Kloseb9621712010-04-24 17:59:49 +000017570test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017571 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017572
Martin v. Löwis11437992002-04-12 09:54:03 +000017573
17574# configure is writing to config.log, and then calls config.status.
17575# config.status does its own redirection, appending to config.log.
17576# Unfortunately, on DOS this fails, as config.log is still kept open
17577# by configure, so config.status won't be able to write to it; its
17578# output is simply discarded. So we exec the FD to /dev/null,
17579# effectively closing config.log, so it can be properly (re)opened and
17580# appended to by config.status. When coming back to configure, we
17581# need to make the FD available again.
17582if test "$no_create" != yes; then
17583 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017584 ac_config_status_args=
17585 test "$silent" = yes &&
17586 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017587 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017588 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017589 exec 5>>config.log
17590 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17591 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017592 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017593fi
17594if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17596$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017597fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017598
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017599
Christian Heimes75ed8902013-11-20 01:11:18 +010017600echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017601if test ! -f Modules/Setup
17602then
17603 cp $srcdir/Modules/Setup.dist Modules/Setup
17604fi
17605
Christian Heimes75ed8902013-11-20 01:11:18 +010017606echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017607if test ! -f Modules/Setup.local
17608then
17609 echo "# Edit this file for local setup changes" >Modules/Setup.local
17610fi
17611
Christian Heimes75ed8902013-11-20 01:11:18 +010017612echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017613$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17614 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017615 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017616mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017617
17618if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17619 echo "" >&6
17620 echo "" >&6
17621 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17622 echo "please run ./configure --with-optimizations" >&6
17623 echo "" >&6
17624 echo "" >&6
17625fi
17626