blob: 6f2d9b28e3918cf2e6475e409790585213e42b8a [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
Benjamin Petersona9296e72016-09-07 11:06:17 -0700780runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000781localstatedir
782sharedstatedir
783sysconfdir
784datadir
785datarootdir
786libexecdir
787sbindir
788bindir
789program_transform_name
790prefix
791exec_prefix
792PACKAGE_URL
793PACKAGE_BUGREPORT
794PACKAGE_STRING
795PACKAGE_VERSION
796PACKAGE_TARNAME
797PACKAGE_NAME
798PATH_SEPARATOR
799SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000800ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000801ac_user_opts='
802enable_option_checking
803enable_universalsdk
804with_universal_archs
805with_framework_name
806enable_framework
807with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600808with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_cxx_main
810with_suffix
811enable_shared
812enable_profiling
813with_pydebug
Brett Cannon63d98bc2016-09-06 17:12:40 -0700814with_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700815with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100816with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100817with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000818with_libs
819with_system_expat
820with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100821with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000822enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700823with_tcltk_includes
824with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_dbmliborder
826with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000827with_threads
828with_thread
829enable_ipv6
830with_doc_strings
831with_tsc
832with_pymalloc
833with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000834with_fpectl
835with_libm
836with_libc
837enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000838with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800839with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000840'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841 ac_precious_vars='build_alias
842host_alias
843target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100844MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000845CC
846CFLAGS
847LDFLAGS
848LIBS
849CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100850CPP
851PKG_CONFIG
852PKG_CONFIG_PATH
853PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854
Guido van Rossum627b2d71993-12-24 10:39:16 +0000855
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000857ac_init_help=
858ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000859ac_unrecognized_opts=
860ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861# The variables have the same names as the options, with
862# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000865no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866no_recursion=
867prefix=NONE
868program_prefix=NONE
869program_suffix=NONE
870program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875x_includes=NONE
876x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000877
878# Installation directory options.
879# These are left unexpanded so users can "make install exec_prefix=/foo"
880# and all the variables that are supposed to be based on exec_prefix
881# by default will actually change.
882# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884bindir='${exec_prefix}/bin'
885sbindir='${exec_prefix}/sbin'
886libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000887datarootdir='${prefix}/share'
888datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889sysconfdir='${prefix}/etc'
890sharedstatedir='${prefix}/com'
891localstatedir='${prefix}/var'
Benjamin Petersona9296e72016-09-07 11:06:17 -0700892runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893includedir='${prefix}/include'
894oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
896infodir='${datarootdir}/info'
897htmldir='${docdir}'
898dvidir='${docdir}'
899pdfdir='${docdir}'
900psdir='${docdir}'
901libdir='${exec_prefix}/lib'
902localedir='${datarootdir}/locale'
903mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000906ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000908do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909 # If the previous option needs an argument, assign it.
910 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000911 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912 ac_prev=
913 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200917 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
918 *=) ac_optarg= ;;
919 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000922 # Accept the important Cygnus configure options, so we can diagnose typos.
923
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000924 case $ac_dashdash$ac_option in
925 --)
926 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928 -bindir | --bindir | --bindi | --bind | --bin | --bi)
929 ac_prev=bindir ;;
930 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000931 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000932
933 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000934 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000935 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000936 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000937
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000938 -cache-file | --cache-file | --cache-fil | --cache-fi \
939 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
940 ac_prev=cache_file ;;
941 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
942 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000943 cache_file=$ac_optarg ;;
944
945 --config-cache | -C)
946 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000947
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000948 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000949 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000950 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000951 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000952
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000953 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
954 | --dataroo | --dataro | --datar)
955 ac_prev=datarootdir ;;
956 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
957 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
958 datarootdir=$ac_optarg ;;
959
Guido van Rossum7f43da71994-08-01 12:15:30 +0000960 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000962 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200964 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000965 ac_useropt_orig=$ac_useropt
966 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
967 case $ac_user_opts in
968 *"
969"enable_$ac_useropt"
970"*) ;;
971 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
972 ac_unrecognized_sep=', ';;
973 esac
974 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000975
976 -docdir | --docdir | --docdi | --doc | --do)
977 ac_prev=docdir ;;
978 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
979 docdir=$ac_optarg ;;
980
981 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
982 ac_prev=dvidir ;;
983 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
984 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000987 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000989 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200990 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000991 ac_useropt_orig=$ac_useropt
992 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
993 case $ac_user_opts in
994 *"
995"enable_$ac_useropt"
996"*) ;;
997 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
998 ac_unrecognized_sep=', ';;
999 esac
1000 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001
Guido van Rossum7f43da71994-08-01 12:15:30 +00001002 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1003 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1004 | --exec | --exe | --ex)
1005 ac_prev=exec_prefix ;;
1006 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1007 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1008 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
1011 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 # Obsolete; use --with-gas.
1013 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 -help | --help | --hel | --he | -h)
1016 ac_init_help=long ;;
1017 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1018 ac_init_help=recursive ;;
1019 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1020 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021
1022 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001023 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001027 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1028 ac_prev=htmldir ;;
1029 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1030 | --ht=*)
1031 htmldir=$ac_optarg ;;
1032
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033 -includedir | --includedir | --includedi | --included | --include \
1034 | --includ | --inclu | --incl | --inc)
1035 ac_prev=includedir ;;
1036 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1037 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
1040 -infodir | --infodir | --infodi | --infod | --info | --inf)
1041 ac_prev=infodir ;;
1042 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044
1045 -libdir | --libdir | --libdi | --libd)
1046 ac_prev=libdir ;;
1047 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049
1050 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1051 | --libexe | --libex | --libe)
1052 ac_prev=libexecdir ;;
1053 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1054 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001057 -localedir | --localedir | --localedi | --localed | --locale)
1058 ac_prev=localedir ;;
1059 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1060 localedir=$ac_optarg ;;
1061
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064 ac_prev=localstatedir ;;
1065 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001066 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001067 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068
1069 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1070 ac_prev=mandir ;;
1071 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001075 # Obsolete; use --without-fp.
1076 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 no_create=yes ;;
1081
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001082 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1083 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1084 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001086 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1087 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1088 | --oldin | --oldi | --old | --ol | --o)
1089 ac_prev=oldincludedir ;;
1090 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1091 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1092 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1096 ac_prev=prefix ;;
1097 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099
1100 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1101 | --program-pre | --program-pr | --program-p)
1102 ac_prev=program_prefix ;;
1103 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1104 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001105 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001106
1107 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1108 | --program-suf | --program-su | --program-s)
1109 ac_prev=program_suffix ;;
1110 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1111 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113
1114 -program-transform-name | --program-transform-name \
1115 | --program-transform-nam | --program-transform-na \
1116 | --program-transform-n | --program-transform- \
1117 | --program-transform | --program-transfor \
1118 | --program-transfo | --program-transf \
1119 | --program-trans | --program-tran \
1120 | --progr-tra | --program-tr | --program-t)
1121 ac_prev=program_transform_name ;;
1122 -program-transform-name=* | --program-transform-name=* \
1123 | --program-transform-nam=* | --program-transform-na=* \
1124 | --program-transform-n=* | --program-transform-=* \
1125 | --program-transform=* | --program-transfor=* \
1126 | --program-transfo=* | --program-transf=* \
1127 | --program-trans=* | --program-tran=* \
1128 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001131 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1132 ac_prev=pdfdir ;;
1133 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1134 pdfdir=$ac_optarg ;;
1135
1136 -psdir | --psdir | --psdi | --psd | --ps)
1137 ac_prev=psdir ;;
1138 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1139 psdir=$ac_optarg ;;
1140
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1142 | -silent | --silent | --silen | --sile | --sil)
1143 silent=yes ;;
1144
Benjamin Petersona9296e72016-09-07 11:06:17 -07001145 -runstatedir | --runstatedir | --runstatedi | --runstated \
1146 | --runstate | --runstat | --runsta | --runst | --runs \
1147 | --run | --ru | --r)
1148 ac_prev=runstatedir ;;
1149 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1150 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1151 | --run=* | --ru=* | --r=*)
1152 runstatedir=$ac_optarg ;;
1153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1155 ac_prev=sbindir ;;
1156 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1157 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159
1160 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1161 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1162 | --sharedst | --shareds | --shared | --share | --shar \
1163 | --sha | --sh)
1164 ac_prev=sharedstatedir ;;
1165 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1166 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1167 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1168 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 -site | --site | --sit)
1172 ac_prev=site ;;
1173 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001174 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001175
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1177 ac_prev=srcdir ;;
1178 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001180
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001181 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1182 | --syscon | --sysco | --sysc | --sys | --sy)
1183 ac_prev=sysconfdir ;;
1184 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1185 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001186 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001191 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192
1193 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1194 verbose=yes ;;
1195
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 -version | --version | --versio | --versi | --vers | -V)
1197 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001200 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001201 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001202 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001203 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001204 ac_useropt_orig=$ac_useropt
1205 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1206 case $ac_user_opts in
1207 *"
1208"with_$ac_useropt"
1209"*) ;;
1210 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1211 ac_unrecognized_sep=', ';;
1212 esac
1213 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001217 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001218 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001219 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 ac_useropt_orig=$ac_useropt
1221 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1222 case $ac_user_opts in
1223 *"
1224"with_$ac_useropt"
1225"*) ;;
1226 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1227 ac_unrecognized_sep=', ';;
1228 esac
1229 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001231 --x)
1232 # Obsolete; use --with-x.
1233 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234
1235 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1236 | --x-incl | --x-inc | --x-in | --x-i)
1237 ac_prev=x_includes ;;
1238 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1239 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241
1242 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1243 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1244 ac_prev=x_libraries ;;
1245 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1246 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001247 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001249 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1250Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001251 ;;
1252
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 *=*)
1254 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1255 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001256 case $ac_envvar in #(
1257 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001258 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001259 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001260 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001261 export $ac_envvar ;;
1262
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001263 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001267 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001268 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269 ;;
1270
1271 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001272done
1273
Guido van Rossum7f43da71994-08-01 12:15:30 +00001274if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001275 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001276 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277fi
1278
Matthias Kloseb9621712010-04-24 17:59:49 +00001279if test -n "$ac_unrecognized_opts"; then
1280 case $enable_option_checking in
1281 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001283 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1284 esac
1285fi
1286
1287# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1289 datadir sysconfdir sharedstatedir localstatedir includedir \
1290 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersona9296e72016-09-07 11:06:17 -07001291 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001292do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001294 # Remove trailing slashes.
1295 case $ac_val in
1296 */ )
1297 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1298 eval $ac_var=\$ac_val;;
1299 esac
1300 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001301 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 [\\/$]* | ?:[\\/]* ) continue;;
1303 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001305 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001306done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Martin v. Löwis11437992002-04-12 09:54:03 +00001308# There might be people who depend on the old broken behavior: `$host'
1309# used to hold the argument of --host etc.
1310# FIXME: To remove some day.
1311build=$build_alias
1312host=$host_alias
1313target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314
Martin v. Löwis11437992002-04-12 09:54:03 +00001315# FIXME: To remove some day.
1316if test "x$host_alias" != x; then
1317 if test "x$build_alias" = x; then
1318 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001319 elif test "x$build_alias" != "x$host_alias"; then
1320 cross_compiling=yes
1321 fi
1322fi
1323
1324ac_tool_prefix=
1325test -n "$host_alias" && ac_tool_prefix=$host_alias-
1326
1327test "$silent" = yes && exec 6>/dev/null
1328
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330ac_pwd=`pwd` && test -n "$ac_pwd" &&
1331ac_ls_di=`ls -di .` &&
1332ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336
1337
Guido van Rossum627b2d71993-12-24 10:39:16 +00001338# Find the source files, if location was not specified.
1339if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001341 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001342 ac_confdir=`$as_dirname -- "$as_myself" ||
1343$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1344 X"$as_myself" : 'X\(//\)[^/]' \| \
1345 X"$as_myself" : 'X\(//\)$' \| \
1346 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1347$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001348 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1349 s//\1/
1350 q
1351 }
1352 /^X\(\/\/\)[^/].*/{
1353 s//\1/
1354 q
1355 }
1356 /^X\(\/\/\)$/{
1357 s//\1/
1358 q
1359 }
1360 /^X\(\/\).*/{
1361 s//\1/
1362 q
1363 }
1364 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001365 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001366 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001367 srcdir=..
1368 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369else
1370 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372if test ! -r "$srcdir/$ac_unique_file"; then
1373 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001374 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001376ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1377ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001378 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001379 pwd)`
1380# When building in place, set srcdir=.
1381if test "$ac_abs_confdir" = "$ac_pwd"; then
1382 srcdir=.
1383fi
1384# Remove unnecessary trailing slashes from srcdir.
1385# Double slashes in file names in object file debugging info
1386# mess up M-x gdb in Emacs.
1387case $srcdir in
1388*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1389esac
1390for ac_var in $ac_precious_vars; do
1391 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1392 eval ac_env_${ac_var}_value=\$${ac_var}
1393 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1394 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1395done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001396
Martin v. Löwis11437992002-04-12 09:54:03 +00001397#
1398# Report the --help message.
1399#
1400if test "$ac_init_help" = "long"; then
1401 # Omit some internal or obsolete options to make the list less imposing.
1402 # This message is too long to be a string in the A/UX 3.1 sh.
1403 cat <<_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001404\`configure' configures python 3.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001405
1406Usage: $0 [OPTION]... [VAR=VALUE]...
1407
1408To assign environment variables (e.g., CC, CFLAGS...), specify them as
1409VAR=VALUE. See below for descriptions of some of the useful variables.
1410
1411Defaults for the options are specified in brackets.
1412
1413Configuration:
1414 -h, --help display this help and exit
1415 --help=short display options specific to this package
1416 --help=recursive display the short help of all the included packages
1417 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001418 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001419 --cache-file=FILE cache test results in FILE [disabled]
1420 -C, --config-cache alias for \`--cache-file=config.cache'
1421 -n, --no-create do not create output files
1422 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1423
Martin v. Löwis11437992002-04-12 09:54:03 +00001424Installation directories:
1425 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001426 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001428 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001429
1430By default, \`make install' will install all the files in
1431\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1432an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1433for instance \`--prefix=\$HOME'.
1434
1435For better control, use the options below.
1436
1437Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001438 --bindir=DIR user executables [EPREFIX/bin]
1439 --sbindir=DIR system admin executables [EPREFIX/sbin]
1440 --libexecdir=DIR program executables [EPREFIX/libexec]
1441 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1442 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1443 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersona9296e72016-09-07 11:06:17 -07001444 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 --libdir=DIR object code libraries [EPREFIX/lib]
1446 --includedir=DIR C header files [PREFIX/include]
1447 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1448 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1449 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1450 --infodir=DIR info documentation [DATAROOTDIR/info]
1451 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1452 --mandir=DIR man documentation [DATAROOTDIR/man]
1453 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1454 --htmldir=DIR html documentation [DOCDIR]
1455 --dvidir=DIR dvi documentation [DOCDIR]
1456 --pdfdir=DIR pdf documentation [DOCDIR]
1457 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001458_ACEOF
1459
1460 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001461
1462System types:
1463 --build=BUILD configure for building on BUILD [guessed]
1464 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001465_ACEOF
1466fi
1467
1468if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001469 case $ac_init_help in
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001470 short | recursive ) echo "Configuration of python 3.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001471 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001472 cat <<\_ACEOF
1473
1474Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001475 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001476 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1477 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001478 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001479 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --enable-framework[=INSTALLDIR]
1481 Build (MacOSX|Darwin) framework
1482 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001483 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001484 --enable-loadable-sqlite-extensions
1485 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001486 --enable-ipv6 Enable ipv6 (with ipv4) support
1487 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001488 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001489 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
1491Optional Packages:
1492 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1493 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001494 --with-universal-archs=ARCH
1495 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001496 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001497 --with-framework-name=FRAMEWORK
1498 specify an alternate name of the framework built
1499 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001500 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001501 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001502 --with-cxx-main=<compiler>
1503 compile main() and link python executable with C++
1504 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001505 --with-suffix=.exe set executable suffix
1506 --with-pydebug build with Py_DEBUG defined
Brett Cannon63d98bc2016-09-06 17:12:40 -07001507 --with-optimizations Enable all optimizations when available (LTO, PGO,
1508 etc). Disabled by default.
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001509 --with-lto Enable Link Time Optimization in PGO builds.
1510 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001511 --with-hash-algorithm=[fnv|siphash24]
1512 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001513 --with-address-sanitizer
1514 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001515 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001516 --with-system-expat build pyexpat module using an installed expat
1517 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001518 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001519 --with-system-libmpdec build _decimal module using an installed libmpdec
1520 library
Ned Deilyd819b932013-09-06 01:07:05 -07001521 --with-tcltk-includes='-I...'
1522 override search for Tcl and Tk include files
1523 --with-tcltk-libs='-L...'
1524 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001525 --with-dbmliborder=db1:db2:...
1526 order to check db backends for dbm. Valid value is a
1527 colon separated string with the backend names
1528 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001529 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001530 --with(out)-threads[=DIRECTORY]
1531 disable/enable thread support
1532 --with(out)-thread[=DIRECTORY]
1533 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001534 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001535 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001536 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001537 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001538 --with-fpectl enable SIGFPE catching
1539 --with-libm=STRING math library
1540 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001541 --with(out)-computed-gotos
1542 Use computed gotos in evaluation loop (enabled by
1543 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001544 --with(out)-ensurepip=[=upgrade]
1545 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001546
1547Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001548 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001549 CC C compiler command
1550 CFLAGS C compiler flags
1551 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1552 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001554 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001557 PKG_CONFIG path to pkg-config utility
1558 PKG_CONFIG_PATH
1559 directories to add to pkg-config's search path
1560 PKG_CONFIG_LIBDIR
1561 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001562
1563Use these variables to override the choices made by `configure' or to help
1564it to find libraries and programs with nonstandard names/locations.
1565
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001566Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001569fi
1570
1571if test "$ac_init_help" = "recursive"; then
1572 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001574 test -d "$ac_dir" ||
1575 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1576 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001577 ac_builddir=.
1578
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001579case "$ac_dir" in
1580.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1581*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001582 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001583 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001584 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585 case $ac_top_builddir_sub in
1586 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1588 esac ;;
1589esac
1590ac_abs_top_builddir=$ac_pwd
1591ac_abs_builddir=$ac_pwd$ac_dir_suffix
1592# for backward compatibility:
1593ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001594
1595case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001596 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001597 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001598 ac_top_srcdir=$ac_top_builddir_sub
1599 ac_abs_top_srcdir=$ac_pwd ;;
1600 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001601 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 ac_top_srcdir=$srcdir
1603 ac_abs_top_srcdir=$srcdir ;;
1604 *) # Relative name.
1605 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1606 ac_top_srcdir=$ac_top_build_prefix$srcdir
1607 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001608esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001609ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001611 cd "$ac_dir" || { ac_status=$?; continue; }
1612 # Check for guested configure.
1613 if test -f "$ac_srcdir/configure.gnu"; then
1614 echo &&
1615 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1616 elif test -f "$ac_srcdir/configure"; then
1617 echo &&
1618 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001619 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001620 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001621 fi || ac_status=$?
1622 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001623 done
1624fi
1625
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001626test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001627if $ac_init_version; then
1628 cat <<\_ACEOF
Benjamin Petersona8c22a02015-05-27 23:29:00 -05001629python configure 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001630generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001631
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001632Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001633This configure script is free software; the Free Software Foundation
1634gives unlimited permission to copy, distribute and modify it.
1635_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001636 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001638
1639## ------------------------ ##
1640## Autoconf initialization. ##
1641## ------------------------ ##
1642
1643# ac_fn_c_try_compile LINENO
1644# --------------------------
1645# Try to compile conftest.$ac_ext, and return whether this succeeded.
1646ac_fn_c_try_compile ()
1647{
1648 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1649 rm -f conftest.$ac_objext
1650 if { { ac_try="$ac_compile"
1651case "(($ac_try" in
1652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1653 *) ac_try_echo=$ac_try;;
1654esac
1655eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1656$as_echo "$ac_try_echo"; } >&5
1657 (eval "$ac_compile") 2>conftest.err
1658 ac_status=$?
1659 if test -s conftest.err; then
1660 grep -v '^ *+' conftest.err >conftest.er1
1661 cat conftest.er1 >&5
1662 mv -f conftest.er1 conftest.err
1663 fi
1664 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1665 test $ac_status = 0; } && {
1666 test -z "$ac_c_werror_flag" ||
1667 test ! -s conftest.err
1668 } && test -s conftest.$ac_objext; then :
1669 ac_retval=0
1670else
1671 $as_echo "$as_me: failed program was:" >&5
1672sed 's/^/| /' conftest.$ac_ext >&5
1673
1674 ac_retval=1
1675fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001676 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001677 as_fn_set_status $ac_retval
1678
1679} # ac_fn_c_try_compile
1680
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001681# ac_fn_c_try_cpp LINENO
1682# ----------------------
1683# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1684ac_fn_c_try_cpp ()
1685{
1686 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1687 if { { ac_try="$ac_cpp conftest.$ac_ext"
1688case "(($ac_try" in
1689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1690 *) ac_try_echo=$ac_try;;
1691esac
1692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1693$as_echo "$ac_try_echo"; } >&5
1694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1695 ac_status=$?
1696 if test -s conftest.err; then
1697 grep -v '^ *+' conftest.err >conftest.er1
1698 cat conftest.er1 >&5
1699 mv -f conftest.er1 conftest.err
1700 fi
1701 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1702 test $ac_status = 0; } > conftest.i && {
1703 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1704 test ! -s conftest.err
1705 }; then :
1706 ac_retval=0
1707else
1708 $as_echo "$as_me: failed program was:" >&5
1709sed 's/^/| /' conftest.$ac_ext >&5
1710
1711 ac_retval=1
1712fi
1713 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1714 as_fn_set_status $ac_retval
1715
1716} # ac_fn_c_try_cpp
1717
Matthias Kloseb9621712010-04-24 17:59:49 +00001718# ac_fn_c_try_link LINENO
1719# -----------------------
1720# Try to link conftest.$ac_ext, and return whether this succeeded.
1721ac_fn_c_try_link ()
1722{
1723 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1724 rm -f conftest.$ac_objext conftest$ac_exeext
1725 if { { ac_try="$ac_link"
1726case "(($ac_try" in
1727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1728 *) ac_try_echo=$ac_try;;
1729esac
1730eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1731$as_echo "$ac_try_echo"; } >&5
1732 (eval "$ac_link") 2>conftest.err
1733 ac_status=$?
1734 if test -s conftest.err; then
1735 grep -v '^ *+' conftest.err >conftest.er1
1736 cat conftest.er1 >&5
1737 mv -f conftest.er1 conftest.err
1738 fi
1739 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1740 test $ac_status = 0; } && {
1741 test -z "$ac_c_werror_flag" ||
1742 test ! -s conftest.err
1743 } && test -s conftest$ac_exeext && {
1744 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001745 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001746 }; then :
1747 ac_retval=0
1748else
1749 $as_echo "$as_me: failed program was:" >&5
1750sed 's/^/| /' conftest.$ac_ext >&5
1751
1752 ac_retval=1
1753fi
1754 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1755 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1756 # interfere with the next link command; also delete a directory that is
1757 # left behind by Apple's compiler. We do this before executing the actions.
1758 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001759 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001760 as_fn_set_status $ac_retval
1761
1762} # ac_fn_c_try_link
1763
Matthias Kloseb9621712010-04-24 17:59:49 +00001764# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1765# -------------------------------------------------------
1766# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1767# the include files in INCLUDES and setting the cache variable VAR
1768# accordingly.
1769ac_fn_c_check_header_mongrel ()
1770{
1771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001772 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001775if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 $as_echo_n "(cached) " >&6
1777fi
1778eval ac_res=\$$3
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1780$as_echo "$ac_res" >&6; }
1781else
1782 # Is the header compilable?
1783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1784$as_echo_n "checking $2 usability... " >&6; }
1785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1786/* end confdefs.h. */
1787$4
1788#include <$2>
1789_ACEOF
1790if ac_fn_c_try_compile "$LINENO"; then :
1791 ac_header_compiler=yes
1792else
1793 ac_header_compiler=no
1794fi
1795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1796{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1797$as_echo "$ac_header_compiler" >&6; }
1798
1799# Is the header present?
1800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1801$as_echo_n "checking $2 presence... " >&6; }
1802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1803/* end confdefs.h. */
1804#include <$2>
1805_ACEOF
1806if ac_fn_c_try_cpp "$LINENO"; then :
1807 ac_header_preproc=yes
1808else
1809 ac_header_preproc=no
1810fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001811rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1813$as_echo "$ac_header_preproc" >&6; }
1814
1815# So? What about this header?
1816case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1817 yes:no: )
1818 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1819$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&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;}
1822 ;;
1823 no:yes:* )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1825$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1827$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1828 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1829$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1831$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1833$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001834( $as_echo "## --------------------------------------- ##
1835## Report this to https://bugs.python.org/ ##
1836## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 ) | sed "s/^/$as_me: WARNING: /" >&2
1838 ;;
1839esac
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001842if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 $as_echo_n "(cached) " >&6
1844else
1845 eval "$3=\$ac_header_compiler"
1846fi
1847eval ac_res=\$$3
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1849$as_echo "$ac_res" >&6; }
1850fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001851 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001852
1853} # ac_fn_c_check_header_mongrel
1854
1855# ac_fn_c_try_run LINENO
1856# ----------------------
1857# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1858# that executables *can* be run.
1859ac_fn_c_try_run ()
1860{
1861 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1862 if { { ac_try="$ac_link"
1863case "(($ac_try" in
1864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1865 *) ac_try_echo=$ac_try;;
1866esac
1867eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1868$as_echo "$ac_try_echo"; } >&5
1869 (eval "$ac_link") 2>&5
1870 ac_status=$?
1871 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1872 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1873 { { case "(($ac_try" in
1874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1875 *) ac_try_echo=$ac_try;;
1876esac
1877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1878$as_echo "$ac_try_echo"; } >&5
1879 (eval "$ac_try") 2>&5
1880 ac_status=$?
1881 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1882 test $ac_status = 0; }; }; then :
1883 ac_retval=0
1884else
1885 $as_echo "$as_me: program exited with status $ac_status" >&5
1886 $as_echo "$as_me: failed program was:" >&5
1887sed 's/^/| /' conftest.$ac_ext >&5
1888
1889 ac_retval=$ac_status
1890fi
1891 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001892 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001893 as_fn_set_status $ac_retval
1894
1895} # ac_fn_c_try_run
1896
1897# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1898# -------------------------------------------------------
1899# Tests whether HEADER exists and can be compiled using the include files in
1900# INCLUDES, setting the cache variable VAR accordingly.
1901ac_fn_c_check_header_compile ()
1902{
1903 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1905$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001906if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001907 $as_echo_n "(cached) " >&6
1908else
1909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1910/* end confdefs.h. */
1911$4
1912#include <$2>
1913_ACEOF
1914if ac_fn_c_try_compile "$LINENO"; then :
1915 eval "$3=yes"
1916else
1917 eval "$3=no"
1918fi
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_check_header_compile
1927
Matthias Kloseb9621712010-04-24 17:59:49 +00001928# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1929# -------------------------------------------
1930# Tests whether TYPE exists after having included INCLUDES, setting cache
1931# variable VAR accordingly.
1932ac_fn_c_check_type ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944int
1945main ()
1946{
1947if (sizeof ($2))
1948 return 0;
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$4
1957int
1958main ()
1959{
1960if (sizeof (($2)))
1961 return 0;
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 eval "$3=yes"
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980} # ac_fn_c_check_type
1981
Matthias Kloseb9621712010-04-24 17:59:49 +00001982# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1983# --------------------------------------------
1984# Tries to find the compile-time value of EXPR in a program that includes
1985# INCLUDES, setting VAR accordingly. Returns whether the value could be
1986# computed
1987ac_fn_c_compute_int ()
1988{
1989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990 if test "$cross_compiling" = yes; then
1991 # Depending upon the size, compute the lo and hi bounds.
1992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001999test_array [0] = 0;
2000return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002001
2002 ;
2003 return 0;
2004}
2005_ACEOF
2006if ac_fn_c_try_compile "$LINENO"; then :
2007 ac_lo=0 ac_mid=0
2008 while :; do
2009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2010/* end confdefs.h. */
2011$4
2012int
2013main ()
2014{
2015static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002016test_array [0] = 0;
2017return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002018
2019 ;
2020 return 0;
2021}
2022_ACEOF
2023if ac_fn_c_try_compile "$LINENO"; then :
2024 ac_hi=$ac_mid; break
2025else
2026 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2027 if test $ac_lo -le $ac_mid; then
2028 ac_lo= ac_hi=
2029 break
2030 fi
2031 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034 done
2035else
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$4
2039int
2040main ()
2041{
2042static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002043test_array [0] = 0;
2044return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046 ;
2047 return 0;
2048}
2049_ACEOF
2050if ac_fn_c_try_compile "$LINENO"; then :
2051 ac_hi=-1 ac_mid=-1
2052 while :; do
2053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2054/* end confdefs.h. */
2055$4
2056int
2057main ()
2058{
2059static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002060test_array [0] = 0;
2061return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002062
2063 ;
2064 return 0;
2065}
2066_ACEOF
2067if ac_fn_c_try_compile "$LINENO"; then :
2068 ac_lo=$ac_mid; break
2069else
2070 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2071 if test $ac_mid -le $ac_hi; then
2072 ac_lo= ac_hi=
2073 break
2074 fi
2075 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2076fi
2077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2078 done
2079else
2080 ac_lo= ac_hi=
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2085# Binary search between lo and hi bounds.
2086while test "x$ac_lo" != "x$ac_hi"; do
2087 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002095test_array [0] = 0;
2096return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_hi=$ac_mid
2104else
2105 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108done
2109case $ac_lo in #((
2110?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111'') ac_retval=1 ;;
2112esac
2113 else
2114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115/* end confdefs.h. */
2116$4
2117static long int longval () { return $2; }
2118static unsigned long int ulongval () { return $2; }
2119#include <stdio.h>
2120#include <stdlib.h>
2121int
2122main ()
2123{
2124
2125 FILE *f = fopen ("conftest.val", "w");
2126 if (! f)
2127 return 1;
2128 if (($2) < 0)
2129 {
2130 long int i = longval ();
2131 if (i != ($2))
2132 return 1;
2133 fprintf (f, "%ld", i);
2134 }
2135 else
2136 {
2137 unsigned long int i = ulongval ();
2138 if (i != ($2))
2139 return 1;
2140 fprintf (f, "%lu", i);
2141 }
2142 /* Do not output a trailing newline, as this causes \r\n confusion
2143 on some platforms. */
2144 return ferror (f) || fclose (f) != 0;
2145
2146 ;
2147 return 0;
2148}
2149_ACEOF
2150if ac_fn_c_try_run "$LINENO"; then :
2151 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152else
2153 ac_retval=1
2154fi
2155rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156 conftest.$ac_objext conftest.beam conftest.$ac_ext
2157rm -f conftest.val
2158
2159 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002160 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002161 as_fn_set_status $ac_retval
2162
2163} # ac_fn_c_compute_int
2164
2165# ac_fn_c_check_func LINENO FUNC VAR
2166# ----------------------------------
2167# Tests whether FUNC exists, setting the cache variable VAR accordingly
2168ac_fn_c_check_func ()
2169{
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2172$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002173if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002174 $as_echo_n "(cached) " >&6
2175else
2176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2177/* end confdefs.h. */
2178/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2179 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2180#define $2 innocuous_$2
2181
2182/* System header to define __stub macros and hopefully few prototypes,
2183 which can conflict with char $2 (); below.
2184 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2185 <limits.h> exists even on freestanding compilers. */
2186
2187#ifdef __STDC__
2188# include <limits.h>
2189#else
2190# include <assert.h>
2191#endif
2192
2193#undef $2
2194
2195/* Override any GCC internal prototype to avoid an error.
2196 Use char because int might match the return type of a GCC
2197 builtin and then its argument prototype would still apply. */
2198#ifdef __cplusplus
2199extern "C"
2200#endif
2201char $2 ();
2202/* The GNU C library defines this for functions which it implements
2203 to always fail with ENOSYS. Some functions are actually named
2204 something starting with __ and the normal name is an alias. */
2205#if defined __stub_$2 || defined __stub___$2
2206choke me
2207#endif
2208
2209int
2210main ()
2211{
2212return $2 ();
2213 ;
2214 return 0;
2215}
2216_ACEOF
2217if ac_fn_c_try_link "$LINENO"; then :
2218 eval "$3=yes"
2219else
2220 eval "$3=no"
2221fi
2222rm -f core conftest.err conftest.$ac_objext \
2223 conftest$ac_exeext conftest.$ac_ext
2224fi
2225eval ac_res=\$$3
2226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2227$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002228 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002229
2230} # ac_fn_c_check_func
2231
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002232# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2233# ---------------------------------------------
2234# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2235# accordingly.
2236ac_fn_c_check_decl ()
2237{
2238 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2239 as_decl_name=`echo $2|sed 's/ *(.*//'`
2240 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2242$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2243if eval \${$3+:} false; then :
2244 $as_echo_n "(cached) " >&6
2245else
2246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2247/* end confdefs.h. */
2248$4
2249int
2250main ()
2251{
2252#ifndef $as_decl_name
2253#ifdef __cplusplus
2254 (void) $as_decl_use;
2255#else
2256 (void) $as_decl_name;
2257#endif
2258#endif
2259
2260 ;
2261 return 0;
2262}
2263_ACEOF
2264if ac_fn_c_try_compile "$LINENO"; then :
2265 eval "$3=yes"
2266else
2267 eval "$3=no"
2268fi
2269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2270fi
2271eval ac_res=\$$3
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2273$as_echo "$ac_res" >&6; }
2274 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2275
2276} # ac_fn_c_check_decl
2277
Matthias Kloseb9621712010-04-24 17:59:49 +00002278# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2279# ----------------------------------------------------
2280# Tries to find if the field MEMBER exists in type AGGR, after including
2281# INCLUDES, setting cache variable VAR accordingly.
2282ac_fn_c_check_member ()
2283{
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2286$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002287if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002288 $as_echo_n "(cached) " >&6
2289else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2291/* end confdefs.h. */
2292$5
2293int
2294main ()
2295{
2296static $2 ac_aggr;
2297if (ac_aggr.$3)
2298return 0;
2299 ;
2300 return 0;
2301}
2302_ACEOF
2303if ac_fn_c_try_compile "$LINENO"; then :
2304 eval "$4=yes"
2305else
2306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2307/* end confdefs.h. */
2308$5
2309int
2310main ()
2311{
2312static $2 ac_aggr;
2313if (sizeof ac_aggr.$3)
2314return 0;
2315 ;
2316 return 0;
2317}
2318_ACEOF
2319if ac_fn_c_try_compile "$LINENO"; then :
2320 eval "$4=yes"
2321else
2322 eval "$4=no"
2323fi
2324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2325fi
2326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2327fi
2328eval ac_res=\$$4
2329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2330$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002331 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002332
2333} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002334cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002335This file contains any messages produced by compilers while
2336running configure, to aid debugging if configure makes a mistake.
2337
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002338It was created by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002339generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002340
2341 $ $0 $@
2342
2343_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002344exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002345{
2346cat <<_ASUNAME
2347## --------- ##
2348## Platform. ##
2349## --------- ##
2350
2351hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2352uname -m = `(uname -m) 2>/dev/null || echo unknown`
2353uname -r = `(uname -r) 2>/dev/null || echo unknown`
2354uname -s = `(uname -s) 2>/dev/null || echo unknown`
2355uname -v = `(uname -v) 2>/dev/null || echo unknown`
2356
2357/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2358/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2359
2360/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2361/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2362/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002363/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002364/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2365/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2366/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2367
2368_ASUNAME
2369
2370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2371for as_dir in $PATH
2372do
2373 IFS=$as_save_IFS
2374 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002375 $as_echo "PATH: $as_dir"
2376 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002377IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
2379} >&5
2380
2381cat >&5 <<_ACEOF
2382
2383
2384## ----------- ##
2385## Core tests. ##
2386## ----------- ##
2387
2388_ACEOF
2389
2390
2391# Keep a trace of the command line.
2392# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002393# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002394# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002395# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002396ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002397ac_configure_args0=
2398ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002399ac_must_keep_next=false
2400for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002401do
Skip Montanaro6dead952003-09-25 14:50:04 +00002402 for ac_arg
2403 do
2404 case $ac_arg in
2405 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2406 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2407 | -silent | --silent | --silen | --sile | --sil)
2408 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002409 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002410 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002411 esac
2412 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002413 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002414 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002415 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002416 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002417 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002418 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002419 case $ac_arg in
2420 *=* | --config-cache | -C | -disable-* | --disable-* \
2421 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2422 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2423 | -with-* | --with-* | -without-* | --without-* | --x)
2424 case "$ac_configure_args0 " in
2425 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2426 esac
2427 ;;
2428 -* ) ac_must_keep_next=true ;;
2429 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002430 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002431 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002432 ;;
2433 esac
2434 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002435done
Matthias Kloseb9621712010-04-24 17:59:49 +00002436{ ac_configure_args0=; unset ac_configure_args0;}
2437{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002438
2439# When interrupted or exit'd, cleanup temporary files, and complete
2440# config.log. We remove comments because anyway the quotes in there
2441# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002442# WARNING: Use '\'' to represent an apostrophe within the trap.
2443# 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 +00002444trap 'exit_status=$?
2445 # Save into config.log some information that might help in debugging.
2446 {
2447 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002448
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002449 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002450## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002451## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002452 echo
2453 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454(
2455 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2456 eval ac_val=\$$ac_var
2457 case $ac_val in #(
2458 *${as_nl}*)
2459 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002460 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2461$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002462 esac
2463 case $ac_var in #(
2464 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002465 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2466 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 esac ;;
2468 esac
2469 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002470 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2472 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002473 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474 "s/'\''/'\''\\\\'\'''\''/g;
2475 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2476 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002477 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002478 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002479 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 esac |
2481 sort
2482)
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002484
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002485 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002486## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002487## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 echo
2489 for ac_var in $ac_subst_vars
2490 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491 eval ac_val=\$$ac_var
2492 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002493 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002494 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002495 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 done | sort
2497 echo
2498
2499 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002500 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002502## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002503 echo
2504 for ac_var in $ac_subst_files
2505 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002506 eval ac_val=\$$ac_var
2507 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002508 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002509 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002510 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002511 done | sort
2512 echo
2513 fi
2514
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002516 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002517## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002518## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002519 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 echo
2522 fi
2523 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002524 $as_echo "$as_me: caught signal $ac_signal"
2525 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002527 rm -f core *.core core.conftest.* &&
2528 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002529 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002531for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002532 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002533done
2534ac_signal=0
2535
2536# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002538
Matthias Kloseb9621712010-04-24 17:59:49 +00002539$as_echo "/* confdefs.h */" > confdefs.h
2540
Martin v. Löwis11437992002-04-12 09:54:03 +00002541# Predefined preprocessor variables.
2542
2543cat >>confdefs.h <<_ACEOF
2544#define PACKAGE_NAME "$PACKAGE_NAME"
2545_ACEOF
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547cat >>confdefs.h <<_ACEOF
2548#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2549_ACEOF
2550
Martin v. Löwis11437992002-04-12 09:54:03 +00002551cat >>confdefs.h <<_ACEOF
2552#define PACKAGE_VERSION "$PACKAGE_VERSION"
2553_ACEOF
2554
Martin v. Löwis11437992002-04-12 09:54:03 +00002555cat >>confdefs.h <<_ACEOF
2556#define PACKAGE_STRING "$PACKAGE_STRING"
2557_ACEOF
2558
Martin v. Löwis11437992002-04-12 09:54:03 +00002559cat >>confdefs.h <<_ACEOF
2560#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2561_ACEOF
2562
Matthias Kloseb9621712010-04-24 17:59:49 +00002563cat >>confdefs.h <<_ACEOF
2564#define PACKAGE_URL "$PACKAGE_URL"
2565_ACEOF
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567
2568# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002569# Prefer an explicitly selected file to automatically selected ones.
2570ac_site_file1=NONE
2571ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002573 # We do not want a PATH search for config.site.
2574 case $CONFIG_SITE in #((
2575 -*) ac_site_file1=./$CONFIG_SITE;;
2576 */*) ac_site_file1=$CONFIG_SITE;;
2577 *) ac_site_file1=./$CONFIG_SITE;;
2578 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002579elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002580 ac_site_file1=$prefix/share/config.site
2581 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582else
Matthias Kloseb9621712010-04-24 17:59:49 +00002583 ac_site_file1=$ac_default_prefix/share/config.site
2584 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002585fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002586for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002587do
Matthias Kloseb9621712010-04-24 17:59:49 +00002588 test "x$ac_site_file" = xNONE && continue
2589 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2590 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2591$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002593 . "$ac_site_file" \
2594 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002597See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002598 fi
2599done
2600
2601if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002602 # Some versions of bash will fail to source /dev/null (special files
2603 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2604 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2606$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002607 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002608 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2609 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002610 esac
2611 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002612else
Matthias Kloseb9621712010-04-24 17:59:49 +00002613 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2614$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 >$cache_file
2616fi
2617
2618# Check that the precious variables saved in the cache have kept the same
2619# value.
2620ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002621for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2623 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002624 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2625 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 case $ac_old_set,$ac_new_set in
2627 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002628 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2629$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 +00002630 ac_cache_corrupted=: ;;
2631 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002632 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2633$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 ac_cache_corrupted=: ;;
2635 ,);;
2636 *)
2637 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 # differences in whitespace do not lead to failure.
2639 ac_old_val_w=`echo x $ac_old_val`
2640 ac_new_val_w=`echo x $ac_new_val`
2641 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2643$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2644 ac_cache_corrupted=:
2645 else
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2647$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2648 eval $ac_var=\$ac_old_val
2649 fi
2650 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2651$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2653$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002654 fi;;
2655 esac
2656 # Pass precious variables to config.status.
2657 if test "$ac_new_set" = set; then
2658 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 *) ac_arg=$ac_var=$ac_new_val ;;
2661 esac
2662 case " $ac_configure_args " in
2663 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002665 esac
2666 fi
2667done
2668if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002669 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2670$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2672$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002673 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002675## -------------------- ##
2676## Main body of script. ##
2677## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002678
Guido van Rossum7f43da71994-08-01 12:15:30 +00002679ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002681ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2682ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2683ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002684
Guido van Rossum627b2d71993-12-24 10:39:16 +00002685
Michael W. Hudson54241132001-12-07 15:38:26 +00002686
Trent Nelson4d4ec652012-10-16 08:51:24 -04002687
Trent Nelson5595ab52012-10-17 04:47:31 -04002688if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002689 # If we're building out-of-tree, we need to make sure the following
2690 # resources get picked up before their $srcdir counterparts.
2691 # Objects/ -> typeslots.inc
2692 # Include/ -> Python-ast.h, graminit.h
2693 # Python/ -> importlib.h
2694 # (A side effect of this is that these resources will automatically be
2695 # regenerated when building out-of-tree, regardless of whether or not
2696 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2697 # off.)
2698 BASECPPFLAGS="-IObjects -IInclude -IPython"
2699else
2700 BASECPPFLAGS=""
2701fi
2702
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002703
2704
2705
2706
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002707if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002708then
2709# Extract the first word of "hg", so it can be a program name with args.
2710set dummy hg; ac_word=$2
2711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002713if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714 $as_echo_n "(cached) " >&6
2715else
2716 if test -n "$HAS_HG"; then
2717 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2718else
2719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2720for as_dir in $PATH
2721do
2722 IFS=$as_save_IFS
2723 test -z "$as_dir" && as_dir=.
2724 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002725 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002726 ac_cv_prog_HAS_HG="found"
2727 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2728 break 2
2729 fi
2730done
2731 done
2732IFS=$as_save_IFS
2733
2734 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2735fi
2736fi
2737HAS_HG=$ac_cv_prog_HAS_HG
2738if test -n "$HAS_HG"; then
2739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2740$as_echo "$HAS_HG" >&6; }
2741else
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2743$as_echo "no" >&6; }
2744fi
2745
2746
2747else
2748HAS_HG=no-repository
2749fi
2750if test $HAS_HG = found
2751then
2752 HGVERSION="hg id -i \$(srcdir)"
2753 HGTAG="hg id -t \$(srcdir)"
2754 HGBRANCH="hg id -b \$(srcdir)"
2755else
2756 HGVERSION=""
2757 HGTAG=""
2758 HGBRANCH=""
2759fi
2760
2761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002762ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002763
2764
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002765ac_aux_dir=
2766for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2767 if test -f "$ac_dir/install-sh"; then
2768 ac_aux_dir=$ac_dir
2769 ac_install_sh="$ac_aux_dir/install-sh -c"
2770 break
2771 elif test -f "$ac_dir/install.sh"; then
2772 ac_aux_dir=$ac_dir
2773 ac_install_sh="$ac_aux_dir/install.sh -c"
2774 break
2775 elif test -f "$ac_dir/shtool"; then
2776 ac_aux_dir=$ac_dir
2777 ac_install_sh="$ac_aux_dir/shtool install -c"
2778 break
2779 fi
2780done
2781if test -z "$ac_aux_dir"; then
2782 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2783fi
2784
2785# These three variables are undocumented and unsupported,
2786# and are intended to be withdrawn in a future Autoconf release.
2787# They can cause serious problems if a builder's source tree is in a directory
2788# whose full name contains unusual characters.
2789ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2790ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2791ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2792
2793
2794# Make sure we can run config.sub.
2795$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2796 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2797
2798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2799$as_echo_n "checking build system type... " >&6; }
2800if ${ac_cv_build+:} false; then :
2801 $as_echo_n "(cached) " >&6
2802else
2803 ac_build_alias=$build_alias
2804test "x$ac_build_alias" = x &&
2805 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2806test "x$ac_build_alias" = x &&
2807 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2808ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2809 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2810
2811fi
2812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2813$as_echo "$ac_cv_build" >&6; }
2814case $ac_cv_build in
2815*-*-*) ;;
2816*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2817esac
2818build=$ac_cv_build
2819ac_save_IFS=$IFS; IFS='-'
2820set x $ac_cv_build
2821shift
2822build_cpu=$1
2823build_vendor=$2
2824shift; shift
2825# Remember, the first character of IFS is used to create $*,
2826# except with old shells:
2827build_os=$*
2828IFS=$ac_save_IFS
2829case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2830
2831
2832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2833$as_echo_n "checking host system type... " >&6; }
2834if ${ac_cv_host+:} false; then :
2835 $as_echo_n "(cached) " >&6
2836else
2837 if test "x$host_alias" = x; then
2838 ac_cv_host=$ac_cv_build
2839else
2840 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2841 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2842fi
2843
2844fi
2845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2846$as_echo "$ac_cv_host" >&6; }
2847case $ac_cv_host in
2848*-*-*) ;;
2849*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2850esac
2851host=$ac_cv_host
2852ac_save_IFS=$IFS; IFS='-'
2853set x $ac_cv_host
2854shift
2855host_cpu=$1
2856host_vendor=$2
2857shift; shift
2858# Remember, the first character of IFS is used to create $*,
2859# except with old shells:
2860host_os=$*
2861IFS=$ac_save_IFS
2862case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2863
2864
2865
doko@python.orga10e4a92013-01-25 18:45:12 +01002866
2867
Ned Deilyfcbc2462014-08-22 13:32:49 -07002868# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2869rm -f pybuilddir.txt
2870
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002871for ac_prog in python$PACKAGE_VERSION python3 python
2872do
2873 # Extract the first word of "$ac_prog", so it can be a program name with args.
2874set dummy $ac_prog; ac_word=$2
2875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2876$as_echo_n "checking for $ac_word... " >&6; }
2877if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2878 $as_echo_n "(cached) " >&6
2879else
2880 if test -n "$PYTHON_FOR_GEN"; then
2881 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2882else
2883as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2884for as_dir in $PATH
2885do
2886 IFS=$as_save_IFS
2887 test -z "$as_dir" && as_dir=.
2888 for ac_exec_ext in '' $ac_executable_extensions; do
2889 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2890 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2891 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2892 break 2
2893 fi
2894done
2895 done
2896IFS=$as_save_IFS
2897
2898fi
2899fi
2900PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2901if test -n "$PYTHON_FOR_GEN"; then
2902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2903$as_echo "$PYTHON_FOR_GEN" >&6; }
2904else
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2906$as_echo "no" >&6; }
2907fi
2908
2909
2910 test -n "$PYTHON_FOR_GEN" && break
2911done
2912test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2913
2914if test "$PYTHON_FOR_GEN" = not-found; then
2915 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2916 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2917 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2918fi
2919
2920
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002921if test "$cross_compiling" = yes; then
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2923$as_echo_n "checking for python interpreter for cross build... " >&6; }
2924 if test -z "$PYTHON_FOR_BUILD"; then
2925 for interp in python$PACKAGE_VERSION python3 python; do
2926 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002927 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 +02002928 break
2929 fi
2930 interp=
2931 done
2932 if test x$interp = x; then
2933 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2934 fi
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2936$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002937 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 +02002938 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002939 # Used to comment out stuff for rebuilding generated files
2940 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002941elif test "$cross_compiling" = maybe; then
2942 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002943else
2944 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002945 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002946fi
2947
2948
Martin v. Löwis11437992002-04-12 09:54:03 +00002949
Martin Pantereac67be2016-07-28 01:28:27 +00002950
Benjamin Petersond23f8222009-04-05 19:13:16 +00002951if test "$prefix" != "/"; then
2952 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2953fi
2954
2955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956
2957
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002958# We don't use PACKAGE_ variables, and they cause conflicts
2959# with other autoconf-based packages that include Python.h
2960grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2961rm confdefs.h
2962mv confdefs.h.new confdefs.h
2963
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002964
Benjamin Petersona8c22a02015-05-27 23:29:00 -05002965VERSION=3.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002966
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002967# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002968
2969SOVERSION=1.0
2970
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002971# The later defininition of _XOPEN_SOURCE disables certain features
2972# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2973
Matthias Kloseb9621712010-04-24 17:59:49 +00002974$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002975
2976
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2979# them.
2980
Matthias Kloseb9621712010-04-24 17:59:49 +00002981$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002982
2983
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2985# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2986# them.
2987
Matthias Kloseb9621712010-04-24 17:59:49 +00002988$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002989
2990
Martin v. Löwisd6320502004-08-12 13:45:08 +00002991# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2992# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002995
2996
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2999# them.
3000
Matthias Kloseb9621712010-04-24 17:59:49 +00003001$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003002
3003
3004
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003005define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003006
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003007# Arguments passed to configure.
3008
3009CONFIG_ARGS="$ac_configure_args"
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3012$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003013# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003014if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003015 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003016 case $enableval in
3017 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003018 # Locate the best usable SDK, see Mac/README.txt for more
3019 # information
3020 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003021 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003022 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003023 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3024 if test ! -d "${enableval}"
3025 then
3026 enableval=/
3027 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003029 ;;
3030 esac
3031 case $enableval in
3032 no)
3033 UNIVERSALSDK=
3034 enable_universalsdk=
3035 ;;
3036 *)
3037 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003038 if test ! -d "${UNIVERSALSDK}"
3039 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003040 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003042 ;;
3043 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003044
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046else
3047
3048 UNIVERSALSDK=
3049 enable_universalsdk=
3050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003051fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003053if test -n "${UNIVERSALSDK}"
3054then
Matthias Kloseb9621712010-04-24 17:59:49 +00003055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3056$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057else
Matthias Kloseb9621712010-04-24 17:59:49 +00003058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3059$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003062
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003063
Ned Deily87adb6e2013-10-18 21:09:56 -07003064ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003065
Ned Deilycbfb9a52012-06-23 16:02:19 -07003066# For backward compatibility reasons we prefer to select '32-bit' if available,
3067# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003068UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003069if test "`uname -s`" = "Darwin"
3070then
3071 if test -n "${UNIVERSALSDK}"
3072 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003073 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074 then
3075 UNIVERSAL_ARCHS="intel"
3076 fi
3077 fi
3078fi
3079
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003080
Matthias Kloseb9621712010-04-24 17:59:49 +00003081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3082$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003083
3084# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003085if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087 UNIVERSAL_ARCHS="$withval"
3088
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089fi
3090
Ned Deily87adb6e2013-10-18 21:09:56 -07003091if test -n "${UNIVERSALSDK}"
3092then
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3094$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3095else
3096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3097$as_echo "no" >&6; }
3098fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003100
3101# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003102if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003103 withval=$with_framework_name;
3104 PYTHONFRAMEWORK=${withval}
3105 PYTHONFRAMEWORKDIR=${withval}.framework
3106 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3107
3108else
3109
3110 PYTHONFRAMEWORK=Python
3111 PYTHONFRAMEWORKDIR=Python.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3113
3114fi
3115
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003116# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003117if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003118 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003119 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003120 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003121 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003122 esac
3123 case $enableval in
3124 no)
3125 PYTHONFRAMEWORK=
3126 PYTHONFRAMEWORKDIR=no-framework
3127 PYTHONFRAMEWORKPREFIX=
3128 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003129 FRAMEWORKINSTALLFIRST=
3130 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003131 FRAMEWORKALTINSTALLFIRST=
3132 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003133 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003134 if test "x${prefix}" = "xNONE"; then
3135 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3136 else
3137 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3138 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003140 ;;
3141 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003142 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003143 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003144 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003145 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003146 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3147 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003148 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003150
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003151 if test "x${prefix}" = "xNONE" ; then
3152 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003154 else
3155 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3156 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003157
3158 case "${enableval}" in
3159 /System*)
3160 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3161 if test "${prefix}" = "NONE" ; then
3162 # See below
3163 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3164 fi
3165 ;;
3166
3167 /Library*)
3168 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3169 ;;
3170
3171 */Library/Frameworks)
3172 MDIR="`dirname "${enableval}"`"
3173 MDIR="`dirname "${MDIR}"`"
3174 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3175
3176 if test "${prefix}" = "NONE"; then
3177 # User hasn't specified the
3178 # --prefix option, but wants to install
3179 # the framework in a non-default location,
3180 # ensure that the compatibility links get
3181 # installed relative to that prefix as well
3182 # instead of in /usr/local.
3183 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3184 fi
3185 ;;
3186
3187 *)
3188 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3189 ;;
3190 esac
3191
Jack Jansen127e56e2001-09-11 14:41:54 +00003192 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003193
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003194 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003195 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003196 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3201
3202 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3203
Jack Jansene578a632001-08-15 01:27:14 +00003204 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003205
Guido van Rossum563e7081996-09-10 18:20:48 +00003206else
Martin v. Löwis11437992002-04-12 09:54:03 +00003207
Jack Jansene578a632001-08-15 01:27:14 +00003208 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003209 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003210 PYTHONFRAMEWORKPREFIX=
3211 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212 FRAMEWORKINSTALLFIRST=
3213 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003214 FRAMEWORKALTINSTALLFIRST=
3215 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003216 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003217 if test "x${prefix}" = "xNONE" ; then
3218 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3219 else
3220 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3221 fi
Jack Jansene578a632001-08-15 01:27:14 +00003222 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003223
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003224
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003225fi
3226
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227
3228
Michael W. Hudson54241132001-12-07 15:38:26 +00003229
3230
3231
3232
Jack Jansene578a632001-08-15 01:27:14 +00003233
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003234
3235
3236
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003237
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003238
Ned Deilyb8f944f2013-11-21 22:42:25 -08003239
Jack Jansene578a632001-08-15 01:27:14 +00003240##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003241## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003242## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003243##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003244# Set name for machine-dependent library files
3245
Matthias Kloseb9621712010-04-24 17:59:49 +00003246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3247$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003248if test -z "$MACHDEP"
3249then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003250 # avoid using uname for cross builds
3251 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003252 # ac_sys_system and ac_sys_release are used for setting
3253 # a lot of different things including 'define_xopen_source'
3254 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 case "$host" in
3256 *-*-linux*)
3257 ac_sys_system=Linux
3258 ;;
3259 *-*-cygwin*)
3260 ac_sys_system=Cygwin
3261 ;;
3262 *)
3263 # for now, limit cross builds to known configurations
3264 MACHDEP="unknown"
3265 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3266 esac
3267 ac_sys_release=
3268 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003269 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003270 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003271 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003272 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003276 fi
3277 ac_md_system=`echo $ac_sys_system |
3278 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3279 ac_md_release=`echo $ac_sys_release |
3280 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3281 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003282
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003283 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003284 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003285 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003286 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003287 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003288 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290fi
Guido van Rossum91922671997-10-09 20:24:13 +00003291
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003292
3293if test "$cross_compiling" = yes; then
3294 case "$host" in
3295 *-*-linux*)
3296 case "$host_cpu" in
3297 arm*)
3298 _host_cpu=arm
3299 ;;
3300 *)
3301 _host_cpu=$host_cpu
3302 esac
3303 ;;
3304 *-*-cygwin*)
3305 _host_cpu=
3306 ;;
3307 *)
3308 # for now, limit cross builds to known configurations
3309 MACHDEP="unknown"
3310 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3311 esac
3312 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3313fi
3314
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003315# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3316# disable features if it is defined, without any means to access these
3317# features as extensions. For these systems, we skip the definition of
3318# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3319# some feature, make sure there is no alternative way to access this
3320# feature. Also, when using wildcards, make sure you have verified the
3321# need for not defining _XOPEN_SOURCE on all systems matching the
3322# wildcard, and that the wildcard does not include future systems
3323# (which may remove their limitations).
3324case $ac_sys_system/$ac_sys_release in
3325 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3326 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003327 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003328 # In addition, Stefan Krah confirms that issue #1244610 exists through
3329 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003330 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003331 define_xopen_source=no
3332 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3333 # also defined. This can be overridden by defining _BSD_SOURCE
3334 # As this has a different meaning on Linux, only define it on OpenBSD
3335
Matthias Kloseb9621712010-04-24 17:59:49 +00003336$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003337
3338 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003340 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3341 # also defined. This can be overridden by defining _BSD_SOURCE
3342 # As this has a different meaning on Linux, only define it on OpenBSD
3343
Matthias Kloseb9621712010-04-24 17:59:49 +00003344$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345
3346 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003347 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3348 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3349 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003350 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 +00003351 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003352 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3353 # request to enable features supported by the standard as a request
3354 # to disable features not supported by the standard. The best way
3355 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3356 # entirely and define __EXTENSIONS__ instead.
3357 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003358 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003359 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3360 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003361 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003362 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003363 define_xopen_source=no;;
3364 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003365 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003366 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003367 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003368 # On FreeBSD 4, the math functions C89 does not cover are never defined
3369 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3370 FreeBSD/4.*)
3371 define_xopen_source=no;;
3372 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3373 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3374 # identifies itself as Darwin/7.*
3375 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3376 # disables platform specific features beyond repair.
3377 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3378 # has no effect, don't bother defining them
3379 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003380 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003381 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003382 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003383 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3384 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3385 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003386 AIX/4)
3387 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003388 AIX/5)
3389 if test `uname -r` -eq 1; then
3390 define_xopen_source=no
3391 fi
3392 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003393 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3394 # defining NI_NUMERICHOST.
3395 QNX/6.3.2)
3396 define_xopen_source=no
3397 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003398
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003399esac
3400
3401if test $define_xopen_source = yes
3402then
Victor Stinner14d098d2011-09-07 22:29:43 +02003403 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003404
Victor Stinner14d098d2011-09-07 22:29:43 +02003405$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003406
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003407
3408 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3409 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3410 # several APIs are not declared. Since this is also needed in some
3411 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
Matthias Kloseb9621712010-04-24 17:59:49 +00003413$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
3415
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003416
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003417$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003418
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003419fi
3420
Christian Heimes647cd872013-12-07 23:39:33 +01003421# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3422case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003423 hp*|HP*)
3424 define_stdc_a1=yes;;
3425 *)
3426 define_stdc_a1=no;;
3427esac
3428
3429if test $define_stdc_a1 = yes
3430then
Christian Heimes647cd872013-12-07 23:39:33 +01003431
3432$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3433
Christian Heimesb02bcae2013-12-08 15:21:08 +01003434fi
Christian Heimes647cd872013-12-07 23:39:33 +01003435
Guido van Rossum91922671997-10-09 20:24:13 +00003436#
3437# SGI compilers allow the specification of the both the ABI and the
3438# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003439# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003440#
3441# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3442# thus supply support for various ABI/ISA combinations. The MACHDEP
3443# variable is also adjusted.
3444#
3445
3446if test ! -z "$SGI_ABI"
3447then
3448 CC="cc $SGI_ABI"
3449 LDFLAGS="$SGI_ABI $LDFLAGS"
3450 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3453$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3456# it may influence the way we can build extensions, so distutils
3457# needs to check it
3458
Thomas Wouters477c8d52006-05-27 19:21:47 +00003459
Jack Jansen6b08a402004-06-03 12:41:45 +00003460CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003462
Guido van Rossum627b2d71993-12-24 10:39:16 +00003463# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003464
3465# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3466# for debug/optimization stuff. BASECFLAGS is for flags that are required
3467# just to get things to compile and link. Users are free to override OPT
3468# when running configure or make. The build should not break if they do.
3469# BASECFLAGS should generally not be messed with, however.
3470
3471# XXX shouldn't some/most/all of this code be merged with the stuff later
3472# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3474$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003477if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003479 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003480 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003481 without_gcc=yes;;
3482 yes) CC=gcc
3483 without_gcc=no;;
3484 *) CC=$withval
3485 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003486 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003487else
Martin v. Löwis11437992002-04-12 09:54:03 +00003488
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003489 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003490 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003491 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003492 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003493 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494fi
3495
Matthias Kloseb9621712010-04-24 17:59:49 +00003496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3497$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003498
Zachary Ware5af85642015-12-21 12:09:17 -06003499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3500$as_echo_n "checking for --with-icc... " >&6; }
3501
3502# Check whether --with-icc was given.
3503if test "${with_icc+set}" = set; then :
3504 withval=$with_icc;
3505 case $withval in
3506 no) CC=${CC:-cc}
3507 with_icc=no;;
3508 yes) CC=icc
3509 CXX=icpc
3510 with_icc=yes;;
3511 *) CC=$withval
3512 with_icc=$withval;;
3513 esac
3514else
3515
3516 with_icc=no
3517fi
3518
3519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3520$as_echo "$with_icc" >&6; }
3521
Guido van Rossum8b131c51995-03-09 14:10:13 +00003522# If the user switches compilers, we can't believe the cache
3523if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3524then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003525 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003526(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003527fi
3528
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003529# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3530# when the compiler supports them, but we don't always want -O2, and
3531# we set -g later.
3532if test -z "$CFLAGS"; then
3533 CFLAGS=
3534fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003535
3536if test "$ac_sys_system" = "Darwin"
3537then
3538 # Compiler selection on MacOSX is more complicated than
3539 # AC_PROG_CC can handle, see Mac/README.txt for more
3540 # information
3541 if test -z "${CC}"
3542 then
3543 found_gcc=
3544 found_clang=
3545 as_save_IFS=$IFS; IFS=:
3546 for as_dir in $PATH
3547 do
3548 IFS=$as_save_IFS
3549 if test -x $as_dir/gcc; then
3550 if test -z "${found_gcc}"; then
3551 found_gcc=$as_dir/gcc
3552 fi
3553 fi
3554 if test -x $as_dir/clang; then
3555 if test -z "${found_clang}"; then
3556 found_clang=$as_dir/clang
3557 fi
3558 fi
3559 done
3560 IFS=$as_save_IFS
3561
3562 if test -n "$found_gcc" -a -n "$found_clang"
3563 then
3564 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3565 then
3566 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3567$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3568 CC="$found_clang"
3569 CXX="$found_clang++"
3570 fi
3571
3572
3573 elif test -z "$found_gcc" -a -n "$found_clang"
3574 then
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3576$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3577 CC="$found_clang"
3578 CXX="$found_clang++"
3579
3580 elif test -z "$found_gcc" -a -z "$found_clang"
3581 then
3582 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3583 if test -n "${found_clang}"
3584 then
3585 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3586$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3587 CC="${found_clang}"
3588 CXX="`/usr/bin/xcrun -find clang++`"
3589
3590 # else: use default behaviour
3591 fi
3592 fi
3593 fi
3594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003595ac_ext=c
3596ac_cpp='$CPP $CPPFLAGS'
3597ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3598ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3599ac_compiler_gnu=$ac_cv_c_compiler_gnu
3600if test -n "$ac_tool_prefix"; then
3601 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3602set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3604$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003605if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003606 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003607else
3608 if test -n "$CC"; then
3609 ac_cv_prog_CC="$CC" # Let the user override the test.
3610else
Martin v. Löwis11437992002-04-12 09:54:03 +00003611as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3612for as_dir in $PATH
3613do
3614 IFS=$as_save_IFS
3615 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003616 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003617 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003618 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003619 $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 +00003620 break 2
3621 fi
3622done
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003624IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003625
Jack Jansendd19cf82001-12-06 22:36:17 +00003626fi
3627fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003628CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003629if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3631$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003632else
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3634$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003635fi
3636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003637
Martin v. Löwis11437992002-04-12 09:54:03 +00003638fi
3639if test -z "$ac_cv_prog_CC"; then
3640 ac_ct_CC=$CC
3641 # Extract the first word of "gcc", so it can be a program name with args.
3642set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3644$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003645if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003646 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
3648 if test -n "$ac_ct_CC"; then
3649 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3650else
3651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3652for as_dir in $PATH
3653do
3654 IFS=$as_save_IFS
3655 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003656 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003657 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003659 $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 +00003660 break 2
3661 fi
3662done
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003664IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003665
3666fi
3667fi
3668ac_ct_CC=$ac_cv_prog_ac_ct_CC
3669if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3671$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003672else
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3674$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003675fi
3676
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003677 if test "x$ac_ct_CC" = x; then
3678 CC=""
3679 else
3680 case $cross_compiling:$ac_tool_warned in
3681yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003682{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3683$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684ac_tool_warned=yes ;;
3685esac
3686 CC=$ac_ct_CC
3687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003688else
3689 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003690fi
3691
Jack Jansendd19cf82001-12-06 22:36:17 +00003692if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693 if test -n "$ac_tool_prefix"; then
3694 # 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 +00003695set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3697$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003698if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003699 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003700else
3701 if test -n "$CC"; then
3702 ac_cv_prog_CC="$CC" # Let the user override the test.
3703else
Martin v. Löwis11437992002-04-12 09:54:03 +00003704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3705for as_dir in $PATH
3706do
3707 IFS=$as_save_IFS
3708 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003709 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003712 $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 +00003713 break 2
3714 fi
3715done
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003718
3719fi
3720fi
3721CC=$ac_cv_prog_CC
3722if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3724$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003725else
Matthias Kloseb9621712010-04-24 17:59:49 +00003726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3727$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003728fi
3729
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003730
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003732fi
3733if test -z "$CC"; then
3734 # Extract the first word of "cc", so it can be a program name with args.
3735set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3737$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003738if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003739 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003740else
3741 if test -n "$CC"; then
3742 ac_cv_prog_CC="$CC" # Let the user override the test.
3743else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003745as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3746for as_dir in $PATH
3747do
3748 IFS=$as_save_IFS
3749 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003751 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003752 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3753 ac_prog_rejected=yes
3754 continue
3755 fi
3756 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 $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 +00003758 break 2
3759 fi
3760done
Matthias Kloseb9621712010-04-24 17:59:49 +00003761 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003763
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764if test $ac_prog_rejected = yes; then
3765 # We found a bogon in the path, so make sure we never use it.
3766 set dummy $ac_cv_prog_CC
3767 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003768 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003769 # We chose a different compiler from the bogus one.
3770 # However, it has the same basename, so the bogon will be chosen
3771 # first if we set CC to just the basename; use the full file name.
3772 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003773 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003774 fi
3775fi
3776fi
3777fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003778CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003779if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3781$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003782else
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3784$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003785fi
3786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003787
Martin v. Löwis11437992002-04-12 09:54:03 +00003788fi
3789if test -z "$CC"; then
3790 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 do
3793 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3794set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3796$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003797if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003798 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003799else
3800 if test -n "$CC"; then
3801 ac_cv_prog_CC="$CC" # Let the user override the test.
3802else
Martin v. Löwis11437992002-04-12 09:54:03 +00003803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3804for as_dir in $PATH
3805do
3806 IFS=$as_save_IFS
3807 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003808 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003810 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003811 $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 +00003812 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003813 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003814done
Matthias Kloseb9621712010-04-24 17:59:49 +00003815 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003817
3818fi
3819fi
3820CC=$ac_cv_prog_CC
3821if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3823$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003824else
Matthias Kloseb9621712010-04-24 17:59:49 +00003825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3826$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003827fi
3828
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003829
Martin v. Löwis11437992002-04-12 09:54:03 +00003830 test -n "$CC" && break
3831 done
3832fi
3833if test -z "$CC"; then
3834 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003836do
3837 # Extract the first word of "$ac_prog", so it can be a program name with args.
3838set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3840$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003841if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003842 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003843else
3844 if test -n "$ac_ct_CC"; then
3845 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3846else
3847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3848for as_dir in $PATH
3849do
3850 IFS=$as_save_IFS
3851 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003852 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003853 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003854 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003855 $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 +00003856 break 2
3857 fi
3858done
Matthias Kloseb9621712010-04-24 17:59:49 +00003859 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003860IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003861
Martin v. Löwis11437992002-04-12 09:54:03 +00003862fi
3863fi
3864ac_ct_CC=$ac_cv_prog_ac_ct_CC
3865if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3867$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003868else
Matthias Kloseb9621712010-04-24 17:59:49 +00003869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3870$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003871fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873
Martin v. Löwis11437992002-04-12 09:54:03 +00003874 test -n "$ac_ct_CC" && break
3875done
Michael W. Hudson54241132001-12-07 15:38:26 +00003876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877 if test "x$ac_ct_CC" = x; then
3878 CC=""
3879 else
3880 case $cross_compiling:$ac_tool_warned in
3881yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003882{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3883$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884ac_tool_warned=yes ;;
3885esac
3886 CC=$ac_ct_CC
3887 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003888fi
3889
3890fi
3891
3892
Matthias Kloseb9621712010-04-24 17:59:49 +00003893test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3894$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003895as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003896See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003897
3898# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003899$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3900set X $ac_compile
3901ac_compiler=$2
3902for ac_option in --version -v -V -qversion; do
3903 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003904case "(($ac_try" in
3905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3906 *) ac_try_echo=$ac_try;;
3907esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3909$as_echo "$ac_try_echo"; } >&5
3910 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003911 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003912 if test -s conftest.err; then
3913 sed '10a\
3914... rest of stderr output deleted ...
3915 10q' conftest.err >conftest.er1
3916 cat conftest.er1 >&5
3917 fi
3918 rm -f conftest.er1 conftest.err
3919 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3920 test $ac_status = 0; }
3921done
Martin v. Löwis11437992002-04-12 09:54:03 +00003922
Matthias Kloseb9621712010-04-24 17:59:49 +00003923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003924/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003925
Martin v. Löwis11437992002-04-12 09:54:03 +00003926int
3927main ()
3928{
3929
3930 ;
3931 return 0;
3932}
3933_ACEOF
3934ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003935ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003936# Try to create an executable without -o first, disregard a.out.
3937# It will help us diagnose broken compilers, and finding out an intuition
3938# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3940$as_echo_n "checking whether the C compiler works... " >&6; }
3941ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3942
3943# The possible output files:
3944ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3945
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003946ac_rmfiles=
3947for ac_file in $ac_files
3948do
3949 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3952 esac
3953done
3954rm -f $ac_rmfiles
3955
Matthias Kloseb9621712010-04-24 17:59:49 +00003956if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003957case "(($ac_try" in
3958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3959 *) ac_try_echo=$ac_try;;
3960esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003961eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3962$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003963 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003964 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003965 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3966 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3968# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3969# in a Makefile. We should not override ac_cv_exeext if it was cached,
3970# so that the user can short-circuit this test for compilers unknown to
3971# Autoconf.
3972for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003973do
3974 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003975 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003976 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003977 ;;
3978 [ab].out )
3979 # We found the default executable, but exeext='' is most
3980 # certainly right.
3981 break;;
3982 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003983 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003984 then :; else
3985 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3986 fi
3987 # We set ac_cv_exeext here because the later test for it is not
3988 # safe: cross compilers may not add the suffix if given an `-o'
3989 # argument, so we may need to know it at that point already.
3990 # Even if this section looks crufty: it has the advantage of
3991 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003992 break;;
3993 * )
3994 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003995 esac
3996done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997test "$ac_cv_exeext" = no && ac_cv_exeext=
3998
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003999else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 ac_file=''
4001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004002if test -z "$ac_file"; then :
4003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4004$as_echo "no" >&6; }
4005$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004006sed 's/^/| /' conftest.$ac_ext >&5
4007
Matthias Kloseb9621712010-04-24 17:59:49 +00004008{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004010as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004011See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004012else
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4014$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4017$as_echo_n "checking for C compiler default output file name... " >&6; }
4018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4019$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004021
Matthias Kloseb9621712010-04-24 17:59:49 +00004022rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004023ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4025$as_echo_n "checking for suffix of executables... " >&6; }
4026if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004027case "(($ac_try" in
4028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4029 *) ac_try_echo=$ac_try;;
4030esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4032$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004033 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004034 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004035 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4036 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004037 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4038# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4039# work properly (i.e., refer to `conftest.exe'), while it won't with
4040# `rm'.
4041for ac_file in conftest.exe conftest conftest.*; do
4042 test -f "$ac_file" || continue
4043 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004045 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4046 break;;
4047 * ) break;;
4048 esac
4049done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004050else
Matthias Kloseb9621712010-04-24 17:59:49 +00004051 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4052$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004053as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004054See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004055fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004056rm -f conftest conftest$ac_cv_exeext
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4058$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004059
4060rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004061EXEEXT=$ac_cv_exeext
4062ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4064/* end confdefs.h. */
4065#include <stdio.h>
4066int
4067main ()
4068{
4069FILE *f = fopen ("conftest.out", "w");
4070 return ferror (f) || fclose (f) != 0;
4071
4072 ;
4073 return 0;
4074}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004075_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004076ac_clean_files="$ac_clean_files conftest.out"
4077# Check that the compiler produces executables we can run. If not, either
4078# the compiler is broken, or we cross compile.
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4080$as_echo_n "checking whether we are cross compiling... " >&6; }
4081if test "$cross_compiling" != yes; then
4082 { { ac_try="$ac_link"
4083case "(($ac_try" in
4084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4085 *) ac_try_echo=$ac_try;;
4086esac
4087eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4088$as_echo "$ac_try_echo"; } >&5
4089 (eval "$ac_link") 2>&5
4090 ac_status=$?
4091 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4092 test $ac_status = 0; }
4093 if { ac_try='./conftest$ac_cv_exeext'
4094 { { case "(($ac_try" in
4095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4096 *) ac_try_echo=$ac_try;;
4097esac
4098eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4099$as_echo "$ac_try_echo"; } >&5
4100 (eval "$ac_try") 2>&5
4101 ac_status=$?
4102 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4103 test $ac_status = 0; }; }; then
4104 cross_compiling=no
4105 else
4106 if test "$cross_compiling" = maybe; then
4107 cross_compiling=yes
4108 else
4109 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004111as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004112If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004113See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004114 fi
4115 fi
4116fi
4117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4118$as_echo "$cross_compiling" >&6; }
4119
4120rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4121ac_clean_files=$ac_clean_files_save
4122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4123$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004124if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo_n "(cached) " >&6
4126else
4127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004128/* end confdefs.h. */
4129
4130int
4131main ()
4132{
4133
4134 ;
4135 return 0;
4136}
4137_ACEOF
4138rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004139if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004140case "(($ac_try" in
4141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4142 *) ac_try_echo=$ac_try;;
4143esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004144eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4145$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004146 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004147 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004148 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4149 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004150 for ac_file in conftest.o conftest.obj conftest.*; do
4151 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004152 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004154 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4155 break;;
4156 esac
4157done
4158else
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004160sed 's/^/| /' conftest.$ac_ext >&5
4161
Matthias Kloseb9621712010-04-24 17:59:49 +00004162{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004164as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004165See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004166fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004167rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004168fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4170$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004171OBJEXT=$ac_cv_objext
4172ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4174$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004175if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004176 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004177else
Matthias Kloseb9621712010-04-24 17:59:49 +00004178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004179/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004180
Martin v. Löwis11437992002-04-12 09:54:03 +00004181int
4182main ()
4183{
4184#ifndef __GNUC__
4185 choke me
4186#endif
4187
4188 ;
4189 return 0;
4190}
4191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004192if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004193 ac_compiler_gnu=yes
4194else
Matthias Kloseb9621712010-04-24 17:59:49 +00004195 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004196fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004198ac_cv_c_compiler_gnu=$ac_compiler_gnu
4199
4200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4202$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4203if test $ac_compiler_gnu = yes; then
4204 GCC=yes
4205else
4206 GCC=
4207fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004208ac_test_CFLAGS=${CFLAGS+set}
4209ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4211$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004212if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004213 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004214else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215 ac_save_c_werror_flag=$ac_c_werror_flag
4216 ac_c_werror_flag=yes
4217 ac_cv_prog_cc_g=no
4218 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004221
Martin v. Löwis11437992002-04-12 09:54:03 +00004222int
4223main ()
4224{
4225
4226 ;
4227 return 0;
4228}
4229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004230if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004231 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232else
Matthias Kloseb9621712010-04-24 17:59:49 +00004233 CFLAGS=""
4234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235/* end confdefs.h. */
4236
4237int
4238main ()
4239{
4240
4241 ;
4242 return 0;
4243}
4244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004245if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004246
Matthias Kloseb9621712010-04-24 17:59:49 +00004247else
4248 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004249 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004251/* end confdefs.h. */
4252
4253int
4254main ()
4255{
4256
4257 ;
4258 return 0;
4259}
4260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004261if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004262 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004263fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4267fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4269 ac_c_werror_flag=$ac_save_c_werror_flag
4270fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4272$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004273if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004274 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004275elif test $ac_cv_prog_cc_g = yes; then
4276 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004277 CFLAGS="-g -O2"
4278 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004279 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004280 fi
4281else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004282 if test "$GCC" = yes; then
4283 CFLAGS="-O2"
4284 else
4285 CFLAGS=
4286 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4289$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004290if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004291 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004292else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004293 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004294ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004296/* end confdefs.h. */
4297#include <stdarg.h>
4298#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004299struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004300/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4301struct buf { int x; };
4302FILE * (*rcsopen) (struct buf *, struct stat *, int);
4303static char *e (p, i)
4304 char **p;
4305 int i;
4306{
4307 return p[i];
4308}
4309static char *f (char * (*g) (char **, int), char **p, ...)
4310{
4311 char *s;
4312 va_list v;
4313 va_start (v,p);
4314 s = g (p, va_arg (v,int));
4315 va_end (v);
4316 return s;
4317}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004318
4319/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4320 function prototypes and stuff, but not '\xHH' hex character constants.
4321 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004323 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4324 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004326int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4327
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4329 inside strings and character constants. */
4330#define FOO(x) 'x'
4331int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4332
Skip Montanaro6dead952003-09-25 14:50:04 +00004333int test (int i, double x);
4334struct s1 {int (*f) (int a);};
4335struct s2 {int (*f) (double a);};
4336int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4337int argc;
4338char **argv;
4339int
4340main ()
4341{
4342return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4343 ;
4344 return 0;
4345}
4346_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4348 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004349do
4350 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004351 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004352 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354rm -f core conftest.err conftest.$ac_objext
4355 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004356done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004358CC=$ac_save_CC
4359
4360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361# AC_CACHE_VAL
4362case "x$ac_cv_prog_cc_c89" in
4363 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4365$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4368$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004369 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4372$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004373esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004374if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004375
Matthias Kloseb9621712010-04-24 17:59:49 +00004376fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004377
Martin v. Löwis11437992002-04-12 09:54:03 +00004378ac_ext=c
4379ac_cpp='$CPP $CPPFLAGS'
4380ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4381ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4382ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004383
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004384ac_ext=c
4385ac_cpp='$CPP $CPPFLAGS'
4386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4388ac_compiler_gnu=$ac_cv_c_compiler_gnu
4389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4390$as_echo_n "checking how to run the C preprocessor... " >&6; }
4391# On Suns, sometimes $CPP names a directory.
4392if test -n "$CPP" && test -d "$CPP"; then
4393 CPP=
4394fi
4395if test -z "$CPP"; then
4396 if ${ac_cv_prog_CPP+:} false; then :
4397 $as_echo_n "(cached) " >&6
4398else
4399 # Double quotes because CPP needs to be expanded
4400 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4401 do
4402 ac_preproc_ok=false
4403for ac_c_preproc_warn_flag in '' yes
4404do
4405 # Use a header file that comes with gcc, so configuring glibc
4406 # with a fresh cross-compiler works.
4407 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4408 # <limits.h> exists even on freestanding compilers.
4409 # On the NeXT, cc -E runs the code through the compiler's parser,
4410 # not just through cpp. "Syntax error" is here to catch this case.
4411 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4412/* end confdefs.h. */
4413#ifdef __STDC__
4414# include <limits.h>
4415#else
4416# include <assert.h>
4417#endif
4418 Syntax error
4419_ACEOF
4420if ac_fn_c_try_cpp "$LINENO"; then :
4421
4422else
4423 # Broken: fails on valid input.
4424continue
4425fi
4426rm -f conftest.err conftest.i conftest.$ac_ext
4427
4428 # OK, works on sane cases. Now check whether nonexistent headers
4429 # can be detected and how.
4430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431/* end confdefs.h. */
4432#include <ac_nonexistent.h>
4433_ACEOF
4434if ac_fn_c_try_cpp "$LINENO"; then :
4435 # Broken: success on invalid input.
4436continue
4437else
4438 # Passes both tests.
4439ac_preproc_ok=:
4440break
4441fi
4442rm -f conftest.err conftest.i conftest.$ac_ext
4443
4444done
4445# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4446rm -f conftest.i conftest.err conftest.$ac_ext
4447if $ac_preproc_ok; then :
4448 break
4449fi
4450
4451 done
4452 ac_cv_prog_CPP=$CPP
4453
4454fi
4455 CPP=$ac_cv_prog_CPP
4456else
4457 ac_cv_prog_CPP=$CPP
4458fi
4459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4460$as_echo "$CPP" >&6; }
4461ac_preproc_ok=false
4462for ac_c_preproc_warn_flag in '' yes
4463do
4464 # Use a header file that comes with gcc, so configuring glibc
4465 # with a fresh cross-compiler works.
4466 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4467 # <limits.h> exists even on freestanding compilers.
4468 # On the NeXT, cc -E runs the code through the compiler's parser,
4469 # not just through cpp. "Syntax error" is here to catch this case.
4470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4471/* end confdefs.h. */
4472#ifdef __STDC__
4473# include <limits.h>
4474#else
4475# include <assert.h>
4476#endif
4477 Syntax error
4478_ACEOF
4479if ac_fn_c_try_cpp "$LINENO"; then :
4480
4481else
4482 # Broken: fails on valid input.
4483continue
4484fi
4485rm -f conftest.err conftest.i conftest.$ac_ext
4486
4487 # OK, works on sane cases. Now check whether nonexistent headers
4488 # can be detected and how.
4489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4490/* end confdefs.h. */
4491#include <ac_nonexistent.h>
4492_ACEOF
4493if ac_fn_c_try_cpp "$LINENO"; then :
4494 # Broken: success on invalid input.
4495continue
4496else
4497 # Passes both tests.
4498ac_preproc_ok=:
4499break
4500fi
4501rm -f conftest.err conftest.i conftest.$ac_ext
4502
4503done
4504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4505rm -f conftest.i conftest.err conftest.$ac_ext
4506if $ac_preproc_ok; then :
4507
4508else
4509 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4511as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4512See \`config.log' for more details" "$LINENO" 5; }
4513fi
4514
4515ac_ext=c
4516ac_cpp='$CPP $CPPFLAGS'
4517ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4518ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4519ac_compiler_gnu=$ac_cv_c_compiler_gnu
4520
4521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4522$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4523if ${ac_cv_path_GREP+:} false; then :
4524 $as_echo_n "(cached) " >&6
4525else
4526 if test -z "$GREP"; then
4527 ac_path_GREP_found=false
4528 # Loop through the user's path and test for each of PROGNAME-LIST
4529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4530for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4531do
4532 IFS=$as_save_IFS
4533 test -z "$as_dir" && as_dir=.
4534 for ac_prog in grep ggrep; do
4535 for ac_exec_ext in '' $ac_executable_extensions; do
4536 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4537 as_fn_executable_p "$ac_path_GREP" || continue
4538# Check for GNU ac_path_GREP and select it if it is found.
4539 # Check for GNU $ac_path_GREP
4540case `"$ac_path_GREP" --version 2>&1` in
4541*GNU*)
4542 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4543*)
4544 ac_count=0
4545 $as_echo_n 0123456789 >"conftest.in"
4546 while :
4547 do
4548 cat "conftest.in" "conftest.in" >"conftest.tmp"
4549 mv "conftest.tmp" "conftest.in"
4550 cp "conftest.in" "conftest.nl"
4551 $as_echo 'GREP' >> "conftest.nl"
4552 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4553 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4554 as_fn_arith $ac_count + 1 && ac_count=$as_val
4555 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4556 # Best one so far, save it but keep looking for a better one
4557 ac_cv_path_GREP="$ac_path_GREP"
4558 ac_path_GREP_max=$ac_count
4559 fi
4560 # 10*(2^10) chars as input seems more than enough
4561 test $ac_count -gt 10 && break
4562 done
4563 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4564esac
4565
4566 $ac_path_GREP_found && break 3
4567 done
4568 done
4569 done
4570IFS=$as_save_IFS
4571 if test -z "$ac_cv_path_GREP"; then
4572 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4573 fi
4574else
4575 ac_cv_path_GREP=$GREP
4576fi
4577
4578fi
4579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4580$as_echo "$ac_cv_path_GREP" >&6; }
4581 GREP="$ac_cv_path_GREP"
4582
4583
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004584
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004585
4586
Matthias Kloseb9621712010-04-24 17:59:49 +00004587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4588$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004590# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004591if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004592 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004593
4594 case $withval in
4595 no) with_cxx_main=no
4596 MAINCC='$(CC)';;
4597 yes) with_cxx_main=yes
4598 MAINCC='$(CXX)';;
4599 *) with_cxx_main=yes
4600 MAINCC=$withval
4601 if test -z "$CXX"
4602 then
4603 CXX=$withval
4604 fi;;
4605 esac
4606else
4607
4608 with_cxx_main=no
4609 MAINCC='$(CC)'
4610
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004611fi
4612
Matthias Kloseb9621712010-04-24 17:59:49 +00004613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4614$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004615
4616preset_cxx="$CXX"
4617if test -z "$CXX"
4618then
4619 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004620 gcc) if test -n "$ac_tool_prefix"; then
4621 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4622set dummy ${ac_tool_prefix}g++; ac_word=$2
4623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4624$as_echo_n "checking for $ac_word... " >&6; }
4625if ${ac_cv_path_CXX+:} false; then :
4626 $as_echo_n "(cached) " >&6
4627else
4628 case $CXX in
4629 [\\/]* | ?:[\\/]*)
4630 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4631 ;;
4632 *)
4633 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4634for as_dir in notfound
4635do
4636 IFS=$as_save_IFS
4637 test -z "$as_dir" && as_dir=.
4638 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004640 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4641 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4642 break 2
4643 fi
4644done
4645 done
4646IFS=$as_save_IFS
4647
4648 ;;
4649esac
4650fi
4651CXX=$ac_cv_path_CXX
4652if test -n "$CXX"; then
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4654$as_echo "$CXX" >&6; }
4655else
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4657$as_echo "no" >&6; }
4658fi
4659
4660
4661fi
4662if test -z "$ac_cv_path_CXX"; then
4663 ac_pt_CXX=$CXX
4664 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004665set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4667$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004668if ${ac_cv_path_ac_pt_CXX+:} false; then :
4669 $as_echo_n "(cached) " >&6
4670else
4671 case $ac_pt_CXX in
4672 [\\/]* | ?:[\\/]*)
4673 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4674 ;;
4675 *)
4676 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4677for as_dir in notfound
4678do
4679 IFS=$as_save_IFS
4680 test -z "$as_dir" && as_dir=.
4681 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004682 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004683 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4684 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4685 break 2
4686 fi
4687done
4688 done
4689IFS=$as_save_IFS
4690
4691 ;;
4692esac
4693fi
4694ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4695if test -n "$ac_pt_CXX"; then
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4697$as_echo "$ac_pt_CXX" >&6; }
4698else
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4700$as_echo "no" >&6; }
4701fi
4702
4703 if test "x$ac_pt_CXX" = x; then
4704 CXX="g++"
4705 else
4706 case $cross_compiling:$ac_tool_warned in
4707yes:)
4708{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4709$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4710ac_tool_warned=yes ;;
4711esac
4712 CXX=$ac_pt_CXX
4713 fi
4714else
4715 CXX="$ac_cv_path_CXX"
4716fi
4717 ;;
4718 cc) if test -n "$ac_tool_prefix"; then
4719 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4720set dummy ${ac_tool_prefix}c++; ac_word=$2
4721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004723if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004725else
4726 case $CXX in
4727 [\\/]* | ?:[\\/]*)
4728 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4729 ;;
4730 *)
4731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in notfound
4733do
4734 IFS=$as_save_IFS
4735 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004736 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004738 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004740 break 2
4741 fi
4742done
Matthias Kloseb9621712010-04-24 17:59:49 +00004743 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004744IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004745
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004746 ;;
4747esac
4748fi
4749CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004750if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4752$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004753else
Matthias Kloseb9621712010-04-24 17:59:49 +00004754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4755$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004757
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004758
4759fi
4760if test -z "$ac_cv_path_CXX"; then
4761 ac_pt_CXX=$CXX
4762 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004763set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4765$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004767 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004768else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004769 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004770 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004771 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 +00004772 ;;
4773 *)
4774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4775for as_dir in notfound
4776do
4777 IFS=$as_save_IFS
4778 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004779 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004780 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004781 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004782 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004783 break 2
4784 fi
4785done
Matthias Kloseb9621712010-04-24 17:59:49 +00004786 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004787IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004789 ;;
4790esac
4791fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004792ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4793if test -n "$ac_pt_CXX"; then
4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4795$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004796else
Matthias Kloseb9621712010-04-24 17:59:49 +00004797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4798$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004799fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004800
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004801 if test "x$ac_pt_CXX" = x; then
4802 CXX="c++"
4803 else
4804 case $cross_compiling:$ac_tool_warned in
4805yes:)
4806{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4807$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4808ac_tool_warned=yes ;;
4809esac
4810 CXX=$ac_pt_CXX
4811 fi
4812else
4813 CXX="$ac_cv_path_CXX"
4814fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004815 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004816 clang|*/clang) if test -n "$ac_tool_prefix"; then
4817 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4818set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4820$as_echo_n "checking for $ac_word... " >&6; }
4821if ${ac_cv_path_CXX+:} false; then :
4822 $as_echo_n "(cached) " >&6
4823else
4824 case $CXX in
4825 [\\/]* | ?:[\\/]*)
4826 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4827 ;;
4828 *)
4829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4830for as_dir in notfound
4831do
4832 IFS=$as_save_IFS
4833 test -z "$as_dir" && as_dir=.
4834 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004836 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4837 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4838 break 2
4839 fi
4840done
4841 done
4842IFS=$as_save_IFS
4843
Ned Deilycbfb9a52012-06-23 16:02:19 -07004844 ;;
4845esac
4846fi
4847CXX=$ac_cv_path_CXX
4848if test -n "$CXX"; then
4849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4850$as_echo "$CXX" >&6; }
4851else
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4853$as_echo "no" >&6; }
4854fi
4855
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004856
4857fi
4858if test -z "$ac_cv_path_CXX"; then
4859 ac_pt_CXX=$CXX
4860 # Extract the first word of "clang++", so it can be a program name with args.
4861set dummy clang++; ac_word=$2
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863$as_echo_n "checking for $ac_word... " >&6; }
4864if ${ac_cv_path_ac_pt_CXX+:} false; then :
4865 $as_echo_n "(cached) " >&6
4866else
4867 case $ac_pt_CXX in
4868 [\\/]* | ?:[\\/]*)
4869 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4870 ;;
4871 *)
4872 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4873for as_dir in notfound
4874do
4875 IFS=$as_save_IFS
4876 test -z "$as_dir" && as_dir=.
4877 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004878 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4880 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4881 break 2
4882 fi
4883done
4884 done
4885IFS=$as_save_IFS
4886
4887 ;;
4888esac
4889fi
4890ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4891if test -n "$ac_pt_CXX"; then
4892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4893$as_echo "$ac_pt_CXX" >&6; }
4894else
4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
4899 if test "x$ac_pt_CXX" = x; then
4900 CXX="clang++"
4901 else
4902 case $cross_compiling:$ac_tool_warned in
4903yes:)
4904{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4905$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4906ac_tool_warned=yes ;;
4907esac
4908 CXX=$ac_pt_CXX
4909 fi
4910else
4911 CXX="$ac_cv_path_CXX"
4912fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004913 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004914 icc|*/icc) if test -n "$ac_tool_prefix"; then
4915 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4916set dummy ${ac_tool_prefix}icpc; ac_word=$2
4917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4918$as_echo_n "checking for $ac_word... " >&6; }
4919if ${ac_cv_path_CXX+:} false; then :
4920 $as_echo_n "(cached) " >&6
4921else
4922 case $CXX in
4923 [\\/]* | ?:[\\/]*)
4924 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4925 ;;
4926 *)
4927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4928for as_dir in notfound
4929do
4930 IFS=$as_save_IFS
4931 test -z "$as_dir" && as_dir=.
4932 for ac_exec_ext in '' $ac_executable_extensions; do
4933 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4934 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4935 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4936 break 2
4937 fi
4938done
4939 done
4940IFS=$as_save_IFS
4941
4942 ;;
4943esac
4944fi
4945CXX=$ac_cv_path_CXX
4946if test -n "$CXX"; then
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4948$as_echo "$CXX" >&6; }
4949else
4950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4951$as_echo "no" >&6; }
4952fi
4953
4954
4955fi
4956if test -z "$ac_cv_path_CXX"; then
4957 ac_pt_CXX=$CXX
4958 # Extract the first word of "icpc", so it can be a program name with args.
4959set dummy icpc; ac_word=$2
4960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4961$as_echo_n "checking for $ac_word... " >&6; }
4962if ${ac_cv_path_ac_pt_CXX+:} false; then :
4963 $as_echo_n "(cached) " >&6
4964else
4965 case $ac_pt_CXX in
4966 [\\/]* | ?:[\\/]*)
4967 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4968 ;;
4969 *)
4970 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4971for as_dir in notfound
4972do
4973 IFS=$as_save_IFS
4974 test -z "$as_dir" && as_dir=.
4975 for ac_exec_ext in '' $ac_executable_extensions; do
4976 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4977 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4978 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4979 break 2
4980 fi
4981done
4982 done
4983IFS=$as_save_IFS
4984
4985 ;;
4986esac
4987fi
4988ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4989if test -n "$ac_pt_CXX"; then
4990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4991$as_echo "$ac_pt_CXX" >&6; }
4992else
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4994$as_echo "no" >&6; }
4995fi
4996
4997 if test "x$ac_pt_CXX" = x; then
4998 CXX="icpc"
4999 else
5000 case $cross_compiling:$ac_tool_warned in
5001yes:)
5002{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5003$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5004ac_tool_warned=yes ;;
5005esac
5006 CXX=$ac_pt_CXX
5007 fi
5008else
5009 CXX="$ac_cv_path_CXX"
5010fi
5011 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005012 esac
5013 if test "$CXX" = "notfound"
5014 then
5015 CXX=""
5016 fi
5017fi
5018if test -z "$CXX"
5019then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005020 if test -n "$ac_tool_prefix"; then
5021 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5022 do
5023 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5024set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005027if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005028 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005029else
5030 if test -n "$CXX"; then
5031 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5032else
5033as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5034for as_dir in $PATH
5035do
5036 IFS=$as_save_IFS
5037 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005038 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005039 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005040 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005042 break 2
5043 fi
5044done
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005047
5048fi
5049fi
5050CXX=$ac_cv_prog_CXX
5051if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5053$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005054else
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5056$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005057fi
5058
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005060 test -n "$CXX" && break
5061 done
5062fi
5063if test -z "$CXX"; then
5064 ac_ct_CXX=$CXX
5065 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5066do
5067 # Extract the first word of "$ac_prog", so it can be a program name with args.
5068set dummy $ac_prog; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5072 $as_echo_n "(cached) " >&6
5073else
5074 if test -n "$ac_ct_CXX"; then
5075 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5076else
5077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5078for as_dir in $PATH
5079do
5080 IFS=$as_save_IFS
5081 test -z "$as_dir" && as_dir=.
5082 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005084 ac_cv_prog_ac_ct_CXX="$ac_prog"
5085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5086 break 2
5087 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005088done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005089 done
5090IFS=$as_save_IFS
5091
5092fi
5093fi
5094ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5095if test -n "$ac_ct_CXX"; then
5096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5097$as_echo "$ac_ct_CXX" >&6; }
5098else
5099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104 test -n "$ac_ct_CXX" && break
5105done
5106
5107 if test "x$ac_ct_CXX" = x; then
5108 CXX="notfound"
5109 else
5110 case $cross_compiling:$ac_tool_warned in
5111yes:)
5112{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5113$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5114ac_tool_warned=yes ;;
5115esac
5116 CXX=$ac_ct_CXX
5117 fi
5118fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005119
5120 if test "$CXX" = "notfound"
5121 then
5122 CXX=""
5123 fi
5124fi
5125if test "$preset_cxx" != "$CXX"
5126then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005127 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005128
5129 By default, distutils will build C++ extension modules with \"$CXX\".
5130 If this is not intended, then set CXX on the configure command line.
5131 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005132$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005133
5134 By default, distutils will build C++ extension modules with \"$CXX\".
5135 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005136 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005137fi
5138
5139
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005140MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5141
5142
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5144$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5145cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005146#undef bfin
5147#undef cris
5148#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005149#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005150#undef hppa
5151#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005152#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005153#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005154#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005155#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005156#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005157#if defined(__ANDROID__)
5158# if defined(__x86_64__) && defined(__LP64__)
5159 x86_64-linux-android
5160# elif defined(__i386__)
5161 i686-linux-android
5162# elif defined(__aarch64__) && defined(__AARCH64EL__)
5163# if defined(__ILP32__)
5164 aarch64_ilp32-linux-android
5165# else
5166 aarch64-linux-android
5167# endif
5168# elif defined(__ARM_EABI__) && defined(__ARMEL__)
5169 arm-linux-androideabi
5170# elif defined(__mips_hard_float) && defined(_MIPSEL)
5171# if _MIPS_SIM == _ABIO32
5172 mipsel-linux-android
5173# elif _MIPS_SIM == _ABI64
5174 mips64el-linux-android
5175# else
5176# error unknown platform triplet
5177# endif
5178# else
5179# error unknown platform triplet
5180# endif
5181#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005182# if defined(__x86_64__) && defined(__LP64__)
5183 x86_64-linux-gnu
5184# elif defined(__x86_64__) && defined(__ILP32__)
5185 x86_64-linux-gnux32
5186# elif defined(__i386__)
5187 i386-linux-gnu
5188# elif defined(__aarch64__) && defined(__AARCH64EL__)
5189# if defined(__ILP32__)
5190 aarch64_ilp32-linux-gnu
5191# else
5192 aarch64-linux-gnu
5193# endif
5194# elif defined(__aarch64__) && defined(__AARCH64EB__)
5195# if defined(__ILP32__)
5196 aarch64_be_ilp32-linux-gnu
5197# else
5198 aarch64_be-linux-gnu
5199# endif
5200# elif defined(__alpha__)
5201 alpha-linux-gnu
5202# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5203# if defined(__ARMEL__)
5204 arm-linux-gnueabihf
5205# else
5206 armeb-linux-gnueabihf
5207# endif
5208# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5209# if defined(__ARMEL__)
5210 arm-linux-gnueabi
5211# else
5212 armeb-linux-gnueabi
5213# endif
5214# elif defined(__hppa__)
5215 hppa-linux-gnu
5216# elif defined(__ia64__)
5217 ia64-linux-gnu
5218# elif defined(__m68k__) && !defined(__mcoldfire__)
5219 m68k-linux-gnu
5220# elif defined(__mips_hard_float) && defined(_MIPSEL)
5221# if _MIPS_SIM == _ABIO32
5222 mipsel-linux-gnu
5223# elif _MIPS_SIM == _ABIN32
5224 mips64el-linux-gnuabin32
5225# elif _MIPS_SIM == _ABI64
5226 mips64el-linux-gnuabi64
5227# else
5228# error unknown platform triplet
5229# endif
5230# elif defined(__mips_hard_float)
5231# if _MIPS_SIM == _ABIO32
5232 mips-linux-gnu
5233# elif _MIPS_SIM == _ABIN32
5234 mips64-linux-gnuabin32
5235# elif _MIPS_SIM == _ABI64
5236 mips64-linux-gnuabi64
5237# else
5238# error unknown platform triplet
5239# endif
5240# elif defined(__or1k__)
5241 or1k-linux-gnu
5242# elif defined(__powerpc__) && defined(__SPE__)
5243 powerpc-linux-gnuspe
5244# elif defined(__powerpc64__)
5245# if defined(__LITTLE_ENDIAN__)
5246 powerpc64le-linux-gnu
5247# else
5248 powerpc64-linux-gnu
5249# endif
5250# elif defined(__powerpc__)
5251 powerpc-linux-gnu
5252# elif defined(__s390x__)
5253 s390x-linux-gnu
5254# elif defined(__s390__)
5255 s390-linux-gnu
5256# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5257 sh4-linux-gnu
5258# elif defined(__sparc__) && defined(__arch64__)
5259 sparc64-linux-gnu
5260# elif defined(__sparc__)
5261 sparc-linux-gnu
5262# else
5263# error unknown platform triplet
5264# endif
5265#elif defined(__FreeBSD_kernel__)
5266# if defined(__LP64__)
5267 x86_64-kfreebsd-gnu
5268# elif defined(__i386__)
5269 i386-kfreebsd-gnu
5270# else
5271# error unknown platform triplet
5272# endif
5273#elif defined(__gnu_hurd__)
5274 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005275#elif defined(__APPLE__)
5276 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005277#else
5278# error unknown platform triplet
5279#endif
5280
5281EOF
5282
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005283if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005284 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5286$as_echo "$PLATFORM_TRIPLET" >&6; }
5287else
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5289$as_echo "none" >&6; }
5290fi
5291rm -f conftest.c conftest.out
5292
5293if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5294 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5295 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5296 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005297elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5298 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005299fi
doko@ubuntu.com55532312016-06-14 08:55:19 +02005300if test x$PLATFORM_TRIPLET = x; then
5301 PLATDIR=plat-$MACHDEP
5302else
5303 PLATDIR=plat-$PLATFORM_TRIPLET
5304fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005305
5306
doko@ubuntu.com55532312016-06-14 08:55:19 +02005307if test x$MULTIARCH != x; then
5308 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5309fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005310
5311
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5313$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5314save_LDFLAGS="$LDFLAGS"
5315LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005316
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5318/* end confdefs.h. */
5319
5320int
5321main ()
5322{
5323
5324 ;
5325 return 0;
5326}
5327_ACEOF
5328if ac_fn_c_try_link "$LINENO"; then :
5329 NO_AS_NEEDED="-Wl,--no-as-needed"
5330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5331$as_echo "yes" >&6; }
5332else
5333 NO_AS_NEEDED=""
5334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5335$as_echo "no" >&6; }
5336fi
5337rm -f core conftest.err conftest.$ac_objext \
5338 conftest$ac_exeext conftest.$ac_ext
5339LDFLAGS="$save_LDFLAGS"
5340
5341
5342
5343# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005344
Matthias Kloseb9621712010-04-24 17:59:49 +00005345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5346$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005347if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005348 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005349else
5350 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5351 then ac_cv_path_EGREP="$GREP -E"
5352 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005353 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005354 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005355 # Loop through the user's path and test for each of PROGNAME-LIST
5356 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005357for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5358do
5359 IFS=$as_save_IFS
5360 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005361 for ac_prog in egrep; do
5362 for ac_exec_ext in '' $ac_executable_extensions; do
5363 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005364 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005365# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005366 # Check for GNU $ac_path_EGREP
5367case `"$ac_path_EGREP" --version 2>&1` in
5368*GNU*)
5369 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5370*)
5371 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005372 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005373 while :
5374 do
5375 cat "conftest.in" "conftest.in" >"conftest.tmp"
5376 mv "conftest.tmp" "conftest.in"
5377 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005378 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005379 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5380 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005381 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005382 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5383 # Best one so far, save it but keep looking for a better one
5384 ac_cv_path_EGREP="$ac_path_EGREP"
5385 ac_path_EGREP_max=$ac_count
5386 fi
5387 # 10*(2^10) chars as input seems more than enough
5388 test $ac_count -gt 10 && break
5389 done
5390 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5391esac
5392
Matthias Kloseb9621712010-04-24 17:59:49 +00005393 $ac_path_EGREP_found && break 3
5394 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005395 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005396 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005397IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005399 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 +00005400 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005401else
5402 ac_cv_path_EGREP=$EGREP
5403fi
5404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005405 fi
5406fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5408$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005409 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005410
5411
Matthias Kloseb9621712010-04-24 17:59:49 +00005412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5413$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005414if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005415 $as_echo_n "(cached) " >&6
5416else
5417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005418/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005419#include <stdlib.h>
5420#include <stdarg.h>
5421#include <string.h>
5422#include <float.h>
5423
5424int
5425main ()
5426{
5427
5428 ;
5429 return 0;
5430}
5431_ACEOF
5432if ac_fn_c_try_compile "$LINENO"; then :
5433 ac_cv_header_stdc=yes
5434else
5435 ac_cv_header_stdc=no
5436fi
5437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5438
5439if test $ac_cv_header_stdc = yes; then
5440 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5442/* end confdefs.h. */
5443#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005444
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005445_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005447 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005448
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005449else
Matthias Kloseb9621712010-04-24 17:59:49 +00005450 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005451fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005452rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453
Matthias Kloseb9621712010-04-24 17:59:49 +00005454fi
5455
5456if test $ac_cv_header_stdc = yes; then
5457 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5459/* end confdefs.h. */
5460#include <stdlib.h>
5461
5462_ACEOF
5463if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5464 $EGREP "free" >/dev/null 2>&1; then :
5465
5466else
5467 ac_cv_header_stdc=no
5468fi
5469rm -f conftest*
5470
5471fi
5472
5473if test $ac_cv_header_stdc = yes; then
5474 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5475 if test "$cross_compiling" = yes; then :
5476 :
5477else
5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5479/* end confdefs.h. */
5480#include <ctype.h>
5481#include <stdlib.h>
5482#if ((' ' & 0x0FF) == 0x020)
5483# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5484# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5485#else
5486# define ISLOWER(c) \
5487 (('a' <= (c) && (c) <= 'i') \
5488 || ('j' <= (c) && (c) <= 'r') \
5489 || ('s' <= (c) && (c) <= 'z'))
5490# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5491#endif
5492
5493#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5494int
5495main ()
5496{
5497 int i;
5498 for (i = 0; i < 256; i++)
5499 if (XOR (islower (i), ISLOWER (i))
5500 || toupper (i) != TOUPPER (i))
5501 return 2;
5502 return 0;
5503}
5504_ACEOF
5505if ac_fn_c_try_run "$LINENO"; then :
5506
5507else
5508 ac_cv_header_stdc=no
5509fi
5510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5511 conftest.$ac_objext conftest.beam conftest.$ac_ext
5512fi
5513
5514fi
5515fi
5516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5517$as_echo "$ac_cv_header_stdc" >&6; }
5518if test $ac_cv_header_stdc = yes; then
5519
5520$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5521
5522fi
5523
5524# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5525for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5526 inttypes.h stdint.h unistd.h
5527do :
5528 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5529ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5530"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005531if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005532 cat >>confdefs.h <<_ACEOF
5533#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5534_ACEOF
5535
5536fi
5537
5538done
5539
5540
5541
5542 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 +02005543if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005544 MINIX=yes
5545else
5546 MINIX=
5547fi
5548
5549
5550 if test "$MINIX" = yes; then
5551
5552$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5553
5554
5555$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5556
5557
5558$as_echo "#define _MINIX 1" >>confdefs.h
5559
5560 fi
5561
5562
5563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5564$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005565if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005566 $as_echo_n "(cached) " >&6
5567else
5568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5569/* end confdefs.h. */
5570
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005571# define __EXTENSIONS__ 1
5572 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005573int
5574main ()
5575{
5576
5577 ;
5578 return 0;
5579}
5580_ACEOF
5581if ac_fn_c_try_compile "$LINENO"; then :
5582 ac_cv_safe_to_define___extensions__=yes
5583else
5584 ac_cv_safe_to_define___extensions__=no
5585fi
5586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5587fi
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5589$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5590 test $ac_cv_safe_to_define___extensions__ = yes &&
5591 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5592
5593 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5594
5595 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5596
5597 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5598
5599 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5600
5601
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005602
Xavier de Gaye95750b12016-07-09 11:05:42 +02005603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5604$as_echo_n "checking for the Android API level... " >&6; }
5605cat >> conftest.c <<EOF
5606#ifdef __ANDROID__
5607#include <android/api-level.h>
5608__ANDROID_API__
5609#else
5610#error not Android
5611#endif
5612EOF
5613
5614if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
5615 ANDROID_API_LEVEL=`grep -v '^#' conftest.out | grep -v '^ *$'`
5616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5617$as_echo "$ANDROID_API_LEVEL" >&6; }
5618
5619cat >>confdefs.h <<_ACEOF
5620#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5621_ACEOF
5622
5623else
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5625$as_echo "not Android" >&6; }
5626fi
5627rm -f conftest.c conftest.out
5628
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005629# Check for unsupported systems
5630case $ac_sys_system/$ac_sys_release in
5631atheos*|Linux*/1*)
5632 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5633 echo See README for details.
5634 exit 1;;
5635esac
5636
5637
Matthias Kloseb9621712010-04-24 17:59:49 +00005638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5639$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640
5641# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005642if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005643 withval=$with_suffix;
5644 case $withval in
5645 no) EXEEXT=;;
5646 yes) EXEEXT=.exe;;
5647 *) EXEEXT=$withval;;
5648 esac
5649fi
5650
Matthias Kloseb9621712010-04-24 17:59:49 +00005651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5652$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005653
5654# Test whether we're running on a non-case-sensitive system, in which
5655# case we give a warning if no ext is given
5656
Matthias Kloseb9621712010-04-24 17:59:49 +00005657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5658$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659if test ! -d CaseSensitiveTestDir; then
5660mkdir CaseSensitiveTestDir
5661fi
5662
5663if test -d casesensitivetestdir
5664then
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5666$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005667 BUILDEXEEXT=.exe
5668else
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 BUILDEXEEXT=$EXEEXT
5672fi
5673rmdir CaseSensitiveTestDir
5674
5675case $MACHDEP in
5676bsdos*)
5677 case $CC in
5678 gcc) CC="$CC -D_HAVE_BSDI";;
5679 esac;;
5680esac
5681
5682case $ac_sys_system in
5683hp*|HP*)
5684 case $CC in
5685 cc|*/cc) CC="$CC -Ae";;
5686 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687esac
5688
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689
Matthias Kloseb9621712010-04-24 17:59:49 +00005690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5691$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005692if test -z "$LIBRARY"
5693then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005694 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5697$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698
5699# LDLIBRARY is the name of the library to link against (as opposed to the
5700# name of the library into which to insert object files). BLDLIBRARY is also
5701# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5702# is blank as the main program is not linked directly against LDLIBRARY.
5703# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5704# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5705# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5706# DLLLIBRARY is the shared (i.e., DLL) library.
5707#
5708# RUNSHARED is used to run shared python without installed libraries
5709#
5710# INSTSONAME is the name of the shared library that will be use to install
5711# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005712#
5713# LDVERSION is the shared library version number, normally the Python version
5714# with the ABI build flags appended.
5715
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005716
5717
5718
5719
5720
5721
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723LDLIBRARY="$LIBRARY"
5724BLDLIBRARY='$(LDLIBRARY)'
5725INSTSONAME='$(LDLIBRARY)'
5726DLLLIBRARY=''
5727LDLIBRARYDIR=''
5728RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005729LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005730
5731# LINKCC is the command that links the python executable -- default is $(CC).
5732# If CXX is set, and if it is needed to link a main function that was
5733# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5734# python might then depend on the C++ runtime
5735# This is altered for AIX in order to build the export list before
5736# linking.
5737
Matthias Kloseb9621712010-04-24 17:59:49 +00005738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5739$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005740if test -z "$LINKCC"
5741then
5742 LINKCC='$(PURIFY) $(MAINCC)'
5743 case $ac_sys_system in
5744 AIX*)
5745 exp_extra="\"\""
5746 if test $ac_sys_release -ge 5 -o \
5747 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5748 exp_extra="."
5749 fi
5750 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005751 QNX*)
5752 # qcc must be used because the other compilers do not
5753 # support -N.
5754 LINKCC=qcc;;
5755 esac
5756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5758$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5761# make sure we default having it set to "no": this is used by
5762# distutils.unixccompiler to know if it should add --enable-new-dtags
5763# to linker command lines, and failing to detect GNU ld simply results
5764# in the same bahaviour as before.
5765
Matthias Kloseb9621712010-04-24 17:59:49 +00005766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5767$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005768ac_prog=ld
5769if test "$GCC" = yes; then
5770 ac_prog=`$CC -print-prog-name=ld`
5771fi
5772case `"$ac_prog" -V 2>&1 < /dev/null` in
5773 *GNU*)
5774 GNULD=yes;;
5775 *)
5776 GNULD=no;;
5777esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5779$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5782$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005783if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005784 $as_echo_n "(cached) " >&6
5785else
5786 ac_cv_c_inline=no
5787for ac_kw in inline __inline__ __inline; do
5788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5789/* end confdefs.h. */
5790#ifndef __cplusplus
5791typedef int foo_t;
5792static $ac_kw foo_t static_foo () {return 0; }
5793$ac_kw foo_t foo () {return 0; }
5794#endif
5795
5796_ACEOF
5797if ac_fn_c_try_compile "$LINENO"; then :
5798 ac_cv_c_inline=$ac_kw
5799fi
5800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5801 test "$ac_cv_c_inline" != no && break
5802done
5803
5804fi
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5806$as_echo "$ac_cv_c_inline" >&6; }
5807
5808case $ac_cv_c_inline in
5809 inline | yes) ;;
5810 *)
5811 case $ac_cv_c_inline in
5812 no) ac_val=;;
5813 *) ac_val=$ac_cv_c_inline;;
5814 esac
5815 cat >>confdefs.h <<_ACEOF
5816#ifndef __cplusplus
5817#define inline $ac_val
5818#endif
5819_ACEOF
5820 ;;
5821esac
5822
5823if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005824
5825$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005826
5827
5828fi
5829
5830
Matthias Kloseb9621712010-04-24 17:59:49 +00005831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5832$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005833# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005834if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005835 enableval=$enable_shared;
5836fi
5837
5838
5839if test -z "$enable_shared"
5840then
5841 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005842 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843 enable_shared="yes";;
5844 *)
5845 enable_shared="no";;
5846 esac
5847fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5849$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005850
Matthias Kloseb9621712010-04-24 17:59:49 +00005851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5852$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005853# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005854if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005855 enableval=$enable_profiling;
5856fi
5857
5858if test "x$enable_profiling" = xyes; then
5859 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005860 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005862/* end confdefs.h. */
5863int main() { return 0; }
5864_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005865if ac_fn_c_try_link "$LINENO"; then :
5866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005867else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005868 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005869fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005870rm -f core conftest.err conftest.$ac_objext \
5871 conftest$ac_exeext conftest.$ac_ext
5872 CC="$ac_save_cc"
5873else
5874 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005875fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5877$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879if test "x$enable_profiling" = xyes; then
5880 BASECFLAGS="-pg $BASECFLAGS"
5881 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005882fi
5883
Matthias Kloseb9621712010-04-24 17:59:49 +00005884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5885$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886
5887# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5888# library that we build, but we do not want to link against it (we
5889# will find it with a -framework option). For this reason there is an
5890# extra variable BLDLIBRARY against which Python and the extension
5891# modules are linked, BLDLIBRARY. This is normally the same as
5892# LDLIBRARY, but empty for MacOSX framework builds.
5893if test "$enable_framework"
5894then
5895 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005896 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897 BLDLIBRARY=''
5898else
5899 BLDLIBRARY='$(LDLIBRARY)'
5900fi
5901
5902# Other platforms follow
5903if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005904 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005905
Matthias Kloseb9621712010-04-24 17:59:49 +00005906$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005907
5908 case $ac_sys_system in
5909 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005910 LDLIBRARY='libpython$(LDVERSION).dll.a'
5911 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005912 ;;
5913 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005914 LDLIBRARY='libpython$(LDVERSION).so'
5915 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005916 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005917 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005918 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005919 then
5920 PY3LIBRARY=libpython3.so
5921 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005922 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005923 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005924 LDLIBRARY='libpython$(LDVERSION).so'
5925 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005926 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005927 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005928 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005929 then
5930 PY3LIBRARY=libpython3.so
5931 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 ;;
5933 hp*|HP*)
5934 case `uname -m` in
5935 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005936 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005937 ;;
5938 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005939 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005940 ;;
5941 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005942 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005943 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005944 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005945 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005946 LDLIBRARY='libpython$(LDVERSION).dylib'
5947 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005948 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005949 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005950 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005951 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005952 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005953 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005954
5955 esac
5956else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005957 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958 case $ac_sys_system in
5959 CYGWIN*)
5960 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005961 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005962 ;;
5963 esac
5964fi
5965
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005966if test "$cross_compiling" = yes; then
5967 RUNSHARED=
5968fi
5969
Matthias Kloseb9621712010-04-24 17:59:49 +00005970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5971$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005972
5973if test -n "$ac_tool_prefix"; then
5974 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5975set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005978if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005979 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005980else
5981 if test -n "$RANLIB"; then
5982 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5983else
5984as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5985for as_dir in $PATH
5986do
5987 IFS=$as_save_IFS
5988 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005989 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005990 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005992 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005993 break 2
5994 fi
5995done
Matthias Kloseb9621712010-04-24 17:59:49 +00005996 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005997IFS=$as_save_IFS
5998
5999fi
6000fi
6001RANLIB=$ac_cv_prog_RANLIB
6002if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6004$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006005else
Matthias Kloseb9621712010-04-24 17:59:49 +00006006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008fi
6009
6010
6011fi
6012if test -z "$ac_cv_prog_RANLIB"; then
6013 ac_ct_RANLIB=$RANLIB
6014 # Extract the first word of "ranlib", so it can be a program name with args.
6015set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6017$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006018if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006019 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020else
6021 if test -n "$ac_ct_RANLIB"; then
6022 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6023else
6024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6025for as_dir in $PATH
6026do
6027 IFS=$as_save_IFS
6028 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006029 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006030 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006032 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033 break 2
6034 fi
6035done
Matthias Kloseb9621712010-04-24 17:59:49 +00006036 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006037IFS=$as_save_IFS
6038
6039fi
6040fi
6041ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6042if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6044$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045else
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6047$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048fi
6049
6050 if test "x$ac_ct_RANLIB" = x; then
6051 RANLIB=":"
6052 else
6053 case $cross_compiling:$ac_tool_warned in
6054yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006055{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6056$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006057ac_tool_warned=yes ;;
6058esac
6059 RANLIB=$ac_ct_RANLIB
6060 fi
6061else
6062 RANLIB="$ac_cv_prog_RANLIB"
6063fi
6064
6065
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006066if test -n "$ac_tool_prefix"; then
6067 for ac_prog in ar aal
6068 do
6069 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6070set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6072$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006073if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006074 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006075else
6076 if test -n "$AR"; then
6077 ac_cv_prog_AR="$AR" # Let the user override the test.
6078else
6079as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6080for as_dir in $PATH
6081do
6082 IFS=$as_save_IFS
6083 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006084 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006085 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006086 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006088 break 2
6089 fi
6090done
Matthias Kloseb9621712010-04-24 17:59:49 +00006091 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006092IFS=$as_save_IFS
6093
6094fi
6095fi
6096AR=$ac_cv_prog_AR
6097if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6099$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006100else
Matthias Kloseb9621712010-04-24 17:59:49 +00006101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6102$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103fi
6104
6105
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006106 test -n "$AR" && break
6107 done
6108fi
6109if test -z "$AR"; then
6110 ac_ct_AR=$AR
6111 for ac_prog in ar aal
6112do
6113 # Extract the first word of "$ac_prog", so it can be a program name with args.
6114set dummy $ac_prog; ac_word=$2
6115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6116$as_echo_n "checking for $ac_word... " >&6; }
6117if ${ac_cv_prog_ac_ct_AR+:} false; then :
6118 $as_echo_n "(cached) " >&6
6119else
6120 if test -n "$ac_ct_AR"; then
6121 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6122else
6123as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6124for as_dir in $PATH
6125do
6126 IFS=$as_save_IFS
6127 test -z "$as_dir" && as_dir=.
6128 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006130 ac_cv_prog_ac_ct_AR="$ac_prog"
6131 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6132 break 2
6133 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006134done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006135 done
6136IFS=$as_save_IFS
6137
6138fi
6139fi
6140ac_ct_AR=$ac_cv_prog_ac_ct_AR
6141if test -n "$ac_ct_AR"; then
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6143$as_echo "$ac_ct_AR" >&6; }
6144else
6145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6146$as_echo "no" >&6; }
6147fi
6148
6149
6150 test -n "$ac_ct_AR" && break
6151done
6152
6153 if test "x$ac_ct_AR" = x; then
6154 AR="ar"
6155 else
6156 case $cross_compiling:$ac_tool_warned in
6157yes:)
6158{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6159$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6160ac_tool_warned=yes ;;
6161esac
6162 AR=$ac_ct_AR
6163 fi
6164fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006165
6166
6167# tweak ARFLAGS only if the user didn't set it on the command line
6168
6169if test -z "$ARFLAGS"
6170then
6171 ARFLAGS="rc"
6172fi
6173
doko@ubuntu.com58844492012-06-30 18:25:32 +02006174if test -n "$ac_tool_prefix"; then
6175 for ac_prog in readelf
6176 do
6177 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6178set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6180$as_echo_n "checking for $ac_word... " >&6; }
6181if ${ac_cv_prog_READELF+:} false; then :
6182 $as_echo_n "(cached) " >&6
6183else
6184 if test -n "$READELF"; then
6185 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6186else
6187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6188for as_dir in $PATH
6189do
6190 IFS=$as_save_IFS
6191 test -z "$as_dir" && as_dir=.
6192 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006193 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006194 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6195 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6196 break 2
6197 fi
6198done
6199 done
6200IFS=$as_save_IFS
6201
6202fi
6203fi
6204READELF=$ac_cv_prog_READELF
6205if test -n "$READELF"; then
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6207$as_echo "$READELF" >&6; }
6208else
6209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6210$as_echo "no" >&6; }
6211fi
6212
6213
6214 test -n "$READELF" && break
6215 done
6216fi
6217if test -z "$READELF"; then
6218 ac_ct_READELF=$READELF
6219 for ac_prog in readelf
6220do
6221 # Extract the first word of "$ac_prog", so it can be a program name with args.
6222set dummy $ac_prog; ac_word=$2
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224$as_echo_n "checking for $ac_word... " >&6; }
6225if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6226 $as_echo_n "(cached) " >&6
6227else
6228 if test -n "$ac_ct_READELF"; then
6229 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6230else
6231as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6232for as_dir in $PATH
6233do
6234 IFS=$as_save_IFS
6235 test -z "$as_dir" && as_dir=.
6236 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006237 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006238 ac_cv_prog_ac_ct_READELF="$ac_prog"
6239 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6240 break 2
6241 fi
6242done
6243 done
6244IFS=$as_save_IFS
6245
6246fi
6247fi
6248ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6249if test -n "$ac_ct_READELF"; then
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6251$as_echo "$ac_ct_READELF" >&6; }
6252else
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6254$as_echo "no" >&6; }
6255fi
6256
6257
6258 test -n "$ac_ct_READELF" && break
6259done
6260
6261 if test "x$ac_ct_READELF" = x; then
6262 READELF=":"
6263 else
6264 case $cross_compiling:$ac_tool_warned in
6265yes:)
6266{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6267$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6268ac_tool_warned=yes ;;
6269esac
6270 READELF=$ac_ct_READELF
6271 fi
6272fi
6273
6274if test "$cross_compiling" = yes; then
6275 case "$READELF" in
6276 readelf|:)
6277 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6278 ;;
6279 esac
6280fi
6281
6282
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006283
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284case $MACHDEP in
6285bsdos*|hp*|HP*)
6286 # install -d does not work on BSDI or HP-UX
6287 if test -z "$INSTALL"
6288 then
6289 INSTALL="${srcdir}/install-sh -c"
6290 fi
6291esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006292# Find a good install program. We prefer a C program (faster),
6293# so one script is as good as another. But avoid the broken or
6294# incompatible versions:
6295# SysV /etc/install, /usr/sbin/install
6296# SunOS /usr/etc/install
6297# IRIX /sbin/install
6298# AIX /bin/install
6299# AmigaOS /C/install, which installs bootblocks on floppy discs
6300# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6301# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6302# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6303# OS/2's system install, which has a completely different semantic
6304# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006305# Reject install programs that cannot install multiple files.
6306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6307$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006308if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006309if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006310 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006311else
6312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6313for as_dir in $PATH
6314do
6315 IFS=$as_save_IFS
6316 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006317 # Account for people who put trailing slashes in PATH elements.
6318case $as_dir/ in #((
6319 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 /usr/ucb/* ) ;;
6323 *)
6324 # OSF1 and SCO ODT 3.0 have their own names for install.
6325 # Don't use installbsd from OSF since it installs stuff as root
6326 # by default.
6327 for ac_prog in ginstall scoinst install; do
6328 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006329 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006330 if test $ac_prog = install &&
6331 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6332 # AIX install. It has an incompatible calling convention.
6333 :
6334 elif test $ac_prog = install &&
6335 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6336 # program-specific install script used by HP pwplus--don't use.
6337 :
6338 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006339 rm -rf conftest.one conftest.two conftest.dir
6340 echo one > conftest.one
6341 echo two > conftest.two
6342 mkdir conftest.dir
6343 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6344 test -s conftest.one && test -s conftest.two &&
6345 test -s conftest.dir/conftest.one &&
6346 test -s conftest.dir/conftest.two
6347 then
6348 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6349 break 3
6350 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006351 fi
6352 fi
6353 done
6354 done
6355 ;;
6356esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006357
6358 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006359IFS=$as_save_IFS
6360
Matthias Kloseb9621712010-04-24 17:59:49 +00006361rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362
6363fi
6364 if test "${ac_cv_path_install+set}" = set; then
6365 INSTALL=$ac_cv_path_install
6366 else
6367 # As a last resort, use the slow shell script. Don't cache a
6368 # value for INSTALL within a source directory, because that will
6369 # break other packages using the cache if that directory is
6370 # removed, or if the value is a relative name.
6371 INSTALL=$ac_install_sh
6372 fi
6373fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6375$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376
6377# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6378# It thinks the first close brace ends the variable substitution.
6379test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6380
6381test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6382
6383test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6384
Matthias Klose93a0ef12012-03-15 18:08:34 +01006385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6386$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6387if test -z "$MKDIR_P"; then
6388 if ${ac_cv_path_mkdir+:} false; then :
6389 $as_echo_n "(cached) " >&6
6390else
6391 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6392for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6393do
6394 IFS=$as_save_IFS
6395 test -z "$as_dir" && as_dir=.
6396 for ac_prog in mkdir gmkdir; do
6397 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006398 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006399 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6400 'mkdir (GNU coreutils) '* | \
6401 'mkdir (coreutils) '* | \
6402 'mkdir (fileutils) '4.1*)
6403 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6404 break 3;;
6405 esac
6406 done
6407 done
6408 done
6409IFS=$as_save_IFS
6410
6411fi
6412
6413 test -d ./--version && rmdir ./--version
6414 if test "${ac_cv_path_mkdir+set}" = set; then
6415 MKDIR_P="$ac_cv_path_mkdir -p"
6416 else
6417 # As a last resort, use the slow shell script. Don't cache a
6418 # value for MKDIR_P within a source directory, because that will
6419 # break other packages using the cache if that directory is
6420 # removed, or if the value is a relative name.
6421 MKDIR_P="$ac_install_sh -d"
6422 fi
6423fi
6424{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6425$as_echo "$MKDIR_P" >&6; }
6426
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006427
6428# Not every filesystem supports hard links
6429
6430if test -z "$LN" ; then
6431 case $ac_sys_system in
6432 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433 *) LN=ln;;
6434 esac
6435fi
6436
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006437# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006438
6439ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006440
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006441# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6443$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444
6445# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006446if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006447 withval=$with_pydebug;
6448if test "$withval" != no
6449then
6450
Matthias Kloseb9621712010-04-24 17:59:49 +00006451$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452
Matthias Kloseb9621712010-04-24 17:59:49 +00006453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6454$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006456 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006457else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6458$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006459fi
6460else
Matthias Kloseb9621712010-04-24 17:59:49 +00006461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6462$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006463fi
6464
6465
Brett Cannon63d98bc2016-09-06 17:12:40 -07006466# Enable optimization flags
6467
6468
6469Py_OPT='false'
6470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6471$as_echo_n "checking for --with-optimizations... " >&6; }
6472
6473# Check whether --with-optimizations was given.
6474if test "${with_optimizations+set}" = set; then :
6475 withval=$with_optimizations;
6476if test "$withval" != no
6477then
6478 Py_OPT='true'
6479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6480$as_echo "yes" >&6; };
6481else
6482 Py_OPT='false'
6483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6484$as_echo "no" >&6; };
6485fi
6486else
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6488$as_echo "no" >&6; }
6489fi
6490
6491if test "$Py_OPT" = 'true' ; then
6492 Py_LTO='true'
6493 case $ac_sys_system in
6494 Darwin*)
6495 # At least on macOS El Capitan, LTO does not work with PGO.
6496 Py_LTO='false'
6497 ;;
6498 esac
6499 DEF_MAKE_ALL_RULE="profile-opt"
6500 DEF_MAKE_RULE="build_all"
6501else
6502 DEF_MAKE_ALL_RULE="build_all"
6503 DEF_MAKE_RULE="all"
6504fi
6505
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006506# Enable LTO flags
6507
6508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6509$as_echo_n "checking for --with-lto... " >&6; }
6510
6511# Check whether --with-lto was given.
6512if test "${with_lto+set}" = set; then :
6513 withval=$with_lto;
6514if test "$withval" != no
6515then
6516 Py_LTO='true'
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6518$as_echo "yes" >&6; };
6519else
6520 Py_LTO='false'
6521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6522$as_echo "no" >&6; };
6523fi
6524else
6525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6526$as_echo "no" >&6; }
6527fi
6528
6529if test "$Py_LTO" = 'true' ; then
6530 case $CC in
6531 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006532 case $ac_sys_system in
6533 Darwin*)
6534 # Any changes made here should be reflected in the GCC+Darwin case below
6535 LTOFLAGS="-flto -Wl,-export_dynamic"
6536 ;;
6537 *)
6538 LTOFLAGS="-flto"
6539 ;;
6540 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006541 ;;
6542 *gcc*)
6543 case $ac_sys_system in
6544 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006545 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006546 ;;
6547 *)
6548 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6549 ;;
6550 esac
6551 ;;
6552 esac
6553fi
6554
Brett Cannon7188a3e2015-09-18 15:13:44 -07006555# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006556
6557
6558
6559
6560
6561
Brett Cannon7188a3e2015-09-18 15:13:44 -07006562# Extract the first word of "llvm-profdata", so it can be a program name with args.
6563set dummy llvm-profdata; ac_word=$2
6564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6565$as_echo_n "checking for $ac_word... " >&6; }
6566if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6567 $as_echo_n "(cached) " >&6
6568else
6569 if test -n "$LLVM_PROF_FOUND"; then
6570 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6571else
6572as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6573for as_dir in $PATH
6574do
6575 IFS=$as_save_IFS
6576 test -z "$as_dir" && as_dir=.
6577 for ac_exec_ext in '' $ac_executable_extensions; do
6578 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6579 ac_cv_prog_LLVM_PROF_FOUND="found"
6580 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6581 break 2
6582 fi
6583done
6584 done
6585IFS=$as_save_IFS
6586
6587 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6588fi
6589fi
6590LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6591if test -n "$LLVM_PROF_FOUND"; then
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6593$as_echo "$LLVM_PROF_FOUND" >&6; }
6594else
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6596$as_echo "no" >&6; }
6597fi
6598
6599
6600LLVM_PROF_ERR=no
6601case $CC in
6602 *clang*)
6603 # Any changes made here should be reflected in the GCC+Darwin case below
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 *gcc*)
6614 case $ac_sys_system in
6615 Darwin*)
6616 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6617 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6618 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6619 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6620 if test $LLVM_PROF_FOUND = not-found
6621 then
6622 LLVM_PROF_ERR=yes
6623 fi
6624 ;;
6625 *)
6626 PGO_PROF_GEN_FLAG="-fprofile-generate"
6627 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6628 LLVM_PROF_MERGER="true"
6629 LLVM_PROF_FILE=""
6630 ;;
6631 esac
6632 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006633 *icc*)
6634 PGO_PROF_GEN_FLAG="-prof-gen"
6635 PGO_PROF_USE_FLAG="-prof-use"
6636 LLVM_PROF_MERGER="true"
6637 LLVM_PROF_FILE=""
6638 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006639esac
6640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006641# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6642# merged with this chunk of code?
6643
6644# Optimizer/debugger flags
6645# ------------------------
6646# (The following bit of code is complicated enough - please keep things
6647# indented properly. Just pretend you're editing Python code. ;-)
6648
6649# There are two parallel sets of case statements below, one that checks to
6650# see if OPT was set and one that does BASECFLAGS setting based upon
6651# compiler and platform. BASECFLAGS tweaks need to be made even if the
6652# user set OPT.
6653
6654# tweak OPT based on compiler and platform, only if the user didn't set
6655# it on the command line
6656
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006657if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658then
6659 case $GCC in
6660 yes)
6661 if test "$CC" != 'g++' ; then
6662 STRICT_PROTO="-Wstrict-prototypes"
6663 fi
6664 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6665 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6666 WRAP="-fwrapv"
6667 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006668
6669 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006670 case $CC in
6671 *clang*) WRAP="-fwrapv"
6672 ;;
6673 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006674
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006675 case $ac_cv_prog_cc_g in
6676 yes)
6677 if test "$Py_DEBUG" = 'true' ; then
6678 # Optimization messes up debuggers, so turn it off for
6679 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006680 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
6681 OPT="-g -Og -Wall $STRICT_PROTO"
6682 else
6683 OPT="-g -O0 -Wall $STRICT_PROTO"
6684 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006685 else
6686 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6687 fi
6688 ;;
6689 *)
6690 OPT="-O3 -Wall $STRICT_PROTO"
6691 ;;
6692 esac
6693 case $ac_sys_system in
6694 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6695 ;;
6696 esac
6697 ;;
6698
6699 *)
6700 OPT="-O"
6701 ;;
6702 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006703fi
6704
6705
6706
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006707
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708# The -arch flags for universal builds on OSX
6709UNIVERSAL_ARCH_FLAGS=
6710
6711
6712# tweak BASECFLAGS based on compiler and platform
6713case $GCC in
6714yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006715 # Python doesn't violate C99 aliasing rules, but older versions of
6716 # GCC produce warnings for legal Python code. Enable
6717 # -fno-strict-aliasing on versions of GCC that support but produce
6718 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6720$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721 ac_save_cc="$CC"
6722 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006723 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006724 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006725 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006726else
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006728/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006729
Matthias Kloseb159a552010-04-25 21:00:44 +00006730
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006731int
6732main ()
6733{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006734
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006735 ;
6736 return 0;
6737}
Matthias Kloseb159a552010-04-25 21:00:44 +00006738
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006739_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006740if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006741
6742 CC="$ac_save_cc -fstrict-aliasing"
6743 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006745/* end confdefs.h. */
6746
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006747 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006748int
6749main ()
6750{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006751double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006752 ;
6753 return 0;
6754}
Matthias Kloseb159a552010-04-25 21:00:44 +00006755
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006756_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006757if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006758
6759 ac_cv_no_strict_aliasing=no
6760
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761else
Matthias Kloseb159a552010-04-25 21:00:44 +00006762
6763 ac_cv_no_strict_aliasing=yes
6764
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006765fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006767
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006768else
Matthias Kloseb159a552010-04-25 21:00:44 +00006769
6770 ac_cv_no_strict_aliasing=no
6771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006772fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006774fi
6775
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006776 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006777 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6779$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006780 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781 then
6782 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6783 fi
6784
Zachary Ware5af85642015-12-21 12:09:17 -06006785 # ICC doesn't recognize the option, but only emits a warning
6786 ## XXX does it emit an unused result warning and can it be disabled?
6787 case "$CC" in
6788 *icc*)
6789 ac_cv_disable_unused_result_warning=no
6790 ;;
6791 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6793$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6794 ac_save_cc="$CC"
6795 CC="$CC -Wunused-result -Werror"
6796 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006797 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006798 $as_echo_n "(cached) " >&6
6799else
6800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6801/* end confdefs.h. */
6802
6803
6804int
6805main ()
6806{
6807
6808 ;
6809 return 0;
6810}
6811
6812_ACEOF
6813if ac_fn_c_try_compile "$LINENO"; then :
6814
6815 ac_cv_disable_unused_result_warning=yes
6816
6817else
6818
6819 ac_cv_disable_unused_result_warning=no
6820
6821fi
6822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6823fi
6824
6825 CFLAGS="$save_CFLAGS"
6826 CC="$ac_save_cc"
6827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6828$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06006829 ;;
6830 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006831
6832 if test $ac_cv_disable_unused_result_warning = yes
6833 then
6834 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6835 fi
6836
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6838$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6839 ac_save_cc="$CC"
6840 CC="$CC -Werror=declaration-after-statement"
6841 save_CFLAGS="$CFLAGS"
6842 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6843 $as_echo_n "(cached) " >&6
6844else
6845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6846/* end confdefs.h. */
6847
6848
6849int
6850main ()
6851{
6852
6853 ;
6854 return 0;
6855}
6856
6857_ACEOF
6858if ac_fn_c_try_compile "$LINENO"; then :
6859
6860 ac_cv_declaration_after_statement_warning=yes
6861
6862else
6863
6864 ac_cv_declaration_after_statement_warning=no
6865
6866fi
6867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6868fi
6869
6870 CFLAGS="$save_CFLAGS"
6871 CC="$ac_save_cc"
6872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6873$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6874
6875 if test $ac_cv_declaration_after_statement_warning = yes
6876 then
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006877 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=declaration-after-statement"
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006878 fi
6879
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
6881$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
6882 ac_save_cc="$CC"
6883 CC="$CC -Wsign-compare"
6884 save_CFLAGS="$CFLAGS"
6885 if ${ac_cv_enable_sign_compare_warning+:} false; then :
6886 $as_echo_n "(cached) " >&6
6887else
6888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6889/* end confdefs.h. */
6890
6891
6892int
6893main ()
6894{
6895
6896 ;
6897 return 0;
6898}
6899
6900_ACEOF
6901if ac_fn_c_try_compile "$LINENO"; then :
6902
6903 ac_cv_enable_sign_compare_warning=yes
6904
6905else
6906
6907 ac_cv_enable_sign_compare_warning=no
6908
6909fi
6910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6911fi
6912
6913 CFLAGS="$save_CFLAGS"
6914 CC="$ac_save_cc"
6915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
6916$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
6917
6918 if test $ac_cv_enable_sign_compare_warning = yes
6919 then
6920 BASECFLAGS="$BASECFLAGS -Wsign-compare"
6921 fi
6922
6923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
6924$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
6925 ac_save_cc="$CC"
6926 CC="$CC -Wunreachable-code"
6927 save_CFLAGS="$CFLAGS"
6928 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
6929 $as_echo_n "(cached) " >&6
6930else
6931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6932/* end confdefs.h. */
6933
6934
6935int
6936main ()
6937{
6938
6939 ;
6940 return 0;
6941}
6942
6943_ACEOF
6944if ac_fn_c_try_compile "$LINENO"; then :
6945
6946 ac_cv_enable_unreachable_code_warning=yes
6947
6948else
6949
6950 ac_cv_enable_unreachable_code_warning=no
6951
6952fi
6953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6954fi
6955
6956 CFLAGS="$save_CFLAGS"
6957 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006958
6959 # Don't enable unreachable code warning in debug mode, since it usually
6960 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05006961 # Issue #24324: Unfortunately, the unreachable code warning does not work
6962 # correctly on gcc and has been silently removed from the compiler.
6963 # It is supported on clang but on OS X systems gcc may be an alias
6964 # for clang. Try to determine if the compiler is not really gcc and,
6965 # if so, only then enable the warning.
6966 if test $ac_cv_enable_unreachable_code_warning = yes && \
6967 test "$Py_DEBUG" != "true" && \
6968 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006969 then
6970 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05006971 else
6972 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006973 fi
Ned Deilybec699e2016-03-08 00:28:37 -05006974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
6975$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01006976
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006977 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6978 # support. Without this, treatment of subnormals doesn't follow
6979 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006980 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006981 alpha*)
6982 BASECFLAGS="$BASECFLAGS -mieee"
6983 ;;
6984 esac
6985
6986 case $ac_sys_system in
6987 SCO_SV*)
6988 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6989 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006990
6991 # is there any other compiler on Darwin besides gcc?
6992 Darwin*)
6993 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6994 # used to be here, but non-Apple gcc doesn't accept them.
6995 if test "${CC}" = gcc
6996 then
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006998$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006999 case "${UNIVERSALSDK}" in
7000 */MacOSX10.4u.sdk)
7001 # Build using 10.4 SDK, force usage of gcc when the
7002 # compiler is gcc, otherwise the user will get very
7003 # confusing error messages when building on OSX 10.6
7004 CC=gcc-4.0
7005 CPP=cpp-4.0
7006 ;;
7007 esac
7008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007009$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007010 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007011
Ned Deily87adb6e2013-10-18 21:09:56 -07007012 if test "${enable_universalsdk}"
7013 then
7014 case "$UNIVERSAL_ARCHS" in
7015 32-bit)
7016 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7017 LIPO_32BIT_FLAGS=""
7018 ARCH_RUN_32BIT=""
7019 ;;
7020 64-bit)
7021 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7022 LIPO_32BIT_FLAGS=""
7023 ARCH_RUN_32BIT="true"
7024 ;;
7025 all)
7026 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7027 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7028 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7029 ;;
7030 intel)
7031 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7032 LIPO_32BIT_FLAGS="-extract i386"
7033 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7034 ;;
7035 intel-32)
7036 UNIVERSAL_ARCH_FLAGS="-arch i386"
7037 LIPO_32BIT_FLAGS=""
7038 ARCH_RUN_32BIT=""
7039 ;;
7040 3-way)
7041 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7042 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7043 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7044 ;;
7045 *)
7046 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7047 ;;
7048 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007049
Ned Deily87adb6e2013-10-18 21:09:56 -07007050 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7051 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7052 if test "${UNIVERSALSDK}" != "/"
7053 then
7054 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7055 fi
7056 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007057
Ned Deily87adb6e2013-10-18 21:09:56 -07007058 # Calculate an appropriate deployment target for this build:
7059 # The deployment target value is used explicitly to enable certain
7060 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007061 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007062 # component of the string returned by distutils.get_platform().
7063 #
7064 # Use the value from:
7065 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7066 # 2. the operating system version of the build machine if >= 10.6
7067 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7068 # below to pick either 10.3, 10.4, or 10.5 as the target.
7069 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007070
Ned Deily87adb6e2013-10-18 21:09:56 -07007071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7072$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007073 cur_target_major=`sw_vers -productVersion | \
7074 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7075 cur_target_minor=`sw_vers -productVersion | \
7076 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7077 cur_target="${cur_target_major}.${cur_target_minor}"
7078 if test ${cur_target_major} -eq 10 && \
7079 test ${cur_target_minor} -ge 3 && \
7080 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007081 then
Ned Deily36820b62014-06-25 13:44:22 -07007082 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007083 cur_target=10.3
7084 if test ${enable_universalsdk}
7085 then
7086 case "$UNIVERSAL_ARCHS" in
7087 all|3-way|intel|64-bit)
7088 # These configurations were first supported in 10.5
7089 cur_target='10.5'
7090 ;;
7091 esac
7092 else
7093 if test `/usr/bin/arch` = "i386"
7094 then
7095 # 10.4 was the first release to support Intel archs
7096 cur_target="10.4"
7097 fi
7098 fi
7099 fi
7100 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007101
Ned Deily87adb6e2013-10-18 21:09:56 -07007102 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7103 # environment with a value that is the same as what we'll use
7104 # in the Makefile to ensure that we'll get the same compiler
7105 # environment during configure and build time.
7106 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7107 export MACOSX_DEPLOYMENT_TARGET
7108 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7110$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007111
Ned Deily87adb6e2013-10-18 21:09:56 -07007112 # end of Darwin* tests
7113 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007114 esac
7115 ;;
7116
7117*)
7118 case $ac_sys_system in
7119 OpenUNIX*|UnixWare*)
7120 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7121 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007122 SCO_SV*)
7123 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7124 ;;
7125 esac
7126 ;;
7127esac
7128
Zachary Ware5af85642015-12-21 12:09:17 -06007129# ICC needs -fp-model strict or floats behave badly
7130case "$CC" in
7131*icc*)
7132 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7133 ;;
7134esac
7135
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007136if test "$Py_DEBUG" = 'true'; then
7137 :
7138else
7139 OPT="-DNDEBUG $OPT"
7140fi
7141
7142if test "$ac_arch_flags"
7143then
7144 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7145fi
7146
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007147# On some compilers, pthreads are available without further options
7148# (e.g. MacOS X). On some of these systems, the compiler will not
7149# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7150# So we have to see first whether pthreads are available without
7151# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7153$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007154if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007155 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007156else
Matthias Kloseb9621712010-04-24 17:59:49 +00007157 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007158 ac_cv_pthread_is_default=no
7159else
Matthias Kloseb9621712010-04-24 17:59:49 +00007160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007161/* end confdefs.h. */
7162
Stefan Krah7dba5942012-11-22 22:49:11 +01007163#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007164#include <pthread.h>
7165
7166void* routine(void* p){return NULL;}
7167
7168int main(){
7169 pthread_t p;
7170 if(pthread_create(&p,NULL,routine,NULL)!=0)
7171 return 1;
7172 (void)pthread_detach(p);
7173 return 0;
7174}
7175
7176_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007177if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007178
7179 ac_cv_pthread_is_default=yes
7180 ac_cv_kthread=no
7181 ac_cv_pthread=no
7182
7183else
Matthias Kloseb9621712010-04-24 17:59:49 +00007184 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007185fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007188fi
7189
7190
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007191fi
7192
Matthias Kloseb9621712010-04-24 17:59:49 +00007193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7194$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007195
7196
7197if test $ac_cv_pthread_is_default = yes
7198then
7199 ac_cv_kpthread=no
7200else
7201# -Kpthread, if available, provides the right #defines
7202# and linker options to make pthread_create available
7203# Some compilers won't report that they do not support -Kpthread,
7204# so we need to run a program to see whether it really made the
7205# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7207$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007208if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007209 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007210else
7211 ac_save_cc="$CC"
7212CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007213if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007214 ac_cv_kpthread=no
7215else
Matthias Kloseb9621712010-04-24 17:59:49 +00007216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007217/* end confdefs.h. */
7218
Stefan Krah7dba5942012-11-22 22:49:11 +01007219#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007220#include <pthread.h>
7221
7222void* routine(void* p){return NULL;}
7223
7224int main(){
7225 pthread_t p;
7226 if(pthread_create(&p,NULL,routine,NULL)!=0)
7227 return 1;
7228 (void)pthread_detach(p);
7229 return 0;
7230}
7231
7232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007233if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007234 ac_cv_kpthread=yes
7235else
Matthias Kloseb9621712010-04-24 17:59:49 +00007236 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7239 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007240fi
7241
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007242CC="$ac_save_cc"
7243fi
7244
Matthias Kloseb9621712010-04-24 17:59:49 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7246$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007247fi
7248
7249if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7250then
7251# -Kthread, if available, provides the right #defines
7252# and linker options to make pthread_create available
7253# Some compilers won't report that they do not support -Kthread,
7254# so we need to run a program to see whether it really made the
7255# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7257$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007258if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007259 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007260else
7261 ac_save_cc="$CC"
7262CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007263if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007264 ac_cv_kthread=no
7265else
Matthias Kloseb9621712010-04-24 17:59:49 +00007266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007267/* end confdefs.h. */
7268
Stefan Krah7dba5942012-11-22 22:49:11 +01007269#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007270#include <pthread.h>
7271
7272void* routine(void* p){return NULL;}
7273
7274int main(){
7275 pthread_t p;
7276 if(pthread_create(&p,NULL,routine,NULL)!=0)
7277 return 1;
7278 (void)pthread_detach(p);
7279 return 0;
7280}
7281
7282_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007283if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007284 ac_cv_kthread=yes
7285else
Matthias Kloseb9621712010-04-24 17:59:49 +00007286 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007287fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007288rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7289 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290fi
7291
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007292CC="$ac_save_cc"
7293fi
7294
Matthias Kloseb9621712010-04-24 17:59:49 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7296$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007297fi
7298
7299if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7300then
7301# -pthread, if available, provides the right #defines
7302# and linker options to make pthread_create available
7303# Some compilers won't report that they do not support -pthread,
7304# so we need to run a program to see whether it really made the
7305# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7307$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007308if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007309 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007310else
7311 ac_save_cc="$CC"
7312CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007313if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007314 ac_cv_pthread=no
7315else
Matthias Kloseb9621712010-04-24 17:59:49 +00007316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007317/* end confdefs.h. */
7318
Stefan Krah7dba5942012-11-22 22:49:11 +01007319#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007320#include <pthread.h>
7321
7322void* routine(void* p){return NULL;}
7323
7324int main(){
7325 pthread_t p;
7326 if(pthread_create(&p,NULL,routine,NULL)!=0)
7327 return 1;
7328 (void)pthread_detach(p);
7329 return 0;
7330}
7331
7332_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007333if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007334 ac_cv_pthread=yes
7335else
Matthias Kloseb9621712010-04-24 17:59:49 +00007336 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007340fi
7341
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007342CC="$ac_save_cc"
7343fi
7344
Matthias Kloseb9621712010-04-24 17:59:49 +00007345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7346$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007347fi
7348
7349# If we have set a CC compiler flag for thread support then
7350# check if it works for CXX, too.
7351ac_cv_cxx_thread=no
7352if test ! -z "$CXX"
7353then
Matthias Kloseb9621712010-04-24 17:59:49 +00007354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7355$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007356ac_save_cxx="$CXX"
7357
7358if test "$ac_cv_kpthread" = "yes"
7359then
7360 CXX="$CXX -Kpthread"
7361 ac_cv_cxx_thread=yes
7362elif test "$ac_cv_kthread" = "yes"
7363then
7364 CXX="$CXX -Kthread"
7365 ac_cv_cxx_thread=yes
7366elif test "$ac_cv_pthread" = "yes"
7367then
7368 CXX="$CXX -pthread"
7369 ac_cv_cxx_thread=yes
7370fi
7371
7372if test $ac_cv_cxx_thread = yes
7373then
7374 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7375 $CXX -c conftest.$ac_ext 2>&5
7376 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7377 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7378 then
7379 ac_cv_cxx_thread=yes
7380 else
7381 ac_cv_cxx_thread=no
7382 fi
7383 rm -fr conftest*
7384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7386$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007387fi
7388CXX="$ac_save_cxx"
7389
7390
7391# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7393$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007394if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007395 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007396else
Matthias Kloseb9621712010-04-24 17:59:49 +00007397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007398/* end confdefs.h. */
7399#include <stdlib.h>
7400#include <stdarg.h>
7401#include <string.h>
7402#include <float.h>
7403
7404int
7405main ()
7406{
7407
7408 ;
7409 return 0;
7410}
7411_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007412if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007413 ac_cv_header_stdc=yes
7414else
Matthias Kloseb9621712010-04-24 17:59:49 +00007415 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007416fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7418
7419if test $ac_cv_header_stdc = yes; then
7420 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007422/* end confdefs.h. */
7423#include <string.h>
7424
7425_ACEOF
7426if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007427 $EGREP "memchr" >/dev/null 2>&1; then :
7428
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007429else
7430 ac_cv_header_stdc=no
7431fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007432rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007433
7434fi
7435
7436if test $ac_cv_header_stdc = yes; then
7437 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007439/* end confdefs.h. */
7440#include <stdlib.h>
7441
7442_ACEOF
7443if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007444 $EGREP "free" >/dev/null 2>&1; then :
7445
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446else
7447 ac_cv_header_stdc=no
7448fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007449rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007450
7451fi
7452
7453if test $ac_cv_header_stdc = yes; then
7454 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007455 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007456 :
7457else
Matthias Kloseb9621712010-04-24 17:59:49 +00007458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459/* end confdefs.h. */
7460#include <ctype.h>
7461#include <stdlib.h>
7462#if ((' ' & 0x0FF) == 0x020)
7463# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7464# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7465#else
7466# define ISLOWER(c) \
7467 (('a' <= (c) && (c) <= 'i') \
7468 || ('j' <= (c) && (c) <= 'r') \
7469 || ('s' <= (c) && (c) <= 'z'))
7470# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7471#endif
7472
7473#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7474int
7475main ()
7476{
7477 int i;
7478 for (i = 0; i < 256; i++)
7479 if (XOR (islower (i), ISLOWER (i))
7480 || toupper (i) != TOUPPER (i))
7481 return 2;
7482 return 0;
7483}
7484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007485if ac_fn_c_try_run "$LINENO"; then :
7486
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487else
Matthias Kloseb9621712010-04-24 17:59:49 +00007488 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007489fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007490rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7491 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007492fi
7493
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494fi
7495fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7497$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498if test $ac_cv_header_stdc = yes; then
7499
Matthias Kloseb9621712010-04-24 17:59:49 +00007500$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007501
7502fi
7503
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007504for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007505fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007506ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007507sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007508unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007509poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007510sys/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 +01007511sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007512sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007513sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007514sys/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 -07007515libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Victor Stinnerdddf4842016-06-07 11:21:42 +02007516bluetooth/bluetooth.h linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007517sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007518do :
7519 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7520ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007521if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007523#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007524_ACEOF
7525
7526fi
7527
Guido van Rossum627b2d71993-12-24 10:39:16 +00007528done
7529
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007530ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007531for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007532 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7534$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007535if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007536 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007537else
Matthias Kloseb9621712010-04-24 17:59:49 +00007538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007539/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007540#include <sys/types.h>
7541#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007542
Martin v. Löwis11437992002-04-12 09:54:03 +00007543int
7544main ()
7545{
7546if ((DIR *) 0)
7547return 0;
7548 ;
7549 return 0;
7550}
7551_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007552if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007553 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007554else
Matthias Kloseb9621712010-04-24 17:59:49 +00007555 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007559eval ac_res=\$$as_ac_Header
7560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7561$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007562if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007563 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007564#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007565_ACEOF
7566
7567ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007568fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007569
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007570done
7571# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7572if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7574$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007575if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007576 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007577else
Martin v. Löwis11437992002-04-12 09:54:03 +00007578 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007581
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582/* Override any GCC internal prototype to avoid an error.
7583 Use char because int might match the return type of a GCC
7584 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007585#ifdef __cplusplus
7586extern "C"
7587#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007588char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007589int
7590main ()
7591{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007592return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007593 ;
7594 return 0;
7595}
7596_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007597for ac_lib in '' dir; do
7598 if test -z "$ac_lib"; then
7599 ac_res="none required"
7600 else
7601 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007602 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007605 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007607rm -f core conftest.err conftest.$ac_objext \
7608 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007609 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612done
Victor Stinnere0be4232011-10-25 13:06:09 +02007613if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615else
7616 ac_cv_search_opendir=no
7617fi
7618rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007619LIBS=$ac_func_search_save_LIBS
7620fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7622$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007623ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007624if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007625 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007626
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007627fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007628
Michael W. Hudson54241132001-12-07 15:38:26 +00007629else
Matthias Kloseb9621712010-04-24 17:59:49 +00007630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7631$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007632if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007633 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007634else
7635 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007638
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007639/* Override any GCC internal prototype to avoid an error.
7640 Use char because int might match the return type of a GCC
7641 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007642#ifdef __cplusplus
7643extern "C"
7644#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007645char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007646int
7647main ()
7648{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007649return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007650 ;
7651 return 0;
7652}
7653_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007654for ac_lib in '' x; do
7655 if test -z "$ac_lib"; then
7656 ac_res="none required"
7657 else
7658 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007659 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007661 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007663fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007664rm -f core conftest.err conftest.$ac_objext \
7665 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007666 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669done
Victor Stinnere0be4232011-10-25 13:06:09 +02007670if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007671
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007672else
7673 ac_cv_search_opendir=no
7674fi
7675rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007676LIBS=$ac_func_search_save_LIBS
7677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7679$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007680ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007681if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007682 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007683
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007684fi
7685
7686fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007687
Matthias Kloseb9621712010-04-24 17:59:49 +00007688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7689$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007690if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007691 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007692else
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007694/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007695#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007696int
7697main ()
7698{
7699return makedev(0, 0);
7700 ;
7701 return 0;
7702}
7703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007704if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007705 ac_cv_header_sys_types_h_makedev=yes
7706else
Matthias Kloseb9621712010-04-24 17:59:49 +00007707 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709rm -f core conftest.err conftest.$ac_objext \
7710 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007711
7712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7714$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007715
7716if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007717ac_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 +02007718if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007719
Matthias Kloseb9621712010-04-24 17:59:49 +00007720$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007721
7722fi
7723
7724
7725
7726 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007727 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 +02007728if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007729
Matthias Kloseb9621712010-04-24 17:59:49 +00007730$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007731
7732fi
7733
7734
7735 fi
7736fi
7737
Michael W. Hudson54241132001-12-07 15:38:26 +00007738
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007739# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7740for ac_header in net/if.h
7741do :
7742 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7743#ifdef STDC_HEADERS
7744# include <stdlib.h>
7745# include <stddef.h>
7746#else
7747# ifdef HAVE_STDLIB_H
7748# include <stdlib.h>
7749# endif
7750#endif
7751#ifdef HAVE_SYS_SOCKET_H
7752# include <sys/socket.h>
7753#endif
7754
7755"
Victor Stinnere0be4232011-10-25 13:06:09 +02007756if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007757 cat >>confdefs.h <<_ACEOF
7758#define HAVE_NET_IF_H 1
7759_ACEOF
7760
7761fi
7762
7763done
7764
7765
Martin v. Löwis11017b12006-01-14 18:12:57 +00007766# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007767for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007768do :
7769 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 +00007770#ifdef HAVE_ASM_TYPES_H
7771#include <asm/types.h>
7772#endif
7773#ifdef HAVE_SYS_SOCKET_H
7774#include <sys/socket.h>
7775#endif
7776
Matthias Kloseb9621712010-04-24 17:59:49 +00007777"
Victor Stinnere0be4232011-10-25 13:06:09 +02007778if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007779 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007780#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007781_ACEOF
7782
7783fi
7784
7785done
7786
7787
Charles-François Natali47413c12011-10-06 19:47:44 +02007788# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007789for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007790do :
7791 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7792ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7793#ifdef HAVE_SYS_SOCKET_H
7794#include <sys/socket.h>
7795#endif
7796
7797"
7798if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7799 cat >>confdefs.h <<_ACEOF
7800#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7801_ACEOF
7802
7803fi
7804
7805done
7806
7807
Guido van Rossum627b2d71993-12-24 10:39:16 +00007808# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007809was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7811$as_echo_n "checking for clock_t in time.h... " >&6; }
7812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007813/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007814#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007815
7816_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007817if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007818 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007819 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007820else
Martin v. Löwis11437992002-04-12 09:54:03 +00007821
7822
Matthias Kloseb9621712010-04-24 17:59:49 +00007823$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007824
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007825
Guido van Rossum627b2d71993-12-24 10:39:16 +00007826fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007827rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007828
Matthias Kloseb9621712010-04-24 17:59:49 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7830$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007831
Matthias Kloseb9621712010-04-24 17:59:49 +00007832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7833$as_echo_n "checking for makedev... " >&6; }
7834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007835/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007836
Jesus Cea740f53a2010-04-28 11:35:30 +00007837#if defined(MAJOR_IN_MKDEV)
7838#include <sys/mkdev.h>
7839#elif defined(MAJOR_IN_SYSMACROS)
7840#include <sys/sysmacros.h>
7841#else
7842#include <sys/types.h>
7843#endif
7844
Neal Norwitz11690112002-07-30 01:08:28 +00007845int
7846main ()
7847{
Jesus Cea740f53a2010-04-28 11:35:30 +00007848
7849 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007850 ;
7851 return 0;
7852}
Matthias Kloseb159a552010-04-25 21:00:44 +00007853
Neal Norwitz11690112002-07-30 01:08:28 +00007854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007855if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007856 ac_cv_has_makedev=yes
7857else
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007859fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007860rm -f core conftest.err conftest.$ac_objext \
7861 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7863$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007864if test "$ac_cv_has_makedev" = "yes"; then
7865
Matthias Kloseb9621712010-04-24 17:59:49 +00007866$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007867
7868fi
7869
Christian Heimes985ecdc2013-11-20 11:46:18 +01007870# byte swapping
7871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
7872$as_echo_n "checking for le64toh... " >&6; }
7873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7874/* end confdefs.h. */
7875
7876#ifdef HAVE_ENDIAN_H
7877#include <endian.h>
7878#elif defined(HAVE_SYS_ENDIAN_H)
7879#include <sys/endian.h>
7880#endif
7881
7882int
7883main ()
7884{
7885
7886 le64toh(1)
7887 ;
7888 return 0;
7889}
7890
7891_ACEOF
7892if ac_fn_c_try_link "$LINENO"; then :
7893 ac_cv_has_le64toh=yes
7894else
7895 ac_cv_has_le64toh=no
7896fi
7897rm -f core conftest.err conftest.$ac_objext \
7898 conftest$ac_exeext conftest.$ac_ext
7899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
7900$as_echo "$ac_cv_has_le64toh" >&6; }
7901if test "$ac_cv_has_le64toh" = "yes"; then
7902
7903$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
7904
7905fi
7906
Martin v. Löwis399a6892002-10-04 10:22:02 +00007907# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7908# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7909# defined, but the compiler does not support pragma redefine_extname,
7910# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7911# structures (such as rlimit64) without declaring them. As a
7912# work-around, disable LFS on such configurations
7913
7914use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7916$as_echo_n "checking Solaris LFS bug... " >&6; }
7917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007918/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007919
7920#define _LARGEFILE_SOURCE 1
7921#define _FILE_OFFSET_BITS 64
7922#include <sys/resource.h>
7923
Martin v. Löwis399a6892002-10-04 10:22:02 +00007924int
7925main ()
7926{
7927struct rlimit foo;
7928 ;
7929 return 0;
7930}
7931_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007932if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007933 sol_lfs_bug=no
7934else
Matthias Kloseb9621712010-04-24 17:59:49 +00007935 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007936fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7939$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007940if test "$sol_lfs_bug" = "yes"; then
7941 use_lfs=no
7942fi
7943
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02007944# Don't use largefile support for GNU/Hurd
7945case $ac_sys_system in GNU*)
7946 use_lfs=no
7947esac
7948
Martin v. Löwis399a6892002-10-04 10:22:02 +00007949if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007950# Two defines needed to enable largefile support on various platforms
7951# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007952case $ac_sys_system/$ac_sys_release in
7953AIX*)
7954
7955$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7956
7957 ;;
7958esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007959
Matthias Kloseb9621712010-04-24 17:59:49 +00007960$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007961
7962
Matthias Kloseb9621712010-04-24 17:59:49 +00007963$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007964
Martin v. Löwis399a6892002-10-04 10:22:02 +00007965fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007966
Guido van Rossum84e7b241996-08-19 21:59:00 +00007967# Add some code to confdefs.h so that the test for off_t works on SCO
7968cat >> confdefs.h <<\EOF
7969#if defined(SCO_DS)
7970#undef _OFF_T
7971#endif
7972EOF
7973
Guido van Rossumef2255b2000-03-10 22:30:29 +00007974# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007975ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007976if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007977
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007978else
Martin v. Löwis11437992002-04-12 09:54:03 +00007979
7980cat >>confdefs.h <<_ACEOF
7981#define mode_t int
7982_ACEOF
7983
7984fi
7985
Matthias Kloseb9621712010-04-24 17:59:49 +00007986ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007987if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007988
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007989else
Martin v. Löwis11437992002-04-12 09:54:03 +00007990
7991cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007992#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007993_ACEOF
7994
7995fi
7996
Matthias Kloseb9621712010-04-24 17:59:49 +00007997ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007998if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007999
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008000else
Martin v. Löwis11437992002-04-12 09:54:03 +00008001
8002cat >>confdefs.h <<_ACEOF
8003#define pid_t int
8004_ACEOF
8005
8006fi
8007
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008008
Martin v. Löwis11437992002-04-12 09:54:03 +00008009cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008010#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008011_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008012
Matthias Kloseb9621712010-04-24 17:59:49 +00008013ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008014if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008015
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008016else
Martin v. Löwis11437992002-04-12 09:54:03 +00008017
8018cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008019#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008020_ACEOF
8021
8022fi
8023
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8025$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008026if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008028else
Matthias Kloseb9621712010-04-24 17:59:49 +00008029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008030/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008031#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008032
8033_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008035 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008036 ac_cv_type_uid_t=yes
8037else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008038 ac_cv_type_uid_t=no
8039fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008040rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008042fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8044$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008045if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008046
Matthias Kloseb9621712010-04-24 17:59:49 +00008047$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008048
8049
Matthias Kloseb9621712010-04-24 17:59:49 +00008050$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008051
8052fi
8053
Mark Dickinson983bc162012-12-02 12:11:38 +00008054
Matthias Kloseb9621712010-04-24 17:59:49 +00008055ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008056if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057
Matthias Kloseb9621712010-04-24 17:59:49 +00008058$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008059
8060fi
8061
Stefan Krah1919b7e2012-03-21 18:25:23 +01008062ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8063if test "x$ac_cv_type___uint128_t" = xyes; then :
8064
8065$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8066
8067fi
8068
Jack Jansendd19cf82001-12-06 22:36:17 +00008069
Michael W. Hudson54241132001-12-07 15:38:26 +00008070# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008071# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008072# The cast to long int works around a bug in the HP C Compiler
8073# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8074# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8075# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8077$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008078if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008079 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008080else
Matthias Kloseb9621712010-04-24 17:59:49 +00008081 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 +00008082
Martin v. Löwis11437992002-04-12 09:54:03 +00008083else
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 if test "$ac_cv_type_int" = yes; then
8085 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8086$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008087as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008088See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008089 else
8090 ac_cv_sizeof_int=0
8091 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008093
Martin v. Löwis11437992002-04-12 09:54:03 +00008094fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8096$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008097
8098
8099
Martin v. Löwis11437992002-04-12 09:54:03 +00008100cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008101#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008102_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008103
8104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008105# The cast to long int works around a bug in the HP C Compiler
8106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8108# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8110$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008111if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008112 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008113else
Matthias Kloseb9621712010-04-24 17:59:49 +00008114 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 +00008115
Martin v. Löwis11437992002-04-12 09:54:03 +00008116else
Matthias Kloseb9621712010-04-24 17:59:49 +00008117 if test "$ac_cv_type_long" = yes; then
8118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008120as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008121See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122 else
8123 ac_cv_sizeof_long=0
8124 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008125fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008126
Martin v. Löwis11437992002-04-12 09:54:03 +00008127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8129$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008130
8131
8132
Martin v. Löwis11437992002-04-12 09:54:03 +00008133cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008134#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008135_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008136
8137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008138# The cast to long int works around a bug in the HP C Compiler
8139# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8140# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8141# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8143$as_echo_n "checking size of long long... " >&6; }
8144if ${ac_cv_sizeof_long_long+:} false; then :
8145 $as_echo_n "(cached) " >&6
8146else
8147 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8148
8149else
8150 if test "$ac_cv_type_long_long" = yes; then
8151 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8153as_fn_error 77 "cannot compute sizeof (long long)
8154See \`config.log' for more details" "$LINENO" 5; }
8155 else
8156 ac_cv_sizeof_long_long=0
8157 fi
8158fi
8159
8160fi
8161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8162$as_echo "$ac_cv_sizeof_long_long" >&6; }
8163
8164
8165
8166cat >>confdefs.h <<_ACEOF
8167#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8168_ACEOF
8169
8170
8171# The cast to long int works around a bug in the HP C Compiler
8172# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8173# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8174# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8176$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008177if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008178 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008179else
Matthias Kloseb9621712010-04-24 17:59:49 +00008180 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 +00008181
Martin v. Löwis11437992002-04-12 09:54:03 +00008182else
Matthias Kloseb9621712010-04-24 17:59:49 +00008183 if test "$ac_cv_type_void_p" = yes; then
8184 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008186as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008187See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008188 else
8189 ac_cv_sizeof_void_p=0
8190 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008192
Martin v. Löwis11437992002-04-12 09:54:03 +00008193fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8195$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008196
8197
8198
Martin v. Löwis11437992002-04-12 09:54:03 +00008199cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008200#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008201_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008202
8203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008204# The cast to long int works around a bug in the HP C Compiler
8205# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8206# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8207# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8209$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008210if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008211 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008212else
Matthias Kloseb9621712010-04-24 17:59:49 +00008213 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 +00008214
Martin v. Löwis11437992002-04-12 09:54:03 +00008215else
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 if test "$ac_cv_type_short" = yes; then
8217 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8218$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008219as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008220See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008221 else
8222 ac_cv_sizeof_short=0
8223 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008224fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008225
Martin v. Löwis11437992002-04-12 09:54:03 +00008226fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8228$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008229
8230
8231
Martin v. Löwis11437992002-04-12 09:54:03 +00008232cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008233#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008234_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008235
8236
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008237# The cast to long int works around a bug in the HP C Compiler
8238# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8239# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8240# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8242$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008243if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008245else
Matthias Kloseb9621712010-04-24 17:59:49 +00008246 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 +00008247
Martin v. Löwis11437992002-04-12 09:54:03 +00008248else
Matthias Kloseb9621712010-04-24 17:59:49 +00008249 if test "$ac_cv_type_float" = yes; then
8250 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8251$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008252as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008253See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254 else
8255 ac_cv_sizeof_float=0
8256 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008257fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008258
Martin v. Löwis11437992002-04-12 09:54:03 +00008259fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8261$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008262
8263
8264
Martin v. Löwis11437992002-04-12 09:54:03 +00008265cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008266#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008267_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008268
8269
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008270# The cast to long int works around a bug in the HP C Compiler
8271# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8272# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8273# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8275$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008276if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008277 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008278else
Matthias Kloseb9621712010-04-24 17:59:49 +00008279 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 +00008280
Martin v. Löwis11437992002-04-12 09:54:03 +00008281else
Matthias Kloseb9621712010-04-24 17:59:49 +00008282 if test "$ac_cv_type_double" = yes; then
8283 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8284$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008285as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008286See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008287 else
8288 ac_cv_sizeof_double=0
8289 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008290fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291
Martin v. Löwis11437992002-04-12 09:54:03 +00008292fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8294$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008295
8296
8297
Martin v. Löwis11437992002-04-12 09:54:03 +00008298cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008299#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008300_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008301
8302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008303# The cast to long int works around a bug in the HP C Compiler
8304# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8305# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8306# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8308$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008309if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008310 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008311else
Matthias Kloseb9621712010-04-24 17:59:49 +00008312 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 +00008313
Martin v. Löwis11437992002-04-12 09:54:03 +00008314else
Matthias Kloseb9621712010-04-24 17:59:49 +00008315 if test "$ac_cv_type_fpos_t" = yes; then
8316 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8317$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008318as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008319See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320 else
8321 ac_cv_sizeof_fpos_t=0
8322 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008323fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008324
Martin v. Löwis11437992002-04-12 09:54:03 +00008325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8327$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328
8329
8330
Martin v. Löwis11437992002-04-12 09:54:03 +00008331cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008332#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008333_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008334
Michael W. Hudson54241132001-12-07 15:38:26 +00008335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008336# The cast to long int works around a bug in the HP C Compiler
8337# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8338# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8339# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8341$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008342if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008343 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008344else
Matthias Kloseb9621712010-04-24 17:59:49 +00008345 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 +00008346
Martin v. Löwis18e16552006-02-15 17:27:45 +00008347else
Matthias Kloseb9621712010-04-24 17:59:49 +00008348 if test "$ac_cv_type_size_t" = yes; then
8349 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008351as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008352See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008353 else
8354 ac_cv_sizeof_size_t=0
8355 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008356fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008357
Martin v. Löwis18e16552006-02-15 17:27:45 +00008358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8360$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008361
8362
8363
Martin v. Löwis18e16552006-02-15 17:27:45 +00008364cat >>confdefs.h <<_ACEOF
8365#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8366_ACEOF
8367
8368
Christian Heimes400adb02008-02-01 08:12:03 +00008369# The cast to long int works around a bug in the HP C Compiler
8370# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8371# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8372# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8374$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008375if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008377else
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 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 +00008379
Christian Heimes400adb02008-02-01 08:12:03 +00008380else
Matthias Kloseb9621712010-04-24 17:59:49 +00008381 if test "$ac_cv_type_pid_t" = yes; then
8382 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008384as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008385See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008386 else
8387 ac_cv_sizeof_pid_t=0
8388 fi
8389fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008390
Christian Heimes400adb02008-02-01 08:12:03 +00008391fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8393$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008394
8395
8396
8397cat >>confdefs.h <<_ACEOF
8398#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8399_ACEOF
8400
8401
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008402# The cast to long int works around a bug in the HP C Compiler
8403# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8404# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8405# This bug is HP SR number 8606223364.
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8407$as_echo_n "checking size of uintptr_t... " >&6; }
8408if ${ac_cv_sizeof_uintptr_t+:} false; then :
8409 $as_echo_n "(cached) " >&6
8410else
8411 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8412
8413else
8414 if test "$ac_cv_type_uintptr_t" = yes; then
8415 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8416$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8417as_fn_error 77 "cannot compute sizeof (uintptr_t)
8418See \`config.log' for more details" "$LINENO" 5; }
8419 else
8420 ac_cv_sizeof_uintptr_t=0
8421 fi
8422fi
8423
8424fi
8425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8426$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8427
8428
8429
8430cat >>confdefs.h <<_ACEOF
8431#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8432_ACEOF
8433
8434
Michael W. Hudson54241132001-12-07 15:38:26 +00008435
Matthias Kloseb9621712010-04-24 17:59:49 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8437$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008438have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008440/* end confdefs.h. */
8441
8442int
8443main ()
8444{
8445long double x; x = (long double)0;
8446 ;
8447 return 0;
8448}
8449_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008450if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008451
8452
Matthias Kloseb9621712010-04-24 17:59:49 +00008453$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008454
8455 have_long_double=yes
8456
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008457fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8460$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008461if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008462# The cast to long int works around a bug in the HP C Compiler
8463# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8464# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8465# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8467$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008468if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008469 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008470else
Matthias Kloseb9621712010-04-24 17:59:49 +00008471 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 +00008472
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008473else
Matthias Kloseb9621712010-04-24 17:59:49 +00008474 if test "$ac_cv_type_long_double" = yes; then
8475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008477as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008478See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008479 else
8480 ac_cv_sizeof_long_double=0
8481 fi
8482fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008483
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008484fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8486$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008487
8488
8489
8490cat >>confdefs.h <<_ACEOF
8491#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8492_ACEOF
8493
8494
8495fi
8496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497# The cast to long int works around a bug in the HP C Compiler
8498# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8499# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8500# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8502$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008503if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008504 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008505else
Matthias Kloseb9621712010-04-24 17:59:49 +00008506 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 +00008507
Thomas Woutersb2137042007-02-01 18:02:27 +00008508else
Matthias Kloseb9621712010-04-24 17:59:49 +00008509 if test "$ac_cv_type__Bool" = yes; then
8510 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008512as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008513See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008514 else
8515 ac_cv_sizeof__Bool=0
8516 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008517fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008518
Thomas Woutersb2137042007-02-01 18:02:27 +00008519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8521$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522
8523
8524
Thomas Woutersb2137042007-02-01 18:02:27 +00008525cat >>confdefs.h <<_ACEOF
8526#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8527_ACEOF
8528
8529
Thomas Woutersb2137042007-02-01 18:02:27 +00008530
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008531# The cast to long int works around a bug in the HP C Compiler
8532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8534# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8536$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008537if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008538 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008539else
Matthias Kloseb9621712010-04-24 17:59:49 +00008540 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008541#ifdef HAVE_SYS_TYPES_H
8542#include <sys/types.h>
8543#endif
8544
Matthias Kloseb9621712010-04-24 17:59:49 +00008545"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008546
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008547else
Matthias Kloseb9621712010-04-24 17:59:49 +00008548 if test "$ac_cv_type_off_t" = yes; then
8549 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8550$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008551as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008552See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008553 else
8554 ac_cv_sizeof_off_t=0
8555 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008556fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008557
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008558fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8560$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008561
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008562
8563
Martin v. Löwis11437992002-04-12 09:54:03 +00008564cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008565#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008566_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008567
Michael W. Hudson54241132001-12-07 15:38:26 +00008568
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008569
Matthias Kloseb9621712010-04-24 17:59:49 +00008570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8571$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008572if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008573 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008574
Matthias Kloseb9621712010-04-24 17:59:49 +00008575$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008576
Matthias Kloseb9621712010-04-24 17:59:49 +00008577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8578$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008579else
Matthias Kloseb9621712010-04-24 17:59:49 +00008580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8581$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008582fi
8583
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008584# The cast to long int works around a bug in the HP C Compiler
8585# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8586# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8587# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8589$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008590if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008591 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008592else
Matthias Kloseb9621712010-04-24 17:59:49 +00008593 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008594#ifdef HAVE_SYS_TYPES_H
8595#include <sys/types.h>
8596#endif
8597#ifdef HAVE_TIME_H
8598#include <time.h>
8599#endif
8600
Matthias Kloseb9621712010-04-24 17:59:49 +00008601"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008602
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008603else
Matthias Kloseb9621712010-04-24 17:59:49 +00008604 if test "$ac_cv_type_time_t" = yes; then
8605 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8606$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008607as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008608See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008609 else
8610 ac_cv_sizeof_time_t=0
8611 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008613
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008614fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8616$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008617
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008618
8619
Martin v. Löwis11437992002-04-12 09:54:03 +00008620cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008621#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008622_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008623
Michael W. Hudson54241132001-12-07 15:38:26 +00008624
8625
Trent Mick635f6fb2000-08-23 21:33:05 +00008626# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008627ac_save_cc="$CC"
8628if test "$ac_cv_kpthread" = "yes"
8629then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008630elif test "$ac_cv_kthread" = "yes"
8631then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008632elif test "$ac_cv_pthread" = "yes"
8633then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008634fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008635
Matthias Kloseb9621712010-04-24 17:59:49 +00008636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8637$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008638have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008640/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008641
8642 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008643int
8644main ()
8645{
Guido van Rossum12580492000-09-24 16:47:19 +00008646pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008647 ;
8648 return 0;
8649}
Matthias Kloseb159a552010-04-25 21:00:44 +00008650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008652if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008653 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8657$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008658if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008659 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008660# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8661# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8662# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8664$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008665if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008666 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008667else
Matthias Kloseb9621712010-04-24 17:59:49 +00008668 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008669#ifdef HAVE_PTHREAD_H
8670#include <pthread.h>
8671#endif
8672
Matthias Kloseb9621712010-04-24 17:59:49 +00008673"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008674
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008675else
Matthias Kloseb9621712010-04-24 17:59:49 +00008676 if test "$ac_cv_type_pthread_t" = yes; then
8677 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8678$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008679as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008680See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008681 else
8682 ac_cv_sizeof_pthread_t=0
8683 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008685
Trent Mick635f6fb2000-08-23 21:33:05 +00008686fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8688$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008689
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008690
8691
Martin v. Löwis11437992002-04-12 09:54:03 +00008692cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008693#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008694_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008695
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008696
Trent Mick635f6fb2000-08-23 21:33:05 +00008697fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008698CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008699
Michael W. Hudson54241132001-12-07 15:38:26 +00008700
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008701case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008702 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008703 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8704 ;;
8705 Darwin/*)
8706 OTHER_LIBTOOL_OPT=""
8707 ;;
8708esac
8709
8710
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008711
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008712case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008713 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008714 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8715 if test "${enable_universalsdk}"; then
8716 :
8717 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008718 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008719 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008720 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008721 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008722 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008723 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008724 if test ${gcc_version} '<' 4.0
8725 then
8726 LIBTOOL_CRUFT="-lcc_dynamic"
8727 else
8728 LIBTOOL_CRUFT=""
8729 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008730 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008731 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008732else
Matthias Kloseb9621712010-04-24 17:59:49 +00008733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008734/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008735
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008736 #include <unistd.h>
8737 int main(int argc, char*argv[])
8738 {
8739 if (sizeof(long) == 4) {
8740 return 0;
8741 } else {
8742 return 1;
8743 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008744 }
8745
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008746_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008747if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008748 ac_osx_32bit=yes
8749else
Matthias Kloseb9621712010-04-24 17:59:49 +00008750 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008751fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008752rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8753 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008754fi
8755
8756
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008757 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008758 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008759 i386)
8760 MACOSX_DEFAULT_ARCH="i386"
8761 ;;
8762 ppc)
8763 MACOSX_DEFAULT_ARCH="ppc"
8764 ;;
8765 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008766 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008767 ;;
8768 esac
8769 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008770 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008771 i386)
8772 MACOSX_DEFAULT_ARCH="x86_64"
8773 ;;
8774 ppc)
8775 MACOSX_DEFAULT_ARCH="ppc64"
8776 ;;
8777 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008778 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008779 ;;
8780 esac
8781
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008782 fi
8783
8784 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008785 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008786 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008787esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8789$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008790if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008791then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008792 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008794 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008795
Matthias Kloseb9621712010-04-24 17:59:49 +00008796$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
Matthias Kloseb9621712010-04-24 17:59:49 +00008798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8799$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008800 if test $enable_shared = "yes"
8801 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008802 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 +00008803 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008804else
Matthias Kloseb9621712010-04-24 17:59:49 +00008805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8806$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008807fi
8808
Matthias Kloseb9621712010-04-24 17:59:49 +00008809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8810$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008811case $ac_sys_system/$ac_sys_release in
8812 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008813
Matthias Kloseb9621712010-04-24 17:59:49 +00008814$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008815
Matthias Kloseb9621712010-04-24 17:59:49 +00008816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8817$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008818 ;;
8819 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8821$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008822 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008823esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008824
Guido van Rossum0a516c91994-09-12 10:58:40 +00008825# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008826
Michael W. Hudson54241132001-12-07 15:38:26 +00008827
8828
8829
8830
Benjamin Peterson99f03762010-04-11 22:15:28 +00008831
Thomas Wouters477c8d52006-05-27 19:21:47 +00008832
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008833# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8834# -- usually .so, .sl on HP-UX, .dll on Cygwin
8835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8836$as_echo_n "checking the extension of shared libraries... " >&6; }
8837if test -z "$SHLIB_SUFFIX"; then
8838 case $ac_sys_system in
8839 hp*|HP*)
8840 case `uname -m` in
8841 ia64) SHLIB_SUFFIX=.so;;
8842 *) SHLIB_SUFFIX=.sl;;
8843 esac
8844 ;;
8845 CYGWIN*) SHLIB_SUFFIX=.dll;;
8846 *) SHLIB_SUFFIX=.so;;
8847 esac
8848fi
8849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8850$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008851
Guido van Rossum0a516c91994-09-12 10:58:40 +00008852# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008853# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008854# (Shared libraries in this instance are shared modules to be loaded into
8855# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8857$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008858if test -z "$LDSHARED"
8859then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008860 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008861 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008862 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00008863 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008864 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008865 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008866 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008867 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008868 if test "$GCC" = "yes" ; then
8869 LDSHARED='$(CC) -shared'
8870 LDCXXSHARED='$(CXX) -shared'
8871 else
8872 LDSHARED='$(CC) -G'
8873 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008874 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008875 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008876 if test "$GCC" = "yes" ; then
8877 LDSHARED='$(CC) -shared'
8878 LDCXXSHARED='$(CXX) -shared'
8879 else
8880 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008881 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008882 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008883 LDSHARED='$(CC) -bundle'
8884 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008885 if test "$enable_framework" ; then
8886 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008887 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8888 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008889 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008890 else
8891 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008892 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008893 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008894 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008895 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008896 LDSHARED='$(CC) -bundle'
8897 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008898 if test "$enable_framework" ; then
8899 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008900 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8901 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008902 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008903 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008904 # No framework, use the Python app as bundle-loader
8905 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008906 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008907 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008908 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008909 Darwin/*)
8910 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8911 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008912
Ned Deily36820b62014-06-25 13:44:22 -07008913 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8914 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8915 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8916 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8917 if test ${dep_target_major} -eq 10 && \
8918 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008919 then
Ned Deily36820b62014-06-25 13:44:22 -07008920 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00008921 LDSHARED='$(CC) -bundle'
8922 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008923 if test "$enable_framework" ; then
8924 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008925 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8926 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008927 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008928 else
8929 # No framework, use the Python app as bundle-loader
8930 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8931 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008932 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008933 fi
Ned Deily36820b62014-06-25 13:44:22 -07008934 else
8935 # building for OS X 10.3 and later
8936 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8937 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8938 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008939 fi
8940 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008941 Linux*|GNU*|QNX*)
8942 LDSHARED='$(CC) -shared'
8943 LDCXXSHARED='$(CXX) -shared';;
8944 BSD/OS*/4*)
8945 LDSHARED="gcc -shared"
8946 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008947 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008948 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008949 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008950 LDSHARED='$(CC) -shared'
8951 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008952 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008953 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008954 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008955 OpenBSD*)
8956 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8957 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008958 LDSHARED='$(CC) -shared $(CCSHARED)'
8959 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008960 else
8961 case `uname -r` in
8962 [01].* | 2.[0-7] | 2.[0-7].*)
8963 LDSHARED="ld -Bshareable ${LDFLAGS}"
8964 ;;
8965 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008966 LDSHARED='$(CC) -shared $(CCSHARED)'
8967 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008968 ;;
8969 esac
8970 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008971 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008972 LDSHARED='$(CC) -shared'
8973 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008974 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008975 if test "$GCC" = "yes" ; then
8976 LDSHARED='$(CC) -shared'
8977 LDCXXSHARED='$(CXX) -shared'
8978 else
8979 LDSHARED='$(CC) -G'
8980 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008981 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008982 SCO_SV*)
8983 LDSHARED='$(CC) -Wl,-G,-Bexport'
8984 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8985 CYGWIN*)
8986 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8987 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008988 *) LDSHARED="ld";;
8989 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8992$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008993LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008994BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008995# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008996# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8998$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008999if test -z "$CCSHARED"
9000then
Guido van Rossum07397971997-04-29 21:49:50 +00009001 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009002 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009003 then CCSHARED="-fPIC";
9004 elif test `uname -p` = sparc;
9005 then CCSHARED="-xcode=pic32";
9006 else CCSHARED="-Kpic";
9007 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009008 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009009 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009010 else CCSHARED="+z";
9011 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009012 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009013 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009014 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009015 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009016 if test "$GCC" = "yes"
9017 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009018 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009019 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009020 SCO_SV*)
9021 if test "$GCC" = "yes"
9022 then CCSHARED="-fPIC"
9023 else CCSHARED="-Kpic -belf"
9024 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009025 IRIX*/6*) case $CC in
9026 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009027 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009028 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009029 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9032$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009033# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009034# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9036$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009037if test -z "$LINKFORSHARED"
9038then
Guido van Rossum07397971997-04-29 21:49:50 +00009039 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009040 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009041 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009042 LINKFORSHARED="-Wl,-E -Wl,+s";;
9043# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009044 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009045 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009046 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009048 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009049
9050 # Issue #18075: the default maximum stack size (8MBytes) is too
9051 # small for the default recursion limit. Increase the stack size
9052 # to ensure that tests don't crash
9053 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9054
Jack Jansene578a632001-08-15 01:27:14 +00009055 if test "$enable_framework"
9056 then
Jack Jansenda49e192005-01-07 13:08:22 +00009057 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009058 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009059 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009060 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009061 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009062 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009063 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009064 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9065 then
9066 LINKFORSHARED="-Wl,--export-dynamic"
9067 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009068 SunOS/5*) case $CC in
9069 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009070 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009071 then
9072 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009073 fi;;
9074 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009075 CYGWIN*)
9076 if test $enable_shared = "no"
9077 then
9078 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9079 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009080 QNX*)
9081 # -Wl,-E causes the symbols to be added to the dynamic
9082 # symbol table so that they can be found when a module
9083 # is loaded. -N 2048K causes the stack size to be set
9084 # to 2048 kilobytes so that the stack doesn't overflow
9085 # when running test_compile.py.
9086 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009087 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9090$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009091
Michael W. Hudson54241132001-12-07 15:38:26 +00009092
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009093
Matthias Kloseb9621712010-04-24 17:59:49 +00009094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9095$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009096if test ! "$LIBRARY" = "$LDLIBRARY"
9097then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009098 case $ac_sys_system in
9099 CYGWIN*)
9100 # Cygwin needs CCSHARED when building extension DLLs
9101 # but not when building the interpreter DLL.
9102 CFLAGSFORSHARED='';;
9103 *)
9104 CFLAGSFORSHARED='$(CCSHARED)'
9105 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9108$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009109
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009110# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9111# library (with --enable-shared).
9112# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009113# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9114# if it is not required, since it creates a dependency of the shared library
9115# to LIBS. This, in turn, means that applications linking the shared libpython
9116# don't need to link LIBS explicitly. The default should be only changed
9117# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009118
Matthias Kloseb9621712010-04-24 17:59:49 +00009119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9120$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009121case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009122 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009123 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009124esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9126$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009127
9128
Guido van Rossum627b2d71993-12-24 10:39:16 +00009129# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9131$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009132if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009133 $as_echo_n "(cached) " >&6
9134else
9135 ac_check_lib_save_LIBS=$LIBS
9136LIBS="-lsendfile $LIBS"
9137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9138/* end confdefs.h. */
9139
9140/* Override any GCC internal prototype to avoid an error.
9141 Use char because int might match the return type of a GCC
9142 builtin and then its argument prototype would still apply. */
9143#ifdef __cplusplus
9144extern "C"
9145#endif
9146char sendfile ();
9147int
9148main ()
9149{
9150return sendfile ();
9151 ;
9152 return 0;
9153}
9154_ACEOF
9155if ac_fn_c_try_link "$LINENO"; then :
9156 ac_cv_lib_sendfile_sendfile=yes
9157else
9158 ac_cv_lib_sendfile_sendfile=no
9159fi
9160rm -f core conftest.err conftest.$ac_objext \
9161 conftest$ac_exeext conftest.$ac_ext
9162LIBS=$ac_check_lib_save_LIBS
9163fi
9164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9165$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009166if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009167 cat >>confdefs.h <<_ACEOF
9168#define HAVE_LIBSENDFILE 1
9169_ACEOF
9170
9171 LIBS="-lsendfile $LIBS"
9172
9173fi
9174
Matthias Kloseb9621712010-04-24 17:59:49 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9176$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009177if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009178 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009179else
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009181LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009182cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009183/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009184
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185/* Override any GCC internal prototype to avoid an error.
9186 Use char because int might match the return type of a GCC
9187 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009188#ifdef __cplusplus
9189extern "C"
9190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009191char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009192int
9193main ()
9194{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009195return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 ;
9197 return 0;
9198}
9199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009200if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009202else
Matthias Kloseb9621712010-04-24 17:59:49 +00009203 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009204fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009205rm -f core conftest.err conftest.$ac_objext \
9206 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009207LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009208fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9210$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009211if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009212 cat >>confdefs.h <<_ACEOF
9213#define HAVE_LIBDL 1
9214_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009215
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009216 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009218fi
9219 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9221$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009222if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009223 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009224else
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009226LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009228/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009229
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230/* Override any GCC internal prototype to avoid an error.
9231 Use char because int might match the return type of a GCC
9232 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009233#ifdef __cplusplus
9234extern "C"
9235#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009236char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009237int
9238main ()
9239{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 ;
9242 return 0;
9243}
9244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009245if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009247else
Matthias Kloseb9621712010-04-24 17:59:49 +00009248 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009249fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009250rm -f core conftest.err conftest.$ac_objext \
9251 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009252LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009253fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9255$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009256if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 cat >>confdefs.h <<_ACEOF
9258#define HAVE_LIBDLD 1
9259_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009260
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009261 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009262
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009263fi
9264 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009265
Georg Brandlb1441c72009-01-03 22:33:39 +00009266# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009267if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9269$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009270if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009271 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009272else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009273 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009276
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009277/* Override any GCC internal prototype to avoid an error.
9278 Use char because int might match the return type of a GCC
9279 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009280#ifdef __cplusplus
9281extern "C"
9282#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009283char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009284int
9285main ()
9286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009287return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009288 ;
9289 return 0;
9290}
9291_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009292for ac_lib in '' pthread rt posix4; do
9293 if test -z "$ac_lib"; then
9294 ac_res="none required"
9295 else
9296 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009297 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009299 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009300 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009301fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009302rm -f core conftest.err conftest.$ac_objext \
9303 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009304 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009305 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009307done
Victor Stinnere0be4232011-10-25 13:06:09 +02009308if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009309
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009310else
9311 ac_cv_search_sem_init=no
9312fi
9313rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009314LIBS=$ac_func_search_save_LIBS
9315fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9317$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009318ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009319if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009320 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009321
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009322fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009323 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009324 # posix4 on Solaris 2.6
9325 # pthread (first!) on Linux
9326fi
9327
Martin v. Löwis19d17342003-06-14 21:03:05 +00009328# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9330$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009331if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009332 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009333else
9334 ac_check_lib_save_LIBS=$LIBS
9335LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009337/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009338
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009339/* Override any GCC internal prototype to avoid an error.
9340 Use char because int might match the return type of a GCC
9341 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009342#ifdef __cplusplus
9343extern "C"
9344#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009345char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009346int
9347main ()
9348{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009349return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009350 ;
9351 return 0;
9352}
9353_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009354if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009355 ac_cv_lib_intl_textdomain=yes
9356else
Matthias Kloseb9621712010-04-24 17:59:49 +00009357 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009358fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009359rm -f core conftest.err conftest.$ac_objext \
9360 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009361LIBS=$ac_check_lib_save_LIBS
9362fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9364$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009365if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009366
Matthias Kloseb9621712010-04-24 17:59:49 +00009367$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009368
Brett Cannonc6d936e2009-06-07 20:09:53 +00009369 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009370fi
9371
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009372
9373# checks for system dependent C++ extensions support
9374case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009375 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9376$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009378/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009379
Georg Brandl59e87bd2011-02-15 19:48:59 +00009380 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009381int
9382main ()
9383{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009384loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 ;
9386 return 0;
9387}
Matthias Kloseb159a552010-04-25 21:00:44 +00009388
Martin v. Löwis11437992002-04-12 09:54:03 +00009389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009390if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009391
Matthias Kloseb159a552010-04-25 21:00:44 +00009392
Matthias Kloseb9621712010-04-24 17:59:49 +00009393$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009394
Matthias Kloseb159a552010-04-25 21:00:44 +00009395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009396$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009397
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009398else
Matthias Kloseb159a552010-04-25 21:00:44 +00009399
9400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009401$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009402
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009403fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009404rm -f core conftest.err conftest.$ac_objext \
9405 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009406 *) ;;
9407esac
9408
Christian Heimes985ecdc2013-11-20 11:46:18 +01009409# check for systems that require aligned memory access
9410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9411$as_echo_n "checking aligned memory access is required... " >&6; }
9412if test "$cross_compiling" = yes; then :
9413 aligned_required=yes
9414else
9415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9416/* end confdefs.h. */
9417
9418int main()
9419{
9420 char s[16];
9421 int i, *p1, *p2;
9422 for (i=0; i < 16; i++)
9423 s[i] = i;
9424 p1 = (int*)(s+1);
9425 p2 = (int*)(s+2);
9426 if (*p1 == *p2)
9427 return 1;
9428 return 0;
9429}
9430
9431_ACEOF
9432if ac_fn_c_try_run "$LINENO"; then :
9433 aligned_required=no
9434else
9435 aligned_required=yes
9436fi
9437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9438 conftest.$ac_objext conftest.beam conftest.$ac_ext
9439fi
9440
9441
9442if test "$aligned_required" = yes ; then
9443
9444$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9445
9446fi
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $aligned_required" >&5
9448$as_echo "$aligned_required" >&6; }
9449
9450
9451# str, bytes and memoryview hash algorithm
9452
9453
9454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9455$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9456
9457# Check whether --with-hash_algorithm was given.
9458if test "${with_hash_algorithm+set}" = set; then :
9459 withval=$with_hash_algorithm;
9460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9461$as_echo "$withval" >&6; }
9462case "$withval" in
9463 siphash24)
9464 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9465
9466 ;;
9467 fnv)
9468 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9469
9470 ;;
9471 *)
9472 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9473 ;;
9474esac
9475
9476else
9477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9478$as_echo "default" >&6; }
9479fi
9480
9481
Charles-François Natalid30b0222014-05-08 23:08:51 +01009482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9483$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9484
9485# Check whether --with-address_sanitizer was given.
9486if test "${with_address_sanitizer+set}" = set; then :
9487 withval=$with_address_sanitizer;
9488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9489$as_echo "$withval" >&6; }
9490BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9491LDFLAGS="-fsanitize=address $LDFLAGS"
9492
9493else
9494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9495$as_echo "no" >&6; }
9496fi
9497
9498
Guido van Rossum70c7f481998-03-26 18:44:10 +00009499# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9501$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009502if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009503 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009504else
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009506LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510/* Override any GCC internal prototype to avoid an error.
9511 Use char because int might match the return type of a GCC
9512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009513#ifdef __cplusplus
9514extern "C"
9515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009516char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009517int
9518main ()
9519{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009520return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ;
9522 return 0;
9523}
9524_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009527else
Matthias Kloseb9621712010-04-24 17:59:49 +00009528 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009530rm -f core conftest.err conftest.$ac_objext \
9531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009532LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009533fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9535$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009536if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009537 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009538fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009539 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9541$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009542if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009544else
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009546LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550/* Override any GCC internal prototype to avoid an error.
9551 Use char because int might match the return type of a GCC
9552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009553#ifdef __cplusplus
9554extern "C"
9555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009556char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009557int
9558main ()
9559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 ;
9562 return 0;
9563}
9564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009565if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009567else
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570rm -f core conftest.err conftest.$ac_objext \
9571 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009572LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9575$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009576if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009577 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009578fi
9579 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009580
Matthias Kloseb9621712010-04-24 17:59:49 +00009581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9582$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009585if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9588$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009589LIBS="$withval $LIBS"
9590
9591else
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9593$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009594fi
9595
Guido van Rossum7f43da71994-08-01 12:15:30 +00009596
Victor Stinner8291b5e2015-03-20 16:03:14 +01009597
9598
9599
9600
9601
9602
9603
9604if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9605 if test -n "$ac_tool_prefix"; then
9606 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9607set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9609$as_echo_n "checking for $ac_word... " >&6; }
9610if ${ac_cv_path_PKG_CONFIG+:} false; then :
9611 $as_echo_n "(cached) " >&6
9612else
9613 case $PKG_CONFIG in
9614 [\\/]* | ?:[\\/]*)
9615 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9616 ;;
9617 *)
9618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9619for as_dir in $PATH
9620do
9621 IFS=$as_save_IFS
9622 test -z "$as_dir" && as_dir=.
9623 for ac_exec_ext in '' $ac_executable_extensions; do
9624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9625 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9627 break 2
9628 fi
9629done
9630 done
9631IFS=$as_save_IFS
9632
9633 ;;
9634esac
9635fi
9636PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9637if test -n "$PKG_CONFIG"; then
9638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9639$as_echo "$PKG_CONFIG" >&6; }
9640else
9641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9642$as_echo "no" >&6; }
9643fi
9644
9645
9646fi
9647if test -z "$ac_cv_path_PKG_CONFIG"; then
9648 ac_pt_PKG_CONFIG=$PKG_CONFIG
9649 # Extract the first word of "pkg-config", so it can be a program name with args.
9650set dummy pkg-config; ac_word=$2
9651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9652$as_echo_n "checking for $ac_word... " >&6; }
9653if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9654 $as_echo_n "(cached) " >&6
9655else
9656 case $ac_pt_PKG_CONFIG in
9657 [\\/]* | ?:[\\/]*)
9658 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9659 ;;
9660 *)
9661 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9662for as_dir in $PATH
9663do
9664 IFS=$as_save_IFS
9665 test -z "$as_dir" && as_dir=.
9666 for ac_exec_ext in '' $ac_executable_extensions; do
9667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9668 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9670 break 2
9671 fi
9672done
9673 done
9674IFS=$as_save_IFS
9675
9676 ;;
9677esac
9678fi
9679ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9680if test -n "$ac_pt_PKG_CONFIG"; then
9681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9682$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9683else
9684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9685$as_echo "no" >&6; }
9686fi
9687
9688 if test "x$ac_pt_PKG_CONFIG" = x; then
9689 PKG_CONFIG=""
9690 else
9691 case $cross_compiling:$ac_tool_warned in
9692yes:)
9693{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9694$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9695ac_tool_warned=yes ;;
9696esac
9697 PKG_CONFIG=$ac_pt_PKG_CONFIG
9698 fi
9699else
9700 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9701fi
9702
9703fi
9704if test -n "$PKG_CONFIG"; then
9705 _pkg_min_version=0.9.0
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9707$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9708 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9710$as_echo "yes" >&6; }
9711 else
9712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9713$as_echo "no" >&6; }
9714 PKG_CONFIG=""
9715 fi
9716fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009717
9718# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9720$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009721
9722# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009723if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009724 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009725else
9726 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009727fi
9728
9729
Matthias Kloseb9621712010-04-24 17:59:49 +00009730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9731$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009732
9733# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9735$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009736
9737# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009738if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009739 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009740else
9741 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009742fi
9743
9744
9745if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009746 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9747else
9748 LIBFFI_INCLUDEDIR=""
9749fi
9750
9751
Matthias Kloseb9621712010-04-24 17:59:49 +00009752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9753$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009754
Stefan Krah60187b52012-03-23 19:06:27 +01009755# Check for use of the system libmpdec library
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9757$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9758
9759# Check whether --with-system_libmpdec was given.
9760if test "${with_system_libmpdec+set}" = set; then :
9761 withval=$with_system_libmpdec;
9762else
9763 with_system_libmpdec="no"
9764fi
9765
9766
9767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9768$as_echo "$with_system_libmpdec" >&6; }
9769
Benjamin Peterson076ed002010-10-31 17:11:02 +00009770# Check for support for loadable sqlite extensions
9771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9772$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9773# Check whether --enable-loadable-sqlite-extensions was given.
9774if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9775 enableval=$enable_loadable_sqlite_extensions;
9776else
9777 enable_loadable_sqlite_extensions="no"
9778fi
9779
9780
9781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9782$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9783
Ned Deilyd819b932013-09-06 01:07:05 -07009784# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9785
9786
9787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9788$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9789
9790# Check whether --with-tcltk-includes was given.
9791if test "${with_tcltk_includes+set}" = set; then :
9792 withval=$with_tcltk_includes;
9793else
9794 with_tcltk_includes="default"
9795fi
9796
9797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9798$as_echo "$with_tcltk_includes" >&6; }
9799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9800$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9801
9802# Check whether --with-tcltk-libs was given.
9803if test "${with_tcltk_libs+set}" = set; then :
9804 withval=$with_tcltk_libs;
9805else
9806 with_tcltk_libs="default"
9807fi
9808
9809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9810$as_echo "$with_tcltk_libs" >&6; }
9811if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9812then
9813 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9814 then
9815 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9816 fi
9817 TCLTK_INCLUDES=""
9818 TCLTK_LIBS=""
9819else
9820 TCLTK_INCLUDES="$with_tcltk_includes"
9821 TCLTK_LIBS="$with_tcltk_libs"
9822fi
9823
Matthias Klose55708cc2009-04-30 08:06:49 +00009824# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9826$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009827
9828# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009829if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009830 withval=$with_dbmliborder;
9831if test x$with_dbmliborder = xyes
9832then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009833as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009834else
9835 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9836 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9837 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009838 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009839 fi
9840 done
9841fi
9842fi
9843
Matthias Kloseb9621712010-04-24 17:59:49 +00009844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9845$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009846
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009847# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009848
9849
Matthias Kloseb9621712010-04-24 17:59:49 +00009850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9851$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009853# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009854if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855 withval=$with_signal_module;
9856fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009857
9858
9859if test -z "$with_signal_module"
9860then with_signal_module="yes"
9861fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9863$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009864
9865if test "${with_signal_module}" = "yes"; then
9866 USE_SIGNAL_MODULE=""
9867 SIGNAL_OBJS=""
9868else
9869 USE_SIGNAL_MODULE="#"
9870 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9871fi
9872
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009873# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009874
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009875USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009876
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009877
Martin v. Löwis11437992002-04-12 09:54:03 +00009878
9879# Templates for things AC_DEFINEd more than once.
9880# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009881
9882
Martin v. Löwis11437992002-04-12 09:54:03 +00009883
Matthias Kloseb9621712010-04-24 17:59:49 +00009884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9885$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009886
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009887# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009888if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009889 withval=$with_threads;
9890fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009891
9892
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009893# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009896if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897 withval=$with_thread; with_threads=$with_thread
9898fi
9899
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009900
9901if test -z "$with_threads"
9902then with_threads="yes"
9903fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9905$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009906
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009907
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009908if test "$with_threads" = "no"
9909then
9910 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009911elif test "$ac_cv_pthread_is_default" = yes
9912then
Matthias Kloseb9621712010-04-24 17:59:49 +00009913 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009914
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009915 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009917
9918 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009919 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009920elif test "$ac_cv_kpthread" = "yes"
9921then
9922 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009923 if test "$ac_cv_cxx_thread" = "yes"; then
9924 CXX="$CXX -Kpthread"
9925 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009926 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009927
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009928 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009929 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009930elif test "$ac_cv_kthread" = "yes"
9931then
9932 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009933 if test "$ac_cv_cxx_thread" = "yes"; then
9934 CXX="$CXX -Kthread"
9935 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009936 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009937
9938 posix_threads=yes
9939 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009940elif test "$ac_cv_pthread" = "yes"
9941then
9942 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009943 if test "$ac_cv_cxx_thread" = "yes"; then
9944 CXX="$CXX -pthread"
9945 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009947
9948 posix_threads=yes
9949 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009950else
9951 if test ! -z "$with_threads" -a -d "$with_threads"
9952 then LDFLAGS="$LDFLAGS -L$with_threads"
9953 fi
9954 if test ! -z "$withval" -a -d "$withval"
9955 then LDFLAGS="$LDFLAGS -L$withval"
9956 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009957
9958 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009959 # define _POSIX_THREADS in unistd.h. Some apparently don't
9960 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9962$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009964/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009965
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009966#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009967#ifdef _POSIX_THREADS
9968yes
9969#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009970
9971_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009972if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009973 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009974 unistd_defines_pthreads=yes
9975else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009976 unistd_defines_pthreads=no
9977fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009978rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009979
Matthias Kloseb9621712010-04-24 17:59:49 +00009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9981$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009982
Matthias Kloseb9621712010-04-24 17:59:49 +00009983 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009984
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009985 # Just looking for pthread_create in libpthread is not enough:
9986 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9987 # So we really have to include pthread.h, and then link.
9988 _libs=$LIBS
9989 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9991$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009993/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009994
9995#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009996#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009997
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009998void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009999int
10000main ()
10001{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010002
10003pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 ;
10005 return 0;
10006}
10007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010008if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010009
Matthias Kloseb9621712010-04-24 17:59:49 +000010010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10011$as_echo "yes" >&6; }
10012 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010013
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010014 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010015 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010016else
Martin v. Löwis11437992002-04-12 09:54:03 +000010017
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010018 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010019 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010020if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010021 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010022
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010023 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010024 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010025else
Guido van Rossumad678af1998-10-02 14:42:15 +000010026
Matthias Kloseb9621712010-04-24 17:59:49 +000010027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10028$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010029if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010030 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010031else
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010033LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010037/* Override any GCC internal prototype to avoid an error.
10038 Use char because int might match the return type of a GCC
10039 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010040#ifdef __cplusplus
10041extern "C"
10042#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010043char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010044int
10045main ()
10046{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010047return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 ;
10049 return 0;
10050}
10051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010052if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010053 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010054else
Matthias Kloseb9621712010-04-24 17:59:49 +000010055 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010056fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010057rm -f core conftest.err conftest.$ac_objext \
10058 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010059LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010060fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10062$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010063if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010064 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010065
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010066 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010067 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010068 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010069else
Greg Steinadf63d62000-07-05 10:38:09 +000010070
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10072$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010073if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010074 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010075else
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010077LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010078cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081/* Override any GCC internal prototype to avoid an error.
10082 Use char because int might match the return type of a GCC
10083 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010084#ifdef __cplusplus
10085extern "C"
10086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010087char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010088int
10089main ()
10090{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010091return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010092 ;
10093 return 0;
10094}
10095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010096if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010097 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010098else
Matthias Kloseb9621712010-04-24 17:59:49 +000010099 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010100fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010101rm -f core conftest.err conftest.$ac_objext \
10102 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010103LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010104fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10106$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010107if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010109
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010110 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010111 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010112 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010113else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010114
Matthias Kloseb9621712010-04-24 17:59:49 +000010115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10116$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010117if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010118 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010119else
Martin v. Löwis11437992002-04-12 09:54:03 +000010120 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010121LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010122cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125/* Override any GCC internal prototype to avoid an error.
10126 Use char because int might match the return type of a GCC
10127 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010128#ifdef __cplusplus
10129extern "C"
10130#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010131char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010132int
10133main ()
10134{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010135return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010136 ;
10137 return 0;
10138}
10139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010140if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010142else
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010145rm -f core conftest.err conftest.$ac_objext \
10146 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010147LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010148fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10150$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010151if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010152 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010153
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010154 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010155 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010156 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010157else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010158
Matthias Kloseb9621712010-04-24 17:59:49 +000010159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10160$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010161if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010162 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010163else
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010165LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010168
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010169/* Override any GCC internal prototype to avoid an error.
10170 Use char because int might match the return type of a GCC
10171 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010172#ifdef __cplusplus
10173extern "C"
10174#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010175char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010176int
10177main ()
10178{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010179return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010180 ;
10181 return 0;
10182}
10183_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010184if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010185 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010186else
Matthias Kloseb9621712010-04-24 17:59:49 +000010187 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010188fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010189rm -f core conftest.err conftest.$ac_objext \
10190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010191LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010192fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10194$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010195if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010196 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010197
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010198 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010199 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010200 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010201else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010202
Martin v. Löwis130fb172001-07-19 11:00:41 +000010203 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010204fi
10205
Guido van Rossum627b2d71993-12-24 10:39:16 +000010206
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010207fi
10208
Guido van Rossum0be3e491997-05-22 20:33:33 +000010209fi
10210
Guido van Rossum49545951997-12-02 19:28:29 +000010211fi
10212
Guido van Rossumb93a8621998-05-07 13:27:32 +000010213fi
10214
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010215fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010216rm -f core conftest.err conftest.$ac_objext \
10217 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010218
Matthias Kloseb9621712010-04-24 17:59:49 +000010219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10220$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010221if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010223else
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010225LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010227/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010229/* Override any GCC internal prototype to avoid an error.
10230 Use char because int might match the return type of a GCC
10231 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010232#ifdef __cplusplus
10233extern "C"
10234#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010235char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010236int
10237main ()
10238{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 ;
10241 return 0;
10242}
10243_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010244if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010245 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010246else
Matthias Kloseb9621712010-04-24 17:59:49 +000010247 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010248fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010249rm -f core conftest.err conftest.$ac_objext \
10250 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010251LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010252fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10254$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010255if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010256 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010257
Martin v. Löwis130fb172001-07-19 11:00:41 +000010258 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010259 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010260 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010261fi
10262
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010263
Neal Norwitza978ab02002-11-02 16:58:05 +000010264 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010265 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10266$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010267if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010268 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010269else
Martin v. Löwis11437992002-04-12 09:54:03 +000010270 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010271LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010275/* Override any GCC internal prototype to avoid an error.
10276 Use char because int might match the return type of a GCC
10277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010278#ifdef __cplusplus
10279extern "C"
10280#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010281char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010282int
10283main ()
10284{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010285return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 ;
10287 return 0;
10288}
10289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010290if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010292else
Matthias Kloseb9621712010-04-24 17:59:49 +000010293 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010294fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010295rm -f core conftest.err conftest.$ac_objext \
10296 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010297LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010298fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10300$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010301if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010302 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010303
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010304 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010305 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010306 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010307fi
10308
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010309 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010310fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010311
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010312if test "$posix_threads" = "yes"; then
10313 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010314
Matthias Kloseb9621712010-04-24 17:59:49 +000010315$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010316
10317 fi
10318
10319 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10320 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010321 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010322$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010323
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010324 ;;
10325 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010326$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010327
10328 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010329 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010330$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010331
10332 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010333 esac
10334
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10336$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010337 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010338 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010339else
Matthias Kloseb9621712010-04-24 17:59:49 +000010340 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010341 ac_cv_pthread_system_supported=no
10342else
Matthias Kloseb9621712010-04-24 17:59:49 +000010343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010344/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010345
10346 #include <stdio.h>
10347 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010348 void *foo(void *parm) {
10349 return NULL;
10350 }
10351 main() {
10352 pthread_attr_t attr;
10353 pthread_t id;
10354 if (pthread_attr_init(&attr)) exit(-1);
10355 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10356 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10357 exit(0);
10358 }
10359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010360if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010361 ac_cv_pthread_system_supported=yes
10362else
Matthias Kloseb9621712010-04-24 17:59:49 +000010363 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010364fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010365rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10366 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010367fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010369
Guido van Rossum627b2d71993-12-24 10:39:16 +000010370fi
10371
Matthias Kloseb9621712010-04-24 17:59:49 +000010372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10373$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010374 if test "$ac_cv_pthread_system_supported" = "yes"; then
10375
Matthias Kloseb9621712010-04-24 17:59:49 +000010376$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010377
10378 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 for ac_func in pthread_sigmask
10380do :
10381 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010382if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010383 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010384#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010385_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010386 case $ac_sys_system in
10387 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010388
Matthias Kloseb9621712010-04-24 17:59:49 +000010389$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010390
10391 ;;
10392 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010393fi
10394done
10395
Christian Heimesf77b4b22013-08-21 13:26:05 +020010396 for ac_func in pthread_atfork
10397do :
10398 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10399if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10400 cat >>confdefs.h <<_ACEOF
10401#define HAVE_PTHREAD_ATFORK 1
10402_ACEOF
10403
10404fi
10405done
10406
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010407fi
10408
10409
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010410# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010411
Matthias Kloseb9621712010-04-24 17:59:49 +000010412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10413$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010414# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010415if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010416 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010417 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10419$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010420 ipv6=no
10421 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010422 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10423$as_echo "yes" >&6; }
10424 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010425
10426 ipv6=yes
10427 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010428 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010429else
Martin v. Löwis11437992002-04-12 09:54:03 +000010430
Matthias Kloseb9621712010-04-24 17:59:49 +000010431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010432/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010433 /* AF_INET6 available check */
10434#include <sys/types.h>
10435#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010436int
10437main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010438{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010439int domain = AF_INET6;
10440 ;
10441 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010442}
Martin v. Löwis11437992002-04-12 09:54:03 +000010443_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010444if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10447$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010448 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010449
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010450else
Matthias Kloseb159a552010-04-25 21:00:44 +000010451
Matthias Kloseb9621712010-04-24 17:59:49 +000010452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10453$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010454 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010455
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010456fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010459if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10461$as_echo_n "checking if RFC2553 API is available... " >&6; }
10462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010463/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010464
10465 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010466#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010467int
10468main ()
10469{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010470struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010471 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010472 ;
10473 return 0;
10474}
Matthias Kloseb159a552010-04-25 21:00:44 +000010475
Martin v. Löwis11437992002-04-12 09:54:03 +000010476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010477if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010478
10479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010480$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010481 ipv6=yes
10482
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010483else
Matthias Kloseb159a552010-04-25 21:00:44 +000010484
10485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010486$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010487 ipv6=no
10488
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010491fi
10492
10493if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010494 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010495
10496fi
10497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498fi
10499
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010500
10501ipv6type=unknown
10502ipv6lib=none
10503ipv6trylibc=no
10504
10505if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10507$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010508 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10509 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010510 case $i in
10511 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010513/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010514
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010515#include <netinet/in.h>
10516#ifdef IPV6_INRIA_VERSION
10517yes
10518#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010519_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010522 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010523fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010524rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010525
10526 ;;
10527 kame)
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 __KAME__
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öwisa2ac6022001-08-09 11:40:14 +000010538 ipv6type=$i;
10539 ipv6lib=inet6
10540 ipv6libdir=/usr/local/v6/lib
10541 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010542fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010543rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010544
10545 ;;
10546 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010548/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010549
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010550#include <features.h>
10551#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10552yes
10553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010554_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010556 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010557 ipv6type=$i;
10558 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010559fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010560rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010561
10562 ;;
10563 linux-inet6)
10564 if test -d /usr/inet6; then
10565 ipv6type=$i
10566 ipv6lib=inet6
10567 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010568 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010569 fi
10570 ;;
10571 solaris)
10572 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010573 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010574 ipv6type=$i
10575 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010576 fi
10577 fi
10578 ;;
10579 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010581/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010582
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010583#include <sys/param.h>
10584#ifdef _TOSHIBA_INET6
10585yes
10586#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010587_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010589 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010590 ipv6type=$i;
10591 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010592 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010593fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010594rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010595
10596 ;;
10597 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010599/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010600
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010601#include </usr/local/v6/include/sys/v6config.h>
10602#ifdef __V6D__
10603yes
10604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010605_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010608 ipv6type=$i;
10609 ipv6lib=v6;
10610 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010611 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010612fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010613rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010614
10615 ;;
10616 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010618/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010619
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010620#include <sys/param.h>
10621#ifdef _ZETA_MINAMI_INET6
10622yes
10623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010624_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010625if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010626 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010627 ipv6type=$i;
10628 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010629 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010630fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010631rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010632
10633 ;;
10634 esac
10635 if test "$ipv6type" != "unknown"; then
10636 break
10637 fi
10638 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10640$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010641fi
10642
10643if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10644 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10645 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10646 echo "using lib$ipv6lib"
10647 else
10648 if test $ipv6trylibc = "yes"; then
10649 echo "using libc"
10650 else
10651 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10652 echo "You need to fetch lib$ipv6lib.a from appropriate"
10653 echo 'ipv6 kit and compile beforehand.'
10654 exit 1
10655 fi
10656 fi
10657fi
10658
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10660$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10662/* end confdefs.h. */
10663 /* CAN_RAW_FD_FRAMES available check */
10664#include <linux/can/raw.h>
10665int
10666main ()
10667{
10668int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10669 ;
10670 return 0;
10671}
10672_ACEOF
10673if ac_fn_c_try_compile "$LINENO"; then :
10674
10675
10676$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10677
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10679$as_echo "yes" >&6; }
10680
10681else
10682
10683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684$as_echo "no" >&6; }
10685
10686fi
10687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10688
Matthias Kloseb9621712010-04-24 17:59:49 +000010689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10690$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10691cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010692/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010693
10694 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010695int
10696main ()
10697{
10698FSIORefNum fRef = 0
10699 ;
10700 return 0;
10701}
Matthias Kloseb159a552010-04-25 21:00:44 +000010702
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010704if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010705
Matthias Kloseb159a552010-04-25 21:00:44 +000010706
Matthias Kloseb9621712010-04-24 17:59:49 +000010707$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010708
Matthias Kloseb9621712010-04-24 17:59:49 +000010709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10710$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010711
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010712else
Matthias Kloseb159a552010-04-25 21:00:44 +000010713
Matthias Kloseb9621712010-04-24 17:59:49 +000010714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10715$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010716
10717fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10719
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010720# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10722$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010725if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726 withval=$with_doc_strings;
10727fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010728
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010729
10730if test -z "$with_doc_strings"
10731then with_doc_strings="yes"
10732fi
10733if test "$with_doc_strings" != "no"
10734then
10735
Matthias Kloseb9621712010-04-24 17:59:49 +000010736$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010737
10738fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10740$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010741
Antoine Pitrou042b1282010-08-13 21:15:58 +000010742# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10744$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010746# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010747if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010749if test "$withval" != no
10750then
10751
Matthias Kloseb9621712010-04-24 17:59:49 +000010752$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010753
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10755$as_echo "yes" >&6; }
10756else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10757$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010758fi
10759else
Matthias Kloseb9621712010-04-24 17:59:49 +000010760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10761$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762fi
10763
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010764
10765# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10767$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010770if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010771 withval=$with_pymalloc;
10772fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010773
Neil Schemenauera35c6882001-02-27 04:45:05 +000010774
Neil Schemenauer16c22972002-03-22 15:34:49 +000010775if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010776then
10777 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010778fi
10779if test "$with_pymalloc" != "no"
10780then
Martin v. Löwis11437992002-04-12 09:54:03 +000010781
Matthias Kloseb9621712010-04-24 17:59:49 +000010782$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010783
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010784 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010785fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10787$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010788
Benjamin Peterson05159c42009-12-03 03:01:27 +000010789# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10791$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010792
10793# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010794if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010795 withval=$with_valgrind;
10796else
10797 with_valgrind=no
10798fi
10799
Matthias Kloseb9621712010-04-24 17:59:49 +000010800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10801$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010802if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 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 +020010804if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010805
Matthias Kloseb9621712010-04-24 17:59:49 +000010806$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010807
10808else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010809 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010810
10811fi
10812
10813
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010814 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010815fi
10816
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010817# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010818
Guido van Rossum98935bf2001-09-05 19:13:16 +000010819DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010820
Guido van Rossume97ee181999-12-20 21:27:22 +000010821# the dlopen() function means we might want to use dynload_shlib.o. some
10822# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010823for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010824do :
10825 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010826if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010827 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010828#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010829_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010830
Guido van Rossume97ee181999-12-20 21:27:22 +000010831fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010832done
Guido van Rossume97ee181999-12-20 21:27:22 +000010833
Michael W. Hudson54241132001-12-07 15:38:26 +000010834
Guido van Rossume97ee181999-12-20 21:27:22 +000010835# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10836# loading of modules.
10837
Matthias Kloseb9621712010-04-24 17:59:49 +000010838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10839$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010840if test -z "$DYNLOADFILE"
10841then
10842 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010843 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10844 if test "$ac_cv_func_dlopen" = yes
10845 then DYNLOADFILE="dynload_shlib.o"
10846 else DYNLOADFILE="dynload_aix.o"
10847 fi
10848 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010849 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010850 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10851 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010852 *)
10853 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10854 # out any dynamic loading
10855 if test "$ac_cv_func_dlopen" = yes
10856 then DYNLOADFILE="dynload_shlib.o"
10857 else DYNLOADFILE="dynload_stub.o"
10858 fi
10859 ;;
10860 esac
10861fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10863$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010864if test "$DYNLOADFILE" != "dynload_stub.o"
10865then
Martin v. Löwis11437992002-04-12 09:54:03 +000010866
Matthias Kloseb9621712010-04-24 17:59:49 +000010867$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010868
10869fi
10870
Neil Schemenauer4e425612001-06-19 15:44:15 +000010871# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10872
Michael W. Hudson54241132001-12-07 15:38:26 +000010873
Matthias Kloseb9621712010-04-24 17:59:49 +000010874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10875$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010876if test -z "$MACHDEP_OBJS"
10877then
Jack Jansene578a632001-08-15 01:27:14 +000010878 MACHDEP_OBJS=$extra_machdep_objs
10879else
10880 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010881fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010882if test -z "$MACHDEP_OBJS"; then
10883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10884$as_echo "none" >&6; }
10885else
10886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10887$as_echo "$MACHDEP_OBJS" >&6; }
10888fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010889
Guido van Rossum627b2d71993-12-24 10:39:16 +000010890# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010891for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010892 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010893 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010010894 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010895 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010896 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010897 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010898 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10899 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010900 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010901 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010902 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010903 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010904 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010905 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010906 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10907 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010908 sigaction sigaltstack siginterrupt sigpending sigrelse \
10909 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010910 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010911 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010912 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010913do :
10914 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10915ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010916if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010918#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010919_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010920
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010921fi
10922done
10923
Michael W. Hudson54241132001-12-07 15:38:26 +000010924
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010925ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10926 #include <dirent.h>
10927"
10928if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10929
10930$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10931
10932fi
10933
10934
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010935# For some functions, having a definition is not sufficient, since
10936# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10938$as_echo_n "checking for chroot... " >&6; }
10939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010941#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010942int
10943main ()
10944{
10945void *x=chroot
10946 ;
10947 return 0;
10948}
10949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010950if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010951
Matthias Kloseb9621712010-04-24 17:59:49 +000010952$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010953
Matthias Kloseb159a552010-04-25 21:00:44 +000010954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010955$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010956else
Matthias Kloseb9621712010-04-24 17:59:49 +000010957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10958$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010959
10960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10963$as_echo_n "checking for link... " >&6; }
10964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010965/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010966#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010967int
10968main ()
10969{
10970void *x=link
10971 ;
10972 return 0;
10973}
10974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010975if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010976
Matthias Kloseb9621712010-04-24 17:59:49 +000010977$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010978
Matthias Kloseb159a552010-04-25 21:00:44 +000010979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010980$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010981else
Matthias Kloseb9621712010-04-24 17:59:49 +000010982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10983$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010984
10985fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10988$as_echo_n "checking for symlink... " >&6; }
10989cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010990/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010991#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010992int
10993main ()
10994{
10995void *x=symlink
10996 ;
10997 return 0;
10998}
10999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011000if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011001
Matthias Kloseb9621712010-04-24 17:59:49 +000011002$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011003
Matthias Kloseb159a552010-04-25 21:00:44 +000011004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011005$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011006else
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11008$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011009
11010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11013$as_echo_n "checking for fchdir... " >&6; }
11014cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011015/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011016#include <unistd.h>
11017int
11018main ()
11019{
11020void *x=fchdir
11021 ;
11022 return 0;
11023}
11024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011025if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011026
Matthias Kloseb9621712010-04-24 17:59:49 +000011027$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011028
Matthias Kloseb159a552010-04-25 21:00:44 +000011029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011030$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011031else
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11033$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011034
11035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11038$as_echo_n "checking for fsync... " >&6; }
11039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011040/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011041#include <unistd.h>
11042int
11043main ()
11044{
11045void *x=fsync
11046 ;
11047 return 0;
11048}
11049_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011050if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011051
Matthias Kloseb9621712010-04-24 17:59:49 +000011052$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011053
Matthias Kloseb159a552010-04-25 21:00:44 +000011054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011055$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011056else
Matthias Kloseb9621712010-04-24 17:59:49 +000011057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11058$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011059
11060fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11063$as_echo_n "checking for fdatasync... " >&6; }
11064cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011065/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011066#include <unistd.h>
11067int
11068main ()
11069{
11070void *x=fdatasync
11071 ;
11072 return 0;
11073}
11074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011075if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011076
Matthias Kloseb9621712010-04-24 17:59:49 +000011077$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011078
Matthias Kloseb159a552010-04-25 21:00:44 +000011079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011080$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011081else
Matthias Kloseb9621712010-04-24 17:59:49 +000011082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011084
11085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11088$as_echo_n "checking for epoll... " >&6; }
11089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011090/* end confdefs.h. */
11091#include <sys/epoll.h>
11092int
11093main ()
11094{
11095void *x=epoll_create
11096 ;
11097 return 0;
11098}
11099_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011100if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011101
Matthias Kloseb9621712010-04-24 17:59:49 +000011102$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011103
Matthias Kloseb159a552010-04-25 21:00:44 +000011104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011105$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011106else
Matthias Kloseb9621712010-04-24 17:59:49 +000011107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11108$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011109
11110fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11113$as_echo_n "checking for epoll_create1... " >&6; }
11114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11115/* end confdefs.h. */
11116#include <sys/epoll.h>
11117int
11118main ()
11119{
11120void *x=epoll_create1
11121 ;
11122 return 0;
11123}
11124_ACEOF
11125if ac_fn_c_try_compile "$LINENO"; then :
11126
11127$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11128
11129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11130$as_echo "yes" >&6; }
11131else
11132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11133$as_echo "no" >&6; }
11134
11135fi
11136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11138$as_echo_n "checking for kqueue... " >&6; }
11139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011140/* end confdefs.h. */
11141
11142#include <sys/types.h>
11143#include <sys/event.h>
11144
11145int
11146main ()
11147{
11148int x=kqueue()
11149 ;
11150 return 0;
11151}
11152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011153if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011154
Matthias Kloseb9621712010-04-24 17:59:49 +000011155$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011156
Matthias Kloseb159a552010-04-25 21:00:44 +000011157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011158$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011159else
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11161$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011162
11163fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11166$as_echo_n "checking for prlimit... " >&6; }
11167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11168/* end confdefs.h. */
11169
11170#include <sys/time.h>
11171#include <sys/resource.h>
11172
11173int
11174main ()
11175{
11176void *x=prlimit
11177 ;
11178 return 0;
11179}
11180_ACEOF
11181if ac_fn_c_try_compile "$LINENO"; then :
11182
11183$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11184
11185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11186$as_echo "yes" >&6; }
11187else
11188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11189$as_echo "no" >&6; }
11190
11191fi
11192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11193
Martin v. Löwisd5843682002-11-21 20:41:28 +000011194# On some systems (eg. FreeBSD 5), we would find a definition of the
11195# functions ctermid_r, setgroups in the library, but no prototype
11196# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11197# address to avoid compiler warnings and potential miscompilations
11198# because of the missing prototypes.
11199
Matthias Kloseb9621712010-04-24 17:59:49 +000011200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11201$as_echo_n "checking for ctermid_r... " >&6; }
11202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011203/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011204
Martin v. Löwisd5843682002-11-21 20:41:28 +000011205#include <stdio.h>
11206
Martin v. Löwisd5843682002-11-21 20:41:28 +000011207int
11208main ()
11209{
11210void* p = ctermid_r
11211 ;
11212 return 0;
11213}
11214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011215if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011216
Matthias Kloseb9621712010-04-24 17:59:49 +000011217$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011218
Matthias Kloseb159a552010-04-25 21:00:44 +000011219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011220$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011221else
Matthias Kloseb9621712010-04-24 17:59:49 +000011222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011224
11225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11227
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11229$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011230if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011231 $as_echo_n "(cached) " >&6
11232else
11233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011234/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011235#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011236int
11237main ()
11238{
11239void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011240
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011241 ;
11242 return 0;
11243}
11244_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011245if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011246 ac_cv_flock_decl=yes
11247else
11248 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011249
11250fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011252
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011253fi
11254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11255$as_echo "$ac_cv_flock_decl" >&6; }
11256if test "x${ac_cv_flock_decl}" = xyes; then
11257 for ac_func in flock
11258do :
11259 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011260if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011261 cat >>confdefs.h <<_ACEOF
11262#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011263_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011264
Antoine Pitroua3000072010-09-07 14:52:42 +000011265else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011267$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011268if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011269 $as_echo_n "(cached) " >&6
11270else
11271 ac_check_lib_save_LIBS=$LIBS
11272LIBS="-lbsd $LIBS"
11273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11274/* end confdefs.h. */
11275
11276/* Override any GCC internal prototype to avoid an error.
11277 Use char because int might match the return type of a GCC
11278 builtin and then its argument prototype would still apply. */
11279#ifdef __cplusplus
11280extern "C"
11281#endif
11282char flock ();
11283int
11284main ()
11285{
11286return flock ();
11287 ;
11288 return 0;
11289}
11290_ACEOF
11291if ac_fn_c_try_link "$LINENO"; then :
11292 ac_cv_lib_bsd_flock=yes
11293else
11294 ac_cv_lib_bsd_flock=no
11295fi
11296rm -f core conftest.err conftest.$ac_objext \
11297 conftest$ac_exeext conftest.$ac_ext
11298LIBS=$ac_check_lib_save_LIBS
11299fi
11300{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11301$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011302if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011303 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011304
11305
11306$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11307
11308
11309fi
11310
11311
11312fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011313done
11314
Antoine Pitroua3000072010-09-07 14:52:42 +000011315fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316
Matthias Kloseb9621712010-04-24 17:59:49 +000011317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11318$as_echo_n "checking for getpagesize... " >&6; }
11319cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011320/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011321
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011322#include <unistd.h>
11323
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011324int
11325main ()
11326{
11327void* p = getpagesize
11328 ;
11329 return 0;
11330}
11331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011332if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011333
Matthias Kloseb9621712010-04-24 17:59:49 +000011334$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011335
Matthias Kloseb159a552010-04-25 21:00:44 +000011336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011337$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011338else
Matthias Kloseb9621712010-04-24 17:59:49 +000011339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11340$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011341
11342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011344
Victor Stinner984890f2011-11-24 13:53:38 +010011345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11346$as_echo_n "checking for broken unsetenv... " >&6; }
11347cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11348/* end confdefs.h. */
11349
11350#include <stdlib.h>
11351
11352int
11353main ()
11354{
11355int res = unsetenv("DUMMY")
11356 ;
11357 return 0;
11358}
11359_ACEOF
11360if ac_fn_c_try_compile "$LINENO"; then :
11361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11362$as_echo "no" >&6; }
11363else
11364
11365$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11366
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11368$as_echo "yes" >&6; }
11369
11370fi
11371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11372
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011373for ac_prog in true
11374do
11375 # Extract the first word of "$ac_prog", so it can be a program name with args.
11376set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11378$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011379if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011380 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011381else
11382 if test -n "$TRUE"; then
11383 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11384else
11385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11386for as_dir in $PATH
11387do
11388 IFS=$as_save_IFS
11389 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011391 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011392 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011393 $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 +000011394 break 2
11395 fi
11396done
Matthias Kloseb9621712010-04-24 17:59:49 +000011397 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011398IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011399
11400fi
11401fi
11402TRUE=$ac_cv_prog_TRUE
11403if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11405$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011406else
Matthias Kloseb9621712010-04-24 17:59:49 +000011407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011409fi
11410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011411
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011412 test -n "$TRUE" && break
11413done
11414test -n "$TRUE" || TRUE="/bin/true"
11415
11416
Matthias Kloseb9621712010-04-24 17:59:49 +000011417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11418$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011419if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011420 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011421else
11422 ac_check_lib_save_LIBS=$LIBS
11423LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011425/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011426
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427/* Override any GCC internal prototype to avoid an error.
11428 Use char because int might match the return type of a GCC
11429 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011430#ifdef __cplusplus
11431extern "C"
11432#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011433char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011434int
11435main ()
11436{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011438 ;
11439 return 0;
11440}
11441_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011442if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011443 ac_cv_lib_c_inet_aton=yes
11444else
Matthias Kloseb9621712010-04-24 17:59:49 +000011445 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011446fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011447rm -f core conftest.err conftest.$ac_objext \
11448 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011449LIBS=$ac_check_lib_save_LIBS
11450fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011451{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11452$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011453if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011454 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011455else
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11457$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011458if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011459 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011460else
11461 ac_check_lib_save_LIBS=$LIBS
11462LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011464/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011466/* Override any GCC internal prototype to avoid an error.
11467 Use char because int might match the return type of a GCC
11468 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011469#ifdef __cplusplus
11470extern "C"
11471#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011472char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011473int
11474main ()
11475{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011476return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011477 ;
11478 return 0;
11479}
11480_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011481if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011482 ac_cv_lib_resolv_inet_aton=yes
11483else
Matthias Kloseb9621712010-04-24 17:59:49 +000011484 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011485fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011486rm -f core conftest.err conftest.$ac_objext \
11487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011488LIBS=$ac_check_lib_save_LIBS
11489fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11491$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011492if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011493 cat >>confdefs.h <<_ACEOF
11494#define HAVE_LIBRESOLV 1
11495_ACEOF
11496
11497 LIBS="-lresolv $LIBS"
11498
11499fi
11500
11501
11502fi
11503
11504
Christian Heimesd0764e22007-12-04 15:00:33 +000011505# On Tru64, chflags seems to be present, but calling it will
11506# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11508$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011509if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011510 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011511else
Matthias Kloseb9621712010-04-24 17:59:49 +000011512 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011513 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011514else
Matthias Kloseb9621712010-04-24 17:59:49 +000011515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011516/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011517
Christian Heimesd0764e22007-12-04 15:00:33 +000011518#include <sys/stat.h>
11519#include <unistd.h>
11520int main(int argc, char*argv[])
11521{
11522 if(chflags(argv[0], 0) != 0)
11523 return 1;
11524 return 0;
11525}
Ned Deily3eb67d52011-06-28 00:00:28 -070011526
Christian Heimesd0764e22007-12-04 15:00:33 +000011527_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011528if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011529 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011530else
Matthias Kloseb9621712010-04-24 17:59:49 +000011531 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011532fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11534 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011535fi
11536
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011537
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011538fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11540$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011541if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011542 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011543if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011544 ac_cv_have_chflags="yes"
11545else
11546 ac_cv_have_chflags="no"
11547fi
11548
11549fi
11550if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011551
Matthias Kloseb9621712010-04-24 17:59:49 +000011552$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011553
11554fi
11555
Matthias Kloseb9621712010-04-24 17:59:49 +000011556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11557$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011558if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011559 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011560else
Matthias Kloseb9621712010-04-24 17:59:49 +000011561 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011562 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011563else
Matthias Kloseb9621712010-04-24 17:59:49 +000011564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011565/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011566
Christian Heimesd0764e22007-12-04 15:00:33 +000011567#include <sys/stat.h>
11568#include <unistd.h>
11569int main(int argc, char*argv[])
11570{
11571 if(lchflags(argv[0], 0) != 0)
11572 return 1;
11573 return 0;
11574}
Ned Deily3eb67d52011-06-28 00:00:28 -070011575
Christian Heimesd0764e22007-12-04 15:00:33 +000011576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011577if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011578 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011579else
Matthias Kloseb9621712010-04-24 17:59:49 +000011580 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011581fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011582rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11583 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011584fi
11585
11586
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011587fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11589$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011590if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011591 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011592if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011593 ac_cv_have_lchflags="yes"
11594else
11595 ac_cv_have_lchflags="no"
11596fi
11597
11598fi
11599if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011602
11603fi
11604
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011605case $ac_sys_system/$ac_sys_release in
11606Darwin/*)
11607 _CUR_CFLAGS="${CFLAGS}"
11608 _CUR_LDFLAGS="${LDFLAGS}"
11609 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11610 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11611 ;;
11612esac
11613
Matthias Kloseb9621712010-04-24 17:59:49 +000011614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11615$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011616if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011617 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011618else
11619 ac_check_lib_save_LIBS=$LIBS
11620LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011622/* end confdefs.h. */
11623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624/* Override any GCC internal prototype to avoid an error.
11625 Use char because int might match the return type of a GCC
11626 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011627#ifdef __cplusplus
11628extern "C"
11629#endif
11630char inflateCopy ();
11631int
11632main ()
11633{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011634return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011635 ;
11636 return 0;
11637}
11638_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011639if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011640 ac_cv_lib_z_inflateCopy=yes
11641else
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011643fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011644rm -f core conftest.err conftest.$ac_objext \
11645 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011646LIBS=$ac_check_lib_save_LIBS
11647fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11649$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011650if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011651
Matthias Kloseb9621712010-04-24 17:59:49 +000011652$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011653
11654fi
11655
11656
11657case $ac_sys_system/$ac_sys_release in
11658Darwin/*)
11659 CFLAGS="${_CUR_CFLAGS}"
11660 LDFLAGS="${_CUR_LDFLAGS}"
11661 ;;
11662esac
11663
Matthias Kloseb9621712010-04-24 17:59:49 +000011664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11665$as_echo_n "checking for hstrerror... " >&6; }
11666cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011667/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011668
Martin v. Löwise9416172003-05-03 10:12:45 +000011669#include <netdb.h>
11670
Martin v. Löwise9416172003-05-03 10:12:45 +000011671int
11672main ()
11673{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011674void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011675 ;
11676 return 0;
11677}
11678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011680
Matthias Kloseb9621712010-04-24 17:59:49 +000011681$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011682
Matthias Kloseb159a552010-04-25 21:00:44 +000011683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011684$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011685else
Matthias Kloseb9621712010-04-24 17:59:49 +000011686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11687$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011688
11689fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011690rm -f core conftest.err conftest.$ac_objext \
11691 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011692
Matthias Kloseb9621712010-04-24 17:59:49 +000011693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11694$as_echo_n "checking for inet_aton... " >&6; }
11695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011696/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011697
Martin v. Löwis86d66262006-02-17 08:40:11 +000011698#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011699#include <sys/socket.h>
11700#include <netinet/in.h>
11701#include <arpa/inet.h>
11702
Martin v. Löwise9416172003-05-03 10:12:45 +000011703int
11704main ()
11705{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011706void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011707 ;
11708 return 0;
11709}
11710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011712
Matthias Kloseb9621712010-04-24 17:59:49 +000011713$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011714
Matthias Kloseb159a552010-04-25 21:00:44 +000011715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011716$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011717else
Matthias Kloseb9621712010-04-24 17:59:49 +000011718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11719$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011720
11721fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011722rm -f core conftest.err conftest.$ac_objext \
11723 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011724
Matthias Kloseb9621712010-04-24 17:59:49 +000011725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11726$as_echo_n "checking for inet_pton... " >&6; }
11727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011728/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011729
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011730#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011731#include <sys/socket.h>
11732#include <netinet/in.h>
11733#include <arpa/inet.h>
11734
Martin v. Löwise9416172003-05-03 10:12:45 +000011735int
11736main ()
11737{
11738void* p = inet_pton
11739 ;
11740 return 0;
11741}
11742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011743if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011744
Matthias Kloseb9621712010-04-24 17:59:49 +000011745$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011746
Matthias Kloseb159a552010-04-25 21:00:44 +000011747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011748$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011749else
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011752
11753fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011755
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011756# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11758$as_echo_n "checking for setgroups... " >&6; }
11759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011760/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011761
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011762#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011763#ifdef HAVE_GRP_H
11764#include <grp.h>
11765#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011766
Martin v. Löwisd5843682002-11-21 20:41:28 +000011767int
11768main ()
11769{
11770void* p = setgroups
11771 ;
11772 return 0;
11773}
11774_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011775if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011776
Matthias Kloseb9621712010-04-24 17:59:49 +000011777$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011778
Matthias Kloseb159a552010-04-25 21:00:44 +000011779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011780$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011781else
Matthias Kloseb9621712010-04-24 17:59:49 +000011782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11783$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011784
11785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011787
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011788# check for openpty and forkpty
11789
11790for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011791do :
11792 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011793if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011794 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011795#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011796_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011797
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011798else
Matthias Kloseb9621712010-04-24 17:59:49 +000011799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11800$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011801if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011803else
Martin v. Löwis11437992002-04-12 09:54:03 +000011804 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011805LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011806cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011809/* Override any GCC internal prototype to avoid an error.
11810 Use char because int might match the return type of a GCC
11811 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011812#ifdef __cplusplus
11813extern "C"
11814#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011815char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011816int
11817main ()
11818{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011819return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011820 ;
11821 return 0;
11822}
11823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011824if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011825 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011826else
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011829rm -f core conftest.err conftest.$ac_objext \
11830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011831LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11834$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011835if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011837 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011838else
Matthias Kloseb9621712010-04-24 17:59:49 +000011839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11840$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011841if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011842 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011843else
11844 ac_check_lib_save_LIBS=$LIBS
11845LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011847/* end confdefs.h. */
11848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011849/* Override any GCC internal prototype to avoid an error.
11850 Use char because int might match the return type of a GCC
11851 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011852#ifdef __cplusplus
11853extern "C"
11854#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011855char openpty ();
11856int
11857main ()
11858{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011859return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011860 ;
11861 return 0;
11862}
11863_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011864if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011865 ac_cv_lib_bsd_openpty=yes
11866else
Matthias Kloseb9621712010-04-24 17:59:49 +000011867 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011868fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011869rm -f core conftest.err conftest.$ac_objext \
11870 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011871LIBS=$ac_check_lib_save_LIBS
11872fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11874$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011875if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011876 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011877 LIBS="$LIBS -lbsd"
11878fi
11879
11880
11881fi
11882
Fred Drake8cef4cf2000-06-28 16:40:38 +000011883
11884fi
11885done
11886
11887for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011888do :
11889 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011890if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011892#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011893_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011894
Fred Drake8cef4cf2000-06-28 16:40:38 +000011895else
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11897$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011898if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011900else
Martin v. Löwis11437992002-04-12 09:54:03 +000011901 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011902LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011904/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011906/* Override any GCC internal prototype to avoid an error.
11907 Use char because int might match the return type of a GCC
11908 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011909#ifdef __cplusplus
11910extern "C"
11911#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011912char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011913int
11914main ()
11915{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011916return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011917 ;
11918 return 0;
11919}
11920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011921if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011922 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011923else
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011925fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011926rm -f core conftest.err conftest.$ac_objext \
11927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011928LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011929fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11931$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011932if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011933 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011934 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011935else
Matthias Kloseb9621712010-04-24 17:59:49 +000011936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11937$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011938if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011939 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011940else
11941 ac_check_lib_save_LIBS=$LIBS
11942LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011944/* end confdefs.h. */
11945
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011946/* Override any GCC internal prototype to avoid an error.
11947 Use char because int might match the return type of a GCC
11948 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011949#ifdef __cplusplus
11950extern "C"
11951#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011952char forkpty ();
11953int
11954main ()
11955{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011956return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011957 ;
11958 return 0;
11959}
11960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011961if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011962 ac_cv_lib_bsd_forkpty=yes
11963else
Matthias Kloseb9621712010-04-24 17:59:49 +000011964 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011966rm -f core conftest.err conftest.$ac_objext \
11967 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011968LIBS=$ac_check_lib_save_LIBS
11969fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11971$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011972if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011973 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011974 LIBS="$LIBS -lbsd"
11975fi
11976
11977
11978fi
11979
Fred Drake8cef4cf2000-06-28 16:40:38 +000011980
11981fi
11982done
11983
Jack Jansendd19cf82001-12-06 22:36:17 +000011984
Christian Heimesb186d002008-03-18 15:15:01 +000011985# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011986for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011987do :
11988 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011989if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011990 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011991#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011992_ACEOF
11993
11994fi
11995done
11996
11997
Michael W. Hudson54241132001-12-07 15:38:26 +000011998# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011999for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012000do :
12001 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12002ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012003if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012004 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012005#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012006_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012007
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012009done
12010
Michael W. Hudson54241132001-12-07 15:38:26 +000012011
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012012ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012013if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012014 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012015
Martin v. Löwis1142de32002-03-29 16:28:31 +000012016else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012017 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012018 *" dup2.$ac_objext "* ) ;;
12019 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012020 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012021esac
12022
Martin v. Löwis1142de32002-03-29 16:28:31 +000012023fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012024
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012025ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012026if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012027 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12028
12029else
12030 case " $LIBOBJS " in
12031 *" strdup.$ac_objext "* ) ;;
12032 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12033 ;;
12034esac
12035
12036fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012037
12038
12039for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012040do :
12041 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012042if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012043 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012044#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012047/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012048#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012049int
12050main ()
12051{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012052getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012053 ;
12054 return 0;
12055}
12056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012058
Matthias Kloseb9621712010-04-24 17:59:49 +000012059$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012060
Guido van Rossum627b2d71993-12-24 10:39:16 +000012061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012063
Guido van Rossum627b2d71993-12-24 10:39:16 +000012064fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012065done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012066
Jack Jansen150753c2003-03-29 22:07:47 +000012067for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012068do :
12069 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012070if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012071 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012072#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012075/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012076#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012077int
12078main ()
12079{
12080setpgrp(0,0);
12081 ;
12082 return 0;
12083}
12084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012085if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012086
Matthias Kloseb9621712010-04-24 17:59:49 +000012087$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012088
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012091
12092fi
12093done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012094
Thomas Wouters3a584202000-08-05 23:28:51 +000012095for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012096do :
12097 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012098if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012099 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012100#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012101_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012103/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012104#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012105int
12106main ()
12107{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012108gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012109 ;
12110 return 0;
12111}
12112_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012113if ac_fn_c_try_compile "$LINENO"; then :
12114
Guido van Rossum627b2d71993-12-24 10:39:16 +000012115else
Skip Montanaro6dead952003-09-25 14:50:04 +000012116
Matthias Kloseb9621712010-04-24 17:59:49 +000012117$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012118
Martin v. Löwis11437992002-04-12 09:54:03 +000012119
Guido van Rossum627b2d71993-12-24 10:39:16 +000012120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012122
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012123fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012124done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012125
Michael W. Hudson54241132001-12-07 15:38:26 +000012126
Victor Stinnere0be4232011-10-25 13:06:09 +020012127for ac_func in clock_gettime
12128do :
12129 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12130if test "x$ac_cv_func_clock_gettime" = xyes; then :
12131 cat >>confdefs.h <<_ACEOF
12132#define HAVE_CLOCK_GETTIME 1
12133_ACEOF
12134
12135else
12136
12137 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12138$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12139if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12140 $as_echo_n "(cached) " >&6
12141else
12142 ac_check_lib_save_LIBS=$LIBS
12143LIBS="-lrt $LIBS"
12144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12145/* end confdefs.h. */
12146
12147/* Override any GCC internal prototype to avoid an error.
12148 Use char because int might match the return type of a GCC
12149 builtin and then its argument prototype would still apply. */
12150#ifdef __cplusplus
12151extern "C"
12152#endif
12153char clock_gettime ();
12154int
12155main ()
12156{
12157return clock_gettime ();
12158 ;
12159 return 0;
12160}
12161_ACEOF
12162if ac_fn_c_try_link "$LINENO"; then :
12163 ac_cv_lib_rt_clock_gettime=yes
12164else
12165 ac_cv_lib_rt_clock_gettime=no
12166fi
12167rm -f core conftest.err conftest.$ac_objext \
12168 conftest$ac_exeext conftest.$ac_ext
12169LIBS=$ac_check_lib_save_LIBS
12170fi
12171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12172$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12173if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12174
Victor Stinner7efb8332014-08-29 15:41:08 +020012175 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012176 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12177
12178
12179$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12180
12181
12182fi
12183
12184
12185fi
12186done
12187
12188
12189for ac_func in clock_getres
12190do :
12191 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12192if test "x$ac_cv_func_clock_getres" = xyes; then :
12193 cat >>confdefs.h <<_ACEOF
12194#define HAVE_CLOCK_GETRES 1
12195_ACEOF
12196
12197else
12198
12199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12200$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12201if ${ac_cv_lib_rt_clock_getres+:} false; then :
12202 $as_echo_n "(cached) " >&6
12203else
12204 ac_check_lib_save_LIBS=$LIBS
12205LIBS="-lrt $LIBS"
12206cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12207/* end confdefs.h. */
12208
12209/* Override any GCC internal prototype to avoid an error.
12210 Use char because int might match the return type of a GCC
12211 builtin and then its argument prototype would still apply. */
12212#ifdef __cplusplus
12213extern "C"
12214#endif
12215char clock_getres ();
12216int
12217main ()
12218{
12219return clock_getres ();
12220 ;
12221 return 0;
12222}
12223_ACEOF
12224if ac_fn_c_try_link "$LINENO"; then :
12225 ac_cv_lib_rt_clock_getres=yes
12226else
12227 ac_cv_lib_rt_clock_getres=no
12228fi
12229rm -f core conftest.err conftest.$ac_objext \
12230 conftest$ac_exeext conftest.$ac_ext
12231LIBS=$ac_check_lib_save_LIBS
12232fi
12233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12234$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12235if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12236
12237 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12238
12239
12240fi
12241
12242
12243fi
12244done
12245
12246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12248$as_echo_n "checking for major... " >&6; }
12249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012250/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012251
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012252#if defined(MAJOR_IN_MKDEV)
12253#include <sys/mkdev.h>
12254#elif defined(MAJOR_IN_SYSMACROS)
12255#include <sys/sysmacros.h>
12256#else
12257#include <sys/types.h>
12258#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012259
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012260int
12261main ()
12262{
12263
12264 makedev(major(0),minor(0));
12265
12266 ;
12267 return 0;
12268}
12269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012271
12272
Matthias Kloseb9621712010-04-24 17:59:49 +000012273$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012274
Matthias Kloseb9621712010-04-24 17:59:49 +000012275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12276$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012277
12278else
Skip Montanaro6dead952003-09-25 14:50:04 +000012279
Matthias Kloseb9621712010-04-24 17:59:49 +000012280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12281$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012282
12283fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012284rm -f core conftest.err conftest.$ac_objext \
12285 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012286
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012287# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012288# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12290$as_echo_n "checking for getaddrinfo... " >&6; }
12291cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012292/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012293
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012294#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012295#include <sys/socket.h>
12296#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012297#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012298
Martin v. Löwis11437992002-04-12 09:54:03 +000012299int
12300main ()
12301{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012302getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012303 ;
12304 return 0;
12305}
12306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012307if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012308 have_getaddrinfo=yes
12309else
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012312rm -f core conftest.err conftest.$ac_objext \
12313 conftest$ac_exeext conftest.$ac_ext
12314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12315$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012316if test $have_getaddrinfo = yes
12317then
Matthias Kloseb9621712010-04-24 17:59:49 +000012318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12319$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012320 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012321 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012322else
Matthias Kloseb9621712010-04-24 17:59:49 +000012323 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012324
12325if test "${enable_ipv6+set}" = set; then
12326 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12327else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012328 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012329fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012330else
Matthias Kloseb9621712010-04-24 17:59:49 +000012331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012332/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012333
Stefan Krah19c21392012-11-22 23:47:32 +010012334#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012335#include <sys/types.h>
12336#include <netdb.h>
12337#include <string.h>
12338#include <sys/socket.h>
12339#include <netinet/in.h>
12340
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012341int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012342{
12343 int passive, gaierr, inet4 = 0, inet6 = 0;
12344 struct addrinfo hints, *ai, *aitop;
12345 char straddr[INET6_ADDRSTRLEN], strport[16];
12346
12347 for (passive = 0; passive <= 1; passive++) {
12348 memset(&hints, 0, sizeof(hints));
12349 hints.ai_family = AF_UNSPEC;
12350 hints.ai_flags = passive ? AI_PASSIVE : 0;
12351 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012352 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012353 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12354 (void)gai_strerror(gaierr);
12355 goto bad;
12356 }
12357 for (ai = aitop; ai; ai = ai->ai_next) {
12358 if (ai->ai_addr == NULL ||
12359 ai->ai_addrlen == 0 ||
12360 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12361 straddr, sizeof(straddr), strport, sizeof(strport),
12362 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12363 goto bad;
12364 }
12365 switch (ai->ai_family) {
12366 case AF_INET:
12367 if (strcmp(strport, "54321") != 0) {
12368 goto bad;
12369 }
12370 if (passive) {
12371 if (strcmp(straddr, "0.0.0.0") != 0) {
12372 goto bad;
12373 }
12374 } else {
12375 if (strcmp(straddr, "127.0.0.1") != 0) {
12376 goto bad;
12377 }
12378 }
12379 inet4++;
12380 break;
12381 case AF_INET6:
12382 if (strcmp(strport, "54321") != 0) {
12383 goto bad;
12384 }
12385 if (passive) {
12386 if (strcmp(straddr, "::") != 0) {
12387 goto bad;
12388 }
12389 } else {
12390 if (strcmp(straddr, "::1") != 0) {
12391 goto bad;
12392 }
12393 }
12394 inet6++;
12395 break;
12396 case AF_UNSPEC:
12397 goto bad;
12398 break;
12399 default:
12400 /* another family support? */
12401 break;
12402 }
12403 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012404 freeaddrinfo(aitop);
12405 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012406 }
12407
12408 if (!(inet4 == 0 || inet4 == 2))
12409 goto bad;
12410 if (!(inet6 == 0 || inet6 == 2))
12411 goto bad;
12412
12413 if (aitop)
12414 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012415 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012416
12417 bad:
12418 if (aitop)
12419 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012420 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012421}
12422
Martin v. Löwis11437992002-04-12 09:54:03 +000012423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012424if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012425 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012426else
Matthias Kloseb9621712010-04-24 17:59:49 +000012427 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012428fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12430 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012433fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012434
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12438$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12439
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012440if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012441then
12442 if test $ipv6 = yes
12443 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012444 echo 'Fatal: You must get working getaddrinfo() function.'
12445 echo ' or you can specify "--disable-ipv6"'.
12446 exit 1
12447 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012448else
Martin v. Löwis11437992002-04-12 09:54:03 +000012449
Matthias Kloseb9621712010-04-24 17:59:49 +000012450$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012451
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012452fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012453
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012454for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012455do :
12456 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012457if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012459#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012460_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012461
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012462fi
12463done
12464
Michael W. Hudson54241132001-12-07 15:38:26 +000012465
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012466# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12468$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012469if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012470 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012471else
Matthias Kloseb9621712010-04-24 17:59:49 +000012472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012473/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012474#include <sys/types.h>
12475#include <sys/time.h>
12476#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012477
Martin v. Löwis11437992002-04-12 09:54:03 +000012478int
12479main ()
12480{
12481if ((struct tm *) 0)
12482return 0;
12483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012488 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012489else
Matthias Kloseb9621712010-04-24 17:59:49 +000012490 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012491fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12495$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012496if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
Matthias Kloseb9621712010-04-24 17:59:49 +000012498$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012499
12500fi
12501
Matthias Kloseb9621712010-04-24 17:59:49 +000012502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12503$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012504if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012505 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012506else
Matthias Kloseb9621712010-04-24 17:59:49 +000012507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012508/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012509#include <sys/types.h>
12510#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012511
Martin v. Löwis11437992002-04-12 09:54:03 +000012512int
12513main ()
12514{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012515struct tm tm;
12516 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012517 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012518 ;
12519 return 0;
12520}
12521_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012522if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012523 ac_cv_struct_tm=time.h
12524else
Matthias Kloseb9621712010-04-24 17:59:49 +000012525 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
12530$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012531if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012532
Matthias Kloseb9621712010-04-24 17:59:49 +000012533$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012534
12535fi
12536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537ac_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 +000012538#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Matthias Kloseb9621712010-04-24 17:59:49 +000012540"
Victor Stinnere0be4232011-10-25 13:06:09 +020012541if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012542
12543cat >>confdefs.h <<_ACEOF
12544#define HAVE_STRUCT_TM_TM_ZONE 1
12545_ACEOF
12546
12547
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012548fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012549
Martin v. Löwis11437992002-04-12 09:54:03 +000012550if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
12551
Matthias Kloseb9621712010-04-24 17:59:49 +000012552$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012553
12554else
Matthias Kloseb9621712010-04-24 17:59:49 +000012555 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
12556"
Victor Stinnere0be4232011-10-25 13:06:09 +020012557if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012558 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012559else
Matthias Kloseb9621712010-04-24 17:59:49 +000012560 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012561fi
12562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012563cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012564#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012565_ACEOF
12566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
12568$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012569if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012570 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012571else
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012573/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012574#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575#if !HAVE_DECL_TZNAME
12576extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000012577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012578
Martin v. Löwis11437992002-04-12 09:54:03 +000012579int
12580main ()
12581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012582return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 ;
12584 return 0;
12585}
12586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012587if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012588 ac_cv_var_tzname=yes
12589else
Matthias Kloseb9621712010-04-24 17:59:49 +000012590 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012591fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012592rm -f core conftest.err conftest.$ac_objext \
12593 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012595{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12596$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012597 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Matthias Kloseb9621712010-04-24 17:59:49 +000012599$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012600
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012601 fi
12602fi
12603
Matthias Kloseb9621712010-04-24 17:59:49 +000012604ac_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 +020012605if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012606
12607cat >>confdefs.h <<_ACEOF
12608#define HAVE_STRUCT_STAT_ST_RDEV 1
12609_ACEOF
12610
12611
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012612fi
12613
Matthias Kloseb9621712010-04-24 17:59:49 +000012614ac_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 +020012615if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012616
Martin v. Löwis11437992002-04-12 09:54:03 +000012617cat >>confdefs.h <<_ACEOF
12618#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12619_ACEOF
12620
12621
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012622fi
12623
Matthias Kloseb9621712010-04-24 17:59:49 +000012624ac_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 +020012625if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012626
12627cat >>confdefs.h <<_ACEOF
12628#define HAVE_STRUCT_STAT_ST_FLAGS 1
12629_ACEOF
12630
12631
12632fi
12633
Matthias Kloseb9621712010-04-24 17:59:49 +000012634ac_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 +020012635if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012636
12637cat >>confdefs.h <<_ACEOF
12638#define HAVE_STRUCT_STAT_ST_GEN 1
12639_ACEOF
12640
12641
12642fi
12643
Matthias Kloseb9621712010-04-24 17:59:49 +000012644ac_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 +020012645if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012646
12647cat >>confdefs.h <<_ACEOF
12648#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12649_ACEOF
12650
12651
12652fi
12653
Matthias Kloseb9621712010-04-24 17:59:49 +000012654ac_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 +020012655if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012656
Martin v. Löwis11437992002-04-12 09:54:03 +000012657cat >>confdefs.h <<_ACEOF
12658#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12659_ACEOF
12660
12661
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012662fi
12663
Stefan Krah267b6392016-04-26 01:09:18 +020012664ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
12665 #include <sys/types.h>
12666 #include <pwd.h>
12667
12668"
12669if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
12670
12671cat >>confdefs.h <<_ACEOF
12672#define HAVE_STRUCT_PASSWD_PW_GECOS 1
12673_ACEOF
12674
12675
12676fi
12677ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
12678 #include <sys/types.h>
12679 #include <pwd.h>
12680
12681"
12682if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
12683
12684cat >>confdefs.h <<_ACEOF
12685#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
12686_ACEOF
12687
12688
12689fi
12690
Michael W. Hudson54241132001-12-07 15:38:26 +000012691
Matthias Kloseb9621712010-04-24 17:59:49 +000012692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12693$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012694if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012696else
Matthias Kloseb159a552010-04-25 21:00:44 +000012697
Matthias Kloseb9621712010-04-24 17:59:49 +000012698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012699/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012700#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012701int
12702main ()
12703{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012704return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012705 ;
12706 return 0;
12707}
12708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012709if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012710 ac_cv_header_time_altzone=yes
12711else
Matthias Kloseb9621712010-04-24 17:59:49 +000012712 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012713fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012716fi
12717
Matthias Kloseb9621712010-04-24 17:59:49 +000012718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12719$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012720if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012721
Matthias Kloseb9621712010-04-24 17:59:49 +000012722$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012723
12724fi
12725
Guido van Rossumda88dad1995-01-26 00:46:29 +000012726was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12728$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012730/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012731
12732#include <sys/types.h>
12733#include <sys/select.h>
12734#include <sys/time.h>
12735
Martin v. Löwis11437992002-04-12 09:54:03 +000012736int
12737main ()
12738{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012739;
Martin v. Löwis11437992002-04-12 09:54:03 +000012740 ;
12741 return 0;
12742}
12743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012744if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012745
12746
Matthias Kloseb9621712010-04-24 17:59:49 +000012747$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012748
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012749 was_it_defined=yes
12750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12754$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012755
Matthias Kloseb9621712010-04-24 17:59:49 +000012756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12757$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012758if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012759 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012760else
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012762/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012763#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012764int
12765main ()
12766{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012767struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012768 ;
12769 return 0;
12770}
12771_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012772if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012773 ac_cv_struct_addrinfo=yes
12774else
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12778fi
12779
Matthias Kloseb9621712010-04-24 17:59:49 +000012780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12781$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012782if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012783
Matthias Kloseb9621712010-04-24 17:59:49 +000012784$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012785
12786fi
12787
Matthias Kloseb9621712010-04-24 17:59:49 +000012788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12789$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012790if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012791 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012792else
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012794/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012795
12796# include <sys/types.h>
12797# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012798int
12799main ()
12800{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012801struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 ;
12803 return 0;
12804}
12805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012806if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012807 ac_cv_struct_sockaddr_storage=yes
12808else
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12812fi
12813
Matthias Kloseb9621712010-04-24 17:59:49 +000012814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12815$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012816if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012817
Matthias Kloseb9621712010-04-24 17:59:49 +000012818$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012819
12820fi
12821
Christian Heimesdffa3942016-09-05 23:54:41 +020012822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
12823$as_echo_n "checking for sockaddr_alg... " >&6; }
12824if ${ac_cv_struct_sockaddr_alg+:} false; then :
12825 $as_echo_n "(cached) " >&6
12826else
12827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12828/* end confdefs.h. */
12829
12830# include <sys/types.h>
12831# include <sys/socket.h>
12832# include <linux/if_alg.h>
12833int
12834main ()
12835{
12836struct sockaddr_alg s
12837 ;
12838 return 0;
12839}
12840_ACEOF
12841if ac_fn_c_try_compile "$LINENO"; then :
12842 ac_cv_struct_sockaddr_alg=yes
12843else
12844 ac_cv_struct_sockaddr_alg=no
12845fi
12846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12847fi
12848
12849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
12850$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
12851if test $ac_cv_struct_sockaddr_alg = yes; then
12852
12853$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
12854
12855fi
12856
Guido van Rossum627b2d71993-12-24 10:39:16 +000012857# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012858
Matthias Kloseb9621712010-04-24 17:59:49 +000012859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12860$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012861if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012862 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012863else
Matthias Kloseb9621712010-04-24 17:59:49 +000012864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012866$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012867int
12868main ()
12869{
12870static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012871test_array [0] = 0;
12872return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012873
12874 ;
12875 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012876}
Martin v. Löwis11437992002-04-12 09:54:03 +000012877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012878if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012879 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012880else
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12886$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012887if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012888 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012889
12890fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012891
Matthias Kloseb9621712010-04-24 17:59:49 +000012892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12893$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012894if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012895 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012896else
Matthias Kloseb9621712010-04-24 17:59:49 +000012897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012898/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012899
Martin v. Löwis11437992002-04-12 09:54:03 +000012900int
12901main ()
12902{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012903
Martin v. Löwis11437992002-04-12 09:54:03 +000012904#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012905 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012906 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012907 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012908 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909 char const *const *pcpcc;
12910 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 /* NEC SVR4.0.2 mips cc rejects this. */
12912 struct point {int x, y;};
12913 static struct point const zero = {0,0};
12914 /* AIX XL C 1.02.0.0 rejects this.
12915 It does not let you subtract one const X* pointer from another in
12916 an arm of an if-expression whose if-part is not a constant
12917 expression */
12918 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012919 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012921 ++pcpcc;
12922 ppc = (char**) pcpcc;
12923 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012924 { /* SCO 3.2v4 cc rejects this sort of thing. */
12925 char tx;
12926 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012927 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012928
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012930 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012931 }
12932 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12933 int x[] = {25, 17};
12934 const int *foo = &x[0];
12935 ++foo;
12936 }
12937 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12938 typedef const int *iptr;
12939 iptr p = 0;
12940 ++p;
12941 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012942 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012944 struct s { int j; const int *ap[3]; } bx;
12945 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012946 }
12947 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12948 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012949 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012950 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012951 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012952#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012953
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 ;
12955 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012956}
Martin v. Löwis11437992002-04-12 09:54:03 +000012957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012958if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012959 ac_cv_c_const=yes
12960else
Matthias Kloseb9621712010-04-24 17:59:49 +000012961 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012962fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12966$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012967if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012968
Matthias Kloseb9621712010-04-24 17:59:49 +000012969$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012970
12971fi
12972
Michael W. Hudson54241132001-12-07 15:38:26 +000012973
Guido van Rossumda88dad1995-01-26 00:46:29 +000012974works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12976$as_echo_n "checking for working volatile... " >&6; }
12977cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012978/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012979
Martin v. Löwis11437992002-04-12 09:54:03 +000012980int
12981main ()
12982{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012983volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012984 ;
12985 return 0;
12986}
12987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012988if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012989 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012990else
Skip Montanaro6dead952003-09-25 14:50:04 +000012991
Matthias Kloseb9621712010-04-24 17:59:49 +000012992$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012993
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012994
Guido van Rossum627b2d71993-12-24 10:39:16 +000012995fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12998$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012999
Guido van Rossumda88dad1995-01-26 00:46:29 +000013000works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13002$as_echo_n "checking for working signed char... " >&6; }
13003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013004/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013005
Martin v. Löwis11437992002-04-12 09:54:03 +000013006int
13007main ()
13008{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013009signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 ;
13011 return 0;
13012}
13013_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013014if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013015 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013016else
Skip Montanaro6dead952003-09-25 14:50:04 +000013017
Matthias Kloseb9621712010-04-24 17:59:49 +000013018$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013019
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013020
Guido van Rossum7f43da71994-08-01 12:15:30 +000013021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13024$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013025
Guido van Rossumda88dad1995-01-26 00:46:29 +000013026have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13028$as_echo_n "checking for prototypes... " >&6; }
13029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013030/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013031int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013032int
13033main ()
13034{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013035return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013036 ;
13037 return 0;
13038}
13039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013040if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013041
Matthias Kloseb9621712010-04-24 17:59:49 +000013042$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013043
Matthias Kloseb159a552010-04-25 21:00:44 +000013044 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013045fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13048$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013049
Guido van Rossumda88dad1995-01-26 00:46:29 +000013050works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13052$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013054/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013055
13056#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013057int foo(int x, ...) {
13058 va_list va;
13059 va_start(va, x);
13060 va_arg(va, int);
13061 va_arg(va, char *);
13062 va_arg(va, double);
13063 return 0;
13064}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013065
Martin v. Löwis11437992002-04-12 09:54:03 +000013066int
13067main ()
13068{
Guido van Rossum90eea071996-08-30 20:58:57 +000013069return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 ;
13071 return 0;
13072}
13073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013074if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013075
13076
Matthias Kloseb9621712010-04-24 17:59:49 +000013077$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013078
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013079 works=yes
13080
Guido van Rossum627b2d71993-12-24 10:39:16 +000013081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13084$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013085
Martin v. Löwisd6320502004-08-12 13:45:08 +000013086# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13088$as_echo_n "checking for socketpair... " >&6; }
13089cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013090/* end confdefs.h. */
13091
13092#include <sys/types.h>
13093#include <sys/socket.h>
13094
13095int
13096main ()
13097{
13098void *x=socketpair
13099 ;
13100 return 0;
13101}
13102_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013103if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013104
Matthias Kloseb9621712010-04-24 17:59:49 +000013105$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013106
Matthias Kloseb159a552010-04-25 21:00:44 +000013107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013108$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013109else
Matthias Kloseb9621712010-04-24 17:59:49 +000013110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13111$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013112
13113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013115
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013116# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13118$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013120/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013121#include <sys/types.h>
13122#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013123int
13124main ()
13125{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013126struct sockaddr x;
13127x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013128 ;
13129 return 0;
13130}
13131_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013132if ac_fn_c_try_compile "$LINENO"; then :
13133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13134$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013135
Matthias Kloseb9621712010-04-24 17:59:49 +000013136$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013137
13138else
Matthias Kloseb9621712010-04-24 17:59:49 +000013139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13140$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013141
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013144
Guido van Rossumda88dad1995-01-26 00:46:29 +000013145va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
13147$as_echo_n "checking whether va_list is an array... " >&6; }
13148cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013149/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013150
13151#ifdef HAVE_STDARG_PROTOTYPES
13152#include <stdarg.h>
13153#else
13154#include <varargs.h>
13155#endif
13156
Martin v. Löwis11437992002-04-12 09:54:03 +000013157int
13158main ()
13159{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013160va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ;
13162 return 0;
13163}
13164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013165if ac_fn_c_try_compile "$LINENO"; then :
13166
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013167else
Skip Montanaro6dead952003-09-25 14:50:04 +000013168
Martin v. Löwis11437992002-04-12 09:54:03 +000013169
Matthias Kloseb9621712010-04-24 17:59:49 +000013170$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013171
Guido van Rossumda88dad1995-01-26 00:46:29 +000013172 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013173
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013174fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
13177$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013178
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013179# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013180
13181
Matthias Kloseb9621712010-04-24 17:59:49 +000013182ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013183if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013184
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013186
Matthias Kloseb9621712010-04-24 17:59:49 +000013187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13188$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013189 OLD_CFLAGS=$CFLAGS
13190 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013192/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013193
13194# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013195
Martin v. Löwis11437992002-04-12 09:54:03 +000013196int
13197main ()
13198{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013199
13200 char *name;
13201 struct hostent *he, *res;
13202 char buffer[2048];
13203 int buflen = 2048;
13204 int h_errnop;
13205
13206 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013207
13208 ;
13209 return 0;
13210}
13211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013212if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013213
Matthias Kloseb9621712010-04-24 17:59:49 +000013214 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013215
Martin v. Löwis11437992002-04-12 09:54:03 +000013216
Matthias Kloseb9621712010-04-24 17:59:49 +000013217$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013218
Matthias Kloseb9621712010-04-24 17:59:49 +000013219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13220$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013221
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013222else
Skip Montanaro6dead952003-09-25 14:50:04 +000013223
Matthias Kloseb9621712010-04-24 17:59:49 +000013224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13225$as_echo "no" >&6; }
13226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13227$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013229/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013230
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013231# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233int
13234main ()
13235{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013236
13237 char *name;
13238 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013239 char buffer[2048];
13240 int buflen = 2048;
13241 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013242
Matthias Kloseb159a552010-04-25 21:00:44 +000013243 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
13245 ;
13246 return 0;
13247}
13248_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013249if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013250
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013252
Martin v. Löwis11437992002-04-12 09:54:03 +000013253
Matthias Kloseb159a552010-04-25 21:00:44 +000013254$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013255
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13257$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013258
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013259else
Skip Montanaro6dead952003-09-25 14:50:04 +000013260
Matthias Kloseb9621712010-04-24 17:59:49 +000013261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13262$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13264$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13266/* end confdefs.h. */
13267
13268# include <netdb.h>
13269
13270int
13271main ()
13272{
13273
13274 char *name;
13275 struct hostent *he;
13276 struct hostent_data data;
13277
13278 (void) gethostbyname_r(name, he, &data);
13279
13280 ;
13281 return 0;
13282}
13283_ACEOF
13284if ac_fn_c_try_compile "$LINENO"; then :
13285
13286 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13287
13288
13289$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13290
13291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13292$as_echo "yes" >&6; }
13293
13294else
13295
13296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13297$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013298
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013301
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013304
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013307 CFLAGS=$OLD_CFLAGS
13308
13309else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013310
Matthias Kloseb9621712010-04-24 17:59:49 +000013311 for ac_func in gethostbyname
13312do :
13313 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013314if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013315 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013316#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013317_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013318
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013319fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013320done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013321
Michael W. Hudson54241132001-12-07 15:38:26 +000013322
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013323fi
13324
Michael W. Hudson54241132001-12-07 15:38:26 +000013325
13326
13327
13328
13329
13330
Guido van Rossum627b2d71993-12-24 10:39:16 +000013331# checks for system services
13332# (none yet)
13333
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013334# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013335ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013336if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013337
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013338else
Matthias Kloseb9621712010-04-24 17:59:49 +000013339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13340$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013341if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013342 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013343else
Martin v. Löwis11437992002-04-12 09:54:03 +000013344 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013345LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013346cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013348
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013349/* Override any GCC internal prototype to avoid an error.
13350 Use char because int might match the return type of a GCC
13351 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013352#ifdef __cplusplus
13353extern "C"
13354#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013355char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013356int
13357main ()
13358{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013359return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013360 ;
13361 return 0;
13362}
13363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013364if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013365 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013366else
Matthias Kloseb9621712010-04-24 17:59:49 +000013367 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013368fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013369rm -f core conftest.err conftest.$ac_objext \
13370 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013371LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013372fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13374$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013375if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 cat >>confdefs.h <<_ACEOF
13377#define HAVE_LIBIEEE 1
13378_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013379
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013380 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013381
Guido van Rossum627b2d71993-12-24 10:39:16 +000013382fi
13383
Michael W. Hudson54241132001-12-07 15:38:26 +000013384
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013385fi
13386
Michael W. Hudson54241132001-12-07 15:38:26 +000013387
Guido van Rossum7f253911997-05-09 02:42:48 +000013388# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13390$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013392# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013393if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013394 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013395if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013396then
13397
Matthias Kloseb9621712010-04-24 17:59:49 +000013398$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013399
Matthias Kloseb9621712010-04-24 17:59:49 +000013400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13401$as_echo "yes" >&6; }
13402else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13403$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013404fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13407$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013408fi
13409
Guido van Rossum7f253911997-05-09 02:42:48 +000013410
Guido van Rossum7f43da71994-08-01 12:15:30 +000013411# check for --with-libm=...
13412
Guido van Rossum563e7081996-09-10 18:20:48 +000013413case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013414Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013415*) LIBM=-lm
13416esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13418$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013419
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013421if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013423if test "$withval" = no
13424then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13426$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013427elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013428then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13430$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013431else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013432fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013433else
Matthias Kloseb9621712010-04-24 17:59:49 +000013434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13435$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013436fi
13437
Guido van Rossum7f43da71994-08-01 12:15:30 +000013438
13439# check for --with-libc=...
13440
Matthias Kloseb9621712010-04-24 17:59:49 +000013441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13442$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013445if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013446 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013447if test "$withval" = no
13448then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13450$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013451elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013452then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13454$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013455else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013456fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013457else
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13459$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013460fi
13461
Guido van Rossum7f43da71994-08-01 12:15:30 +000013462
Stefan Krah1919b7e2012-03-21 18:25:23 +010013463# **************************************
13464# * Check for gcc x64 inline assembler *
13465# **************************************
13466
13467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13468$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13470/* end confdefs.h. */
13471
13472int
13473main ()
13474{
13475
13476 __asm__ __volatile__ ("movq %rcx, %rax");
13477
13478 ;
13479 return 0;
13480}
13481_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013482if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013483 have_gcc_asm_for_x64=yes
13484else
13485 have_gcc_asm_for_x64=no
13486fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013487rm -f core conftest.err conftest.$ac_objext \
13488 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13490$as_echo "$have_gcc_asm_for_x64" >&6; }
13491if test "$have_gcc_asm_for_x64" = yes
13492then
13493
13494$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13495
13496fi
13497
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013498# **************************************************
13499# * Check for various properties of floating point *
13500# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013501
Matthias Kloseb9621712010-04-24 17:59:49 +000013502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13503$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013504if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013506else
13507
Matthias Kloseb9621712010-04-24 17:59:49 +000013508if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013509 ac_cv_little_endian_double=no
13510else
Matthias Kloseb9621712010-04-24 17:59:49 +000013511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013512/* end confdefs.h. */
13513
13514#include <string.h>
13515int main() {
13516 double x = 9006104071832581.0;
13517 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13518 return 0;
13519 else
13520 return 1;
13521}
13522
13523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013524if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013525 ac_cv_little_endian_double=yes
13526else
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013528fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013529rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13530 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013531fi
13532
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013533fi
13534
Matthias Kloseb9621712010-04-24 17:59:49 +000013535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13536$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013537if test "$ac_cv_little_endian_double" = yes
13538then
13539
Matthias Kloseb9621712010-04-24 17:59:49 +000013540$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013541
13542fi
13543
Matthias Kloseb9621712010-04-24 17:59:49 +000013544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
13545$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013546if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013547 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013548else
13549
Matthias Kloseb9621712010-04-24 17:59:49 +000013550if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013551 ac_cv_big_endian_double=no
13552else
Matthias Kloseb9621712010-04-24 17:59:49 +000013553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013554/* end confdefs.h. */
13555
13556#include <string.h>
13557int main() {
13558 double x = 9006104071832581.0;
13559 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
13560 return 0;
13561 else
13562 return 1;
13563}
13564
13565_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013566if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013567 ac_cv_big_endian_double=yes
13568else
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013570fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013571rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13572 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013573fi
13574
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013575fi
13576
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
13578$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013579if test "$ac_cv_big_endian_double" = yes
13580then
13581
Matthias Kloseb9621712010-04-24 17:59:49 +000013582$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013583
13584fi
13585
13586# Some ARM platforms use a mixed-endian representation for doubles.
13587# While Python doesn't currently have full support for these platforms
13588# (see e.g., issue 1762561), we can at least make sure that float <-> string
13589# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000013590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
13591$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013592if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013593 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013594else
13595
Matthias Kloseb9621712010-04-24 17:59:49 +000013596if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013597 ac_cv_mixed_endian_double=no
13598else
Matthias Kloseb9621712010-04-24 17:59:49 +000013599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013600/* end confdefs.h. */
13601
13602#include <string.h>
13603int main() {
13604 double x = 9006104071832581.0;
13605 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
13606 return 0;
13607 else
13608 return 1;
13609}
13610
13611_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013612if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013613 ac_cv_mixed_endian_double=yes
13614else
Matthias Kloseb9621712010-04-24 17:59:49 +000013615 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013616fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13618 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013619fi
13620
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013621fi
13622
Matthias Kloseb9621712010-04-24 17:59:49 +000013623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
13624$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013625if test "$ac_cv_mixed_endian_double" = yes
13626then
13627
Matthias Kloseb9621712010-04-24 17:59:49 +000013628$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013629
13630fi
13631
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013632# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000013633# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000013634# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000013635# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013636# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000013637# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013638
13639# This inline assembler syntax may also work for suncc and icc,
13640# so we try it on all platforms.
13641
Matthias Kloseb9621712010-04-24 17:59:49 +000013642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
13643$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
13644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013645/* end confdefs.h. */
13646
13647int
13648main ()
13649{
13650
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013651 unsigned short cw;
13652 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13653 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013654
13655 ;
13656 return 0;
13657}
13658_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013659if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013660 have_gcc_asm_for_x87=yes
13661else
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013663fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013664rm -f core conftest.err conftest.$ac_objext \
13665 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13667$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013668if test "$have_gcc_asm_for_x87" = yes
13669then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013672
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013673fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013674
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
13676$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
13677cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13678/* end confdefs.h. */
13679
13680int
13681main ()
13682{
13683
13684 unsigned int fpcr;
13685 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
13686 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
13687
13688 ;
13689 return 0;
13690}
13691_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013692if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013693 have_gcc_asm_for_mc68881=yes
13694else
13695 have_gcc_asm_for_mc68881=no
13696fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013697rm -f core conftest.err conftest.$ac_objext \
13698 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040013699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
13700$as_echo "$have_gcc_asm_for_mc68881" >&6; }
13701if test "$have_gcc_asm_for_mc68881" = yes
13702then
13703
13704$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
13705
13706fi
13707
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013708# Detect whether system arithmetic is subject to x87-style double
13709# rounding issues. The result of this test has little meaning on non
13710# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13711# mode is round-to-nearest and double rounding issues are present, and
13712# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13714$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013715# $BASECFLAGS may affect the result
13716ac_save_cc="$CC"
13717CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013718if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013719 ac_cv_x87_double_rounding=no
13720else
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013722/* end confdefs.h. */
13723
13724#include <stdlib.h>
13725#include <math.h>
13726int main() {
13727 volatile double x, y, z;
13728 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13729 x = 0.99999999999999989; /* 1-2**-53 */
13730 y = 1./x;
13731 if (y != 1.)
13732 exit(0);
13733 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13734 x = 1e16;
13735 y = 2.99999;
13736 z = x + y;
13737 if (z != 1e16+4.)
13738 exit(0);
13739 /* both tests show evidence of double rounding */
13740 exit(1);
13741}
13742
13743_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013744if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013745 ac_cv_x87_double_rounding=no
13746else
Matthias Kloseb9621712010-04-24 17:59:49 +000013747 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013748fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013749rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13750 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013751fi
13752
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013753CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13755$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013756if test "$ac_cv_x87_double_rounding" = yes
13757then
13758
Matthias Kloseb9621712010-04-24 17:59:49 +000013759$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013760
13761fi
13762
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013763# ************************************
13764# * Check for mathematical functions *
13765# ************************************
13766
13767LIBS_SAVE=$LIBS
13768LIBS="$LIBS $LIBM"
13769
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013770for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13771do :
13772 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13773ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013774if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013775 cat >>confdefs.h <<_ACEOF
13776#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13777_ACEOF
13778
13779fi
13780done
13781
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013782for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013783do :
13784 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13785ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013786if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013787 cat >>confdefs.h <<_ACEOF
13788#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13789_ACEOF
13790
13791fi
13792done
13793
13794ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13795"
Victor Stinnere0be4232011-10-25 13:06:09 +020013796if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013797 ac_have_decl=1
13798else
13799 ac_have_decl=0
13800fi
13801
13802cat >>confdefs.h <<_ACEOF
13803#define HAVE_DECL_ISINF $ac_have_decl
13804_ACEOF
13805ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13806"
Victor Stinnere0be4232011-10-25 13:06:09 +020013807if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013808 ac_have_decl=1
13809else
13810 ac_have_decl=0
13811fi
13812
13813cat >>confdefs.h <<_ACEOF
13814#define HAVE_DECL_ISNAN $ac_have_decl
13815_ACEOF
13816ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13817"
Victor Stinnere0be4232011-10-25 13:06:09 +020013818if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013819 ac_have_decl=1
13820else
13821 ac_have_decl=0
13822fi
13823
13824cat >>confdefs.h <<_ACEOF
13825#define HAVE_DECL_ISFINITE $ac_have_decl
13826_ACEOF
13827
13828
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013829# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13830# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13832$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013833if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013834 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013835else
13836
Matthias Kloseb9621712010-04-24 17:59:49 +000013837if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013838 ac_cv_tanh_preserves_zero_sign=no
13839else
Matthias Kloseb9621712010-04-24 17:59:49 +000013840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013841/* end confdefs.h. */
13842
13843#include <math.h>
13844#include <stdlib.h>
13845int main() {
13846 /* return 0 if either negative zeros don't exist
13847 on this platform or if negative zeros exist
13848 and tanh(-0.) == -0. */
13849 if (atan2(0., -1.) == atan2(-0., -1.) ||
13850 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13851 else exit(1);
13852}
13853
13854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013855if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013856 ac_cv_tanh_preserves_zero_sign=yes
13857else
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013859fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013860rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13861 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013862fi
13863
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013864fi
13865
Matthias Kloseb9621712010-04-24 17:59:49 +000013866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13867$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013868if test "$ac_cv_tanh_preserves_zero_sign" = yes
13869then
13870
Matthias Kloseb9621712010-04-24 17:59:49 +000013871$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013872
13873fi
13874
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013875if test "$ac_cv_func_log1p" = yes
13876then
13877 # On some versions of AIX, log1p(-0.) returns 0. instead of
13878 # -0. See issue #9920.
13879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13880$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013881 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013882 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013883else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013884
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013885 if test "$cross_compiling" = yes; then :
13886 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013887else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013890
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013891 #include <math.h>
13892 #include <stdlib.h>
13893 int main() {
13894 /* Fail if the signs of log1p(-0.) and -0. can be
13895 distinguished. */
13896 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13897 return 0;
13898 else
13899 return 1;
13900 }
13901
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013902_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013903if ac_fn_c_try_run "$LINENO"; then :
13904 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013905else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013906 ac_cv_log1p_drops_zero_sign=yes
13907fi
13908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013910fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013911
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013912fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013913
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13915$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13916fi
13917if test "$ac_cv_log1p_drops_zero_sign" = yes
13918then
13919
13920$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13921
13922fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013923
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013924LIBS=$LIBS_SAVE
13925
Mark Dickinsona614f042009-11-28 12:48:43 +000013926# For multiprocessing module, check that sem_open
13927# actually works. For FreeBSD versions <= 7.2,
13928# the kernel module that provides POSIX semaphores
13929# isn't loaded by default, so an attempt to call
13930# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13932$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013933if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013935else
Matthias Kloseb9621712010-04-24 17:59:49 +000013936 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013937 ac_cv_posix_semaphores_enabled=yes
13938else
Matthias Kloseb9621712010-04-24 17:59:49 +000013939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013940/* end confdefs.h. */
13941
13942#include <unistd.h>
13943#include <fcntl.h>
13944#include <stdio.h>
13945#include <semaphore.h>
13946#include <sys/stat.h>
13947
13948int main(void) {
13949 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13950 if (a == SEM_FAILED) {
13951 perror("sem_open");
13952 return 1;
13953 }
13954 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013955 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013956 return 0;
13957}
13958
13959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013960if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013961 ac_cv_posix_semaphores_enabled=yes
13962else
Matthias Kloseb9621712010-04-24 17:59:49 +000013963 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013965rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13966 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013967fi
13968
13969
Mark Dickinsona614f042009-11-28 12:48:43 +000013970fi
13971
Matthias Kloseb9621712010-04-24 17:59:49 +000013972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13973$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013974if test $ac_cv_posix_semaphores_enabled = no
13975then
13976
Matthias Kloseb9621712010-04-24 17:59:49 +000013977$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013978
13979fi
13980
Mark Dickinson10683072009-04-18 21:18:19 +000013981# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13983$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013984if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013985 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013986else
Matthias Kloseb9621712010-04-24 17:59:49 +000013987 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013988 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013989else
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013991/* end confdefs.h. */
13992
13993#include <unistd.h>
13994#include <fcntl.h>
13995#include <stdio.h>
13996#include <semaphore.h>
13997#include <sys/stat.h>
13998
13999int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014000 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014001 int count;
14002 int res;
14003 if(a==SEM_FAILED){
14004 perror("sem_open");
14005 return 1;
14006
14007 }
14008 res = sem_getvalue(a, &count);
14009 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014010 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014011 return res==-1 ? 1 : 0;
14012}
14013
Mark Dickinson10683072009-04-18 21:18:19 +000014014_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014015if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014016 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014017else
Matthias Kloseb9621712010-04-24 17:59:49 +000014018 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014019fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014020rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14021 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014022fi
14023
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014024
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014025fi
14026
Matthias Kloseb9621712010-04-24 17:59:49 +000014027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14028$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014029if test $ac_cv_broken_sem_getvalue = yes
14030then
14031
Matthias Kloseb9621712010-04-24 17:59:49 +000014032$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014033
14034fi
14035
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014036ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14037"
14038if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14039 ac_have_decl=1
14040else
14041 ac_have_decl=0
14042fi
14043
14044cat >>confdefs.h <<_ACEOF
14045#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14046_ACEOF
14047ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14048"
14049if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14050 ac_have_decl=1
14051else
14052 ac_have_decl=0
14053fi
14054
14055cat >>confdefs.h <<_ACEOF
14056#define HAVE_DECL_RTLD_NOW $ac_have_decl
14057_ACEOF
14058ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14059"
14060if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14061 ac_have_decl=1
14062else
14063 ac_have_decl=0
14064fi
14065
14066cat >>confdefs.h <<_ACEOF
14067#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14068_ACEOF
14069ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14070"
14071if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14072 ac_have_decl=1
14073else
14074 ac_have_decl=0
14075fi
14076
14077cat >>confdefs.h <<_ACEOF
14078#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14079_ACEOF
14080ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14081"
14082if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14083 ac_have_decl=1
14084else
14085 ac_have_decl=0
14086fi
14087
14088cat >>confdefs.h <<_ACEOF
14089#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14090_ACEOF
14091ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14092"
14093if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14094 ac_have_decl=1
14095else
14096 ac_have_decl=0
14097fi
14098
14099cat >>confdefs.h <<_ACEOF
14100#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14101_ACEOF
14102ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14103"
14104if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14105 ac_have_decl=1
14106else
14107 ac_have_decl=0
14108fi
14109
14110cat >>confdefs.h <<_ACEOF
14111#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14112_ACEOF
14113
14114
Mark Dickinsonbd792642009-03-18 20:06:12 +000014115# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14117$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014118# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014119if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014120 enableval=$enable_big_digits; case $enable_big_digits in
14121yes)
14122 enable_big_digits=30 ;;
14123no)
14124 enable_big_digits=15 ;;
1412515|30)
14126 ;;
14127*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014128 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 +000014129esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14131$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014132
14133cat >>confdefs.h <<_ACEOF
14134#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14135_ACEOF
14136
14137
14138else
Matthias Kloseb9621712010-04-24 17:59:49 +000014139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14140$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014141fi
14142
14143
Guido van Rossumef2255b2000-03-10 22:30:29 +000014144# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014145ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014146if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014147
14148
Matthias Kloseb9621712010-04-24 17:59:49 +000014149$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014150
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014151 wchar_h="yes"
14152
Guido van Rossumef2255b2000-03-10 22:30:29 +000014153else
Martin v. Löwis11437992002-04-12 09:54:03 +000014154 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014155
14156fi
14157
Michael W. Hudson54241132001-12-07 15:38:26 +000014158
Martin v. Löwis11437992002-04-12 09:54:03 +000014159
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014160# determine wchar_t size
14161if test "$wchar_h" = yes
14162then
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014164# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14165# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14166# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14168$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014169if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014170 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014171else
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14173"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014174
Martin v. Löwis11437992002-04-12 09:54:03 +000014175else
Matthias Kloseb9621712010-04-24 17:59:49 +000014176 if test "$ac_cv_type_wchar_t" = yes; then
14177 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14178$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014179as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014180See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014181 else
14182 ac_cv_sizeof_wchar_t=0
14183 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014184fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014185
Martin v. Löwis11437992002-04-12 09:54:03 +000014186fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14188$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189
14190
14191
Martin v. Löwis11437992002-04-12 09:54:03 +000014192cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014193#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014194_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014195
Michael W. Hudson54241132001-12-07 15:38:26 +000014196
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014197fi
14198
Matthias Kloseb9621712010-04-24 17:59:49 +000014199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14200$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014201have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014203/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014204
14205#include <tcl.h>
14206#if TCL_UTF_MAX != 6
14207# error "NOT UCS4_TCL"
14208#endif
14209int
14210main ()
14211{
14212
14213 ;
14214 return 0;
14215}
14216_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014217if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014218
14219
Matthias Kloseb9621712010-04-24 17:59:49 +000014220$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014221
14222 have_ucs4_tcl=yes
14223
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14227$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014228
Skip Montanaro6dead952003-09-25 14:50:04 +000014229# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014230if test "$wchar_h" = yes
14231then
14232 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14234$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014235 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014237else
14238
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014240 ac_cv_wchar_t_signed=yes
14241else
Matthias Kloseb9621712010-04-24 17:59:49 +000014242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014243/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014244
14245 #include <wchar.h>
14246 int main()
14247 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014248 /* Success: exit code 0 */
14249 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014250 }
14251
14252_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014253if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014254 ac_cv_wchar_t_signed=yes
14255else
Matthias Kloseb9621712010-04-24 17:59:49 +000014256 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014257fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14259 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014260fi
14261
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014262fi
14263
Matthias Kloseb9621712010-04-24 17:59:49 +000014264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14265$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266fi
14267
Georg Brandl52d168a2008-01-07 18:10:24 +000014268# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014269if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014270 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014271then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014272 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014273
Matthias Kloseb9621712010-04-24 17:59:49 +000014274$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014275
Georg Brandl52d168a2008-01-07 18:10:24 +000014276else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014277 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014278fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14280$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014281
14282# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14284$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014285if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014287else
Matthias Kloseb9621712010-04-24 17:59:49 +000014288 ac_cv_c_bigendian=unknown
14289 # See if we're dealing with a universal compiler.
14290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14291/* end confdefs.h. */
14292#ifndef __APPLE_CC__
14293 not a universal capable compiler
14294 #endif
14295 typedef int dummy;
14296
Skip Montanaro6dead952003-09-25 14:50:04 +000014297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014298if ac_fn_c_try_compile "$LINENO"; then :
14299
14300 # Check for potential -arch flags. It is not universal unless
14301 # there are at least two -arch flags with different values.
14302 ac_arch=
14303 ac_prev=
14304 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14305 if test -n "$ac_prev"; then
14306 case $ac_word in
14307 i?86 | x86_64 | ppc | ppc64)
14308 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14309 ac_arch=$ac_word
14310 else
14311 ac_cv_c_bigendian=universal
14312 break
14313 fi
14314 ;;
14315 esac
14316 ac_prev=
14317 elif test "x$ac_word" = "x-arch"; then
14318 ac_prev=arch
14319 fi
14320 done
14321fi
14322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14323 if test $ac_cv_c_bigendian = unknown; then
14324 # See if sys/param.h defines the BYTE_ORDER macro.
14325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014326/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014327#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014328 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014329
Martin v. Löwis11437992002-04-12 09:54:03 +000014330int
14331main ()
14332{
Matthias Kloseb9621712010-04-24 17:59:49 +000014333#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14334 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14335 && LITTLE_ENDIAN)
14336 bogus endian macros
14337 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014338
14339 ;
14340 return 0;
14341}
14342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014343if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014344 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014346/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014347#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014348 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014349
Martin v. Löwis11437992002-04-12 09:54:03 +000014350int
14351main ()
14352{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014353#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014354 not big endian
14355 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014356
14357 ;
14358 return 0;
14359}
14360_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014361if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014362 ac_cv_c_bigendian=yes
14363else
Matthias Kloseb9621712010-04-24 17:59:49 +000014364 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014367fi
14368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14369 fi
14370 if test $ac_cv_c_bigendian = unknown; then
14371 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014373/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014374#include <limits.h>
14375
Martin v. Löwis11437992002-04-12 09:54:03 +000014376int
14377main ()
14378{
Matthias Kloseb9621712010-04-24 17:59:49 +000014379#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14380 bogus endian macros
14381 #endif
14382
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 ;
14384 return 0;
14385}
14386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014387if ac_fn_c_try_compile "$LINENO"; then :
14388 # It does; now see whether it defined to _BIG_ENDIAN or not.
14389 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14390/* end confdefs.h. */
14391#include <limits.h>
14392
14393int
14394main ()
14395{
14396#ifndef _BIG_ENDIAN
14397 not big endian
14398 #endif
14399
14400 ;
14401 return 0;
14402}
14403_ACEOF
14404if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014405 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014406else
Matthias Kloseb9621712010-04-24 17:59:49 +000014407 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014408fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14410fi
14411rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14412 fi
14413 if test $ac_cv_c_bigendian = unknown; then
14414 # Compile a test program.
14415 if test "$cross_compiling" = yes; then :
14416 # Try to guess by grepping values from an object file.
14417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14418/* end confdefs.h. */
14419short int ascii_mm[] =
14420 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14421 short int ascii_ii[] =
14422 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14423 int use_ascii (int i) {
14424 return ascii_mm[i] + ascii_ii[i];
14425 }
14426 short int ebcdic_ii[] =
14427 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14428 short int ebcdic_mm[] =
14429 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14430 int use_ebcdic (int i) {
14431 return ebcdic_mm[i] + ebcdic_ii[i];
14432 }
14433 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435int
14436main ()
14437{
14438return use_ascii (foo) == use_ebcdic (foo);
14439 ;
14440 return 0;
14441}
14442_ACEOF
14443if ac_fn_c_try_compile "$LINENO"; then :
14444 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14445 ac_cv_c_bigendian=yes
14446 fi
14447 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14448 if test "$ac_cv_c_bigendian" = unknown; then
14449 ac_cv_c_bigendian=no
14450 else
14451 # finding both strings is unlikely to happen, but who knows?
14452 ac_cv_c_bigendian=unknown
14453 fi
14454 fi
14455fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014457else
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014459/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014461int
14462main ()
14463{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464
Matthias Kloseb9621712010-04-24 17:59:49 +000014465 /* Are we little or big endian? From Harbison&Steele. */
14466 union
14467 {
14468 long int l;
14469 char c[sizeof (long int)];
14470 } u;
14471 u.l = 1;
14472 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014473
14474 ;
14475 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014476}
Martin v. Löwis11437992002-04-12 09:54:03 +000014477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014478if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014479 ac_cv_c_bigendian=no
14480else
Matthias Kloseb9621712010-04-24 17:59:49 +000014481 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014482fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014483rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14484 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014486
Matthias Kloseb9621712010-04-24 17:59:49 +000014487 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014488fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14490$as_echo "$ac_cv_c_bigendian" >&6; }
14491 case $ac_cv_c_bigendian in #(
14492 yes)
14493 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14494;; #(
14495 no)
14496 ;; #(
14497 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014498
Matthias Kloseb9621712010-04-24 17:59:49 +000014499$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014500
Matthias Kloseb9621712010-04-24 17:59:49 +000014501 ;; #(
14502 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014503 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014504 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014506
Michael W. Hudson54241132001-12-07 15:38:26 +000014507
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014508# ABI version string for Python extension modules. This appears between the
14509# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14510# from the following attributes which affect the ABI of this Python build (in
14511# this order):
14512#
14513# * The Python implementation (always 'cpython-' for us)
14514# * The major and minor version numbers
14515# * --with-pydebug (adds a 'd')
14516# * --with-pymalloc (adds a 'm')
14517# * --with-wide-unicode (adds a 'u')
14518#
14519# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014520# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14521# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014522
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14524$as_echo_n "checking ABIFLAGS... " >&6; }
14525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14526$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14528$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014529SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14531$as_echo "$SOABI" >&6; }
14532
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014533
14534case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014535 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014536 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14537 *)
14538 EXT_SUFFIX=${SHLIB_SUFFIX};;
14539esac
14540
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14542$as_echo_n "checking LDVERSION... " >&6; }
14543LDVERSION='$(VERSION)$(ABIFLAGS)'
14544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
14545$as_echo "$LDVERSION" >&6; }
14546
doko@python.org87421192013-01-26 11:39:31 +010014547
doko@ubuntu.com55532312016-06-14 08:55:19 +020014548if test x$PLATFORM_TRIPLET = x; then
14549 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
14550else
14551 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
14552fi
doko@python.org87421192013-01-26 11:39:31 +010014553
14554
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014555# Check whether right shifting a negative integer extends the sign bit
14556# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000014557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
14558$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014559if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014560 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000014561else
Martin v. Löwis11437992002-04-12 09:54:03 +000014562
Matthias Kloseb9621712010-04-24 17:59:49 +000014563if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014564 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014565else
Matthias Kloseb9621712010-04-24 17:59:49 +000014566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014567/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014568
14569int main()
14570{
Vladimir Marangozova6180282000-07-12 05:05:06 +000014571 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014572}
14573
Martin v. Löwis11437992002-04-12 09:54:03 +000014574_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014575if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000014576 ac_cv_rshift_extends_sign=yes
14577else
Matthias Kloseb9621712010-04-24 17:59:49 +000014578 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000014579fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14581 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000014582fi
14583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014584fi
14585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
14587$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000014588if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014589then
Martin v. Löwis11437992002-04-12 09:54:03 +000014590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014592
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014593fi
14594
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014595# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000014596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
14597$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014598if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014599 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014600else
Martin v. Löwis11437992002-04-12 09:54:03 +000014601
Matthias Kloseb9621712010-04-24 17:59:49 +000014602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014603/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014604#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014605int
14606main ()
14607{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014608
14609 FILE *f = fopen("/dev/null", "r");
14610 flockfile(f);
14611 getc_unlocked(f);
14612 funlockfile(f);
14613
Martin v. Löwis11437992002-04-12 09:54:03 +000014614 ;
14615 return 0;
14616}
14617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014618if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014619 ac_cv_have_getc_unlocked=yes
14620else
Matthias Kloseb9621712010-04-24 17:59:49 +000014621 ac_cv_have_getc_unlocked=no
14622fi
14623rm -f core conftest.err conftest.$ac_objext \
14624 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014626
Matthias Kloseb9621712010-04-24 17:59:49 +000014627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
14628$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014629if test "$ac_cv_have_getc_unlocked" = yes
14630then
Martin v. Löwis11437992002-04-12 09:54:03 +000014631
Matthias Kloseb9621712010-04-24 17:59:49 +000014632$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000014633
14634fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000014635
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014636# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000014637# save the value of LIBS so we don't actually link Python with readline
14638LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014639
Gregory P. Smith18820942008-09-07 06:24:49 +000014640# On some systems we need to link readline to a termcap compatible
14641# library. NOTE: Keep the precedence of listed libraries synchronised
14642# with setup.py.
14643py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
14645$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020014646for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000014647 if test -z "$py_libtermcap"; then
14648 READLINE_LIBS="-lreadline"
14649 else
14650 READLINE_LIBS="-lreadline -l$py_libtermcap"
14651 fi
14652 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000014653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014654/* end confdefs.h. */
14655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656/* Override any GCC internal prototype to avoid an error.
14657 Use char because int might match the return type of a GCC
14658 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014659#ifdef __cplusplus
14660extern "C"
14661#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014662char readline ();
14663int
14664main ()
14665{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014666return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014667 ;
14668 return 0;
14669}
14670_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014671if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000014672 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014673fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014674rm -f core conftest.err conftest.$ac_objext \
14675 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000014676 if test $py_cv_lib_readline = yes; then
14677 break
14678 fi
14679done
14680# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
14681#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000014682if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000014683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
14684$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014685else
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
14687$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000014688
Matthias Kloseb9621712010-04-24 17:59:49 +000014689$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014690
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000014691fi
14692
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014693# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000014694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
14695$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014696if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014697 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014698else
14699 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014700LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014702/* end confdefs.h. */
14703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014704/* Override any GCC internal prototype to avoid an error.
14705 Use char because int might match the return type of a GCC
14706 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014707#ifdef __cplusplus
14708extern "C"
14709#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014710char rl_callback_handler_install ();
14711int
14712main ()
14713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014714return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014715 ;
14716 return 0;
14717}
14718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014719if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014720 ac_cv_lib_readline_rl_callback_handler_install=yes
14721else
Matthias Kloseb9621712010-04-24 17:59:49 +000014722 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014724rm -f core conftest.err conftest.$ac_objext \
14725 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014726LIBS=$ac_check_lib_save_LIBS
14727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
14729$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014730if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014731
Matthias Kloseb9621712010-04-24 17:59:49 +000014732$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014733
14734fi
14735
14736
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014737# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014739/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014740#include <readline/readline.h>
14741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014742if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014743 have_readline=yes
14744else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014745 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014746
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014747fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014748rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014749if test $have_readline = yes
14750then
Matthias Kloseb9621712010-04-24 17:59:49 +000014751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014752/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014753#include <readline/readline.h>
14754
14755_ACEOF
14756if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014757 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014758
Matthias Kloseb9621712010-04-24 17:59:49 +000014759$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014760
14761fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014762rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014763
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014765/* end confdefs.h. */
14766#include <readline/readline.h>
14767
14768_ACEOF
14769if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014770 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014771
Matthias Kloseb9621712010-04-24 17:59:49 +000014772$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014773
14774fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014775rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014776
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014777fi
14778
Martin v. Löwis0daad592001-09-30 21:09:59 +000014779# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14781$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014782if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014784else
Martin v. Löwis11437992002-04-12 09:54:03 +000014785 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014786LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014787cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014788/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014790/* Override any GCC internal prototype to avoid an error.
14791 Use char because int might match the return type of a GCC
14792 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014793#ifdef __cplusplus
14794extern "C"
14795#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014796char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014797int
14798main ()
14799{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014801 ;
14802 return 0;
14803}
14804_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014805if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014807else
Matthias Kloseb9621712010-04-24 17:59:49 +000014808 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014809fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014810rm -f core conftest.err conftest.$ac_objext \
14811 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014812LIBS=$ac_check_lib_save_LIBS
14813fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14815$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014816if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014817
Matthias Kloseb9621712010-04-24 17:59:49 +000014818$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014819
Martin v. Löwis0daad592001-09-30 21:09:59 +000014820fi
14821
Michael W. Hudson54241132001-12-07 15:38:26 +000014822
Thomas Wouters89d996e2007-09-08 17:39:28 +000014823# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14825$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014826if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014827 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014828else
14829 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014830LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014831cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014832/* end confdefs.h. */
14833
14834/* Override any GCC internal prototype to avoid an error.
14835 Use char because int might match the return type of a GCC
14836 builtin and then its argument prototype would still apply. */
14837#ifdef __cplusplus
14838extern "C"
14839#endif
14840char rl_completion_display_matches_hook ();
14841int
14842main ()
14843{
14844return rl_completion_display_matches_hook ();
14845 ;
14846 return 0;
14847}
14848_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014849if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014850 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14851else
Matthias Kloseb9621712010-04-24 17:59:49 +000014852 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014853fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014854rm -f core conftest.err conftest.$ac_objext \
14855 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014856LIBS=$ac_check_lib_save_LIBS
14857fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14859$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014860if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014861
Matthias Kloseb9621712010-04-24 17:59:49 +000014862$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014863
14864fi
14865
14866
Martin Panter5dbbf1a2016-04-03 02:54:58 +000014867# also in 4.0, but not in editline
14868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14869$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14870if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14871 $as_echo_n "(cached) " >&6
14872else
14873 ac_check_lib_save_LIBS=$LIBS
14874LIBS="-lreadline $READLINE_LIBS $LIBS"
14875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14876/* end confdefs.h. */
14877
14878/* Override any GCC internal prototype to avoid an error.
14879 Use char because int might match the return type of a GCC
14880 builtin and then its argument prototype would still apply. */
14881#ifdef __cplusplus
14882extern "C"
14883#endif
14884char rl_resize_terminal ();
14885int
14886main ()
14887{
14888return rl_resize_terminal ();
14889 ;
14890 return 0;
14891}
14892_ACEOF
14893if ac_fn_c_try_link "$LINENO"; then :
14894 ac_cv_lib_readline_rl_resize_terminal=yes
14895else
14896 ac_cv_lib_readline_rl_resize_terminal=no
14897fi
14898rm -f core conftest.err conftest.$ac_objext \
14899 conftest$ac_exeext conftest.$ac_ext
14900LIBS=$ac_check_lib_save_LIBS
14901fi
14902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14903$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14904if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14905
14906$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14907
14908fi
14909
14910
Martin v. Löwis0daad592001-09-30 21:09:59 +000014911# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14913$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014914if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014915 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014916else
Martin v. Löwis11437992002-04-12 09:54:03 +000014917 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014918LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014919cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014922/* Override any GCC internal prototype to avoid an error.
14923 Use char because int might match the return type of a GCC
14924 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014925#ifdef __cplusplus
14926extern "C"
14927#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014928char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014929int
14930main ()
14931{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014932return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 ;
14934 return 0;
14935}
14936_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014937if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014938 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014939else
Matthias Kloseb9621712010-04-24 17:59:49 +000014940 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014941fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014942rm -f core conftest.err conftest.$ac_objext \
14943 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014944LIBS=$ac_check_lib_save_LIBS
14945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14947$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014948if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014949
Matthias Kloseb9621712010-04-24 17:59:49 +000014950$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014951
Guido van Rossum353ae582001-07-10 16:45:32 +000014952fi
14953
Jack Jansendd19cf82001-12-06 22:36:17 +000014954
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014955# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014957/* end confdefs.h. */
14958#include <readline/readline.h>
14959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014960if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014961 have_readline=yes
14962else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014963 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014964
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014965fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014966rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014967if test $have_readline = yes
14968then
Matthias Kloseb9621712010-04-24 17:59:49 +000014969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014970/* end confdefs.h. */
14971#include <readline/readline.h>
14972
14973_ACEOF
14974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014976
Matthias Kloseb9621712010-04-24 17:59:49 +000014977$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014978
14979fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014980rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014981
14982fi
14983
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060014984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
14985$as_echo_n "checking for append_history in -lreadline... " >&6; }
14986if ${ac_cv_lib_readline_append_history+:} false; then :
14987 $as_echo_n "(cached) " >&6
14988else
14989 ac_check_lib_save_LIBS=$LIBS
14990LIBS="-lreadline $READLINE_LIBS $LIBS"
14991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14992/* end confdefs.h. */
14993
14994/* Override any GCC internal prototype to avoid an error.
14995 Use char because int might match the return type of a GCC
14996 builtin and then its argument prototype would still apply. */
14997#ifdef __cplusplus
14998extern "C"
14999#endif
15000char append_history ();
15001int
15002main ()
15003{
15004return append_history ();
15005 ;
15006 return 0;
15007}
15008_ACEOF
15009if ac_fn_c_try_link "$LINENO"; then :
15010 ac_cv_lib_readline_append_history=yes
15011else
15012 ac_cv_lib_readline_append_history=no
15013fi
15014rm -f core conftest.err conftest.$ac_objext \
15015 conftest$ac_exeext conftest.$ac_ext
15016LIBS=$ac_check_lib_save_LIBS
15017fi
15018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15019$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15020if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15021
15022$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15023
15024fi
15025
15026
Martin v. Löwis82bca632006-02-10 20:49:30 +000015027# End of readline checks: restore LIBS
15028LIBS=$LIBS_no_readline
15029
Matthias Kloseb9621712010-04-24 17:59:49 +000015030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15031$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015032if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015033 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015034else
Martin v. Löwis11437992002-04-12 09:54:03 +000015035
Matthias Kloseb9621712010-04-24 17:59:49 +000015036if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015037 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015038else
Matthias Kloseb9621712010-04-24 17:59:49 +000015039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015040/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015041
15042int main()
15043{
15044 int val1 = nice(1);
15045 if (val1 != -1 && val1 == nice(2))
15046 exit(0);
15047 exit(1);
15048}
15049
Martin v. Löwis11437992002-04-12 09:54:03 +000015050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015051if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015052 ac_cv_broken_nice=yes
15053else
Matthias Kloseb9621712010-04-24 17:59:49 +000015054 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015055fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15057 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015058fi
15059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060fi
15061
Matthias Kloseb9621712010-04-24 17:59:49 +000015062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15063$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015064if test "$ac_cv_broken_nice" = yes
15065then
Martin v. Löwis11437992002-04-12 09:54:03 +000015066
Matthias Kloseb9621712010-04-24 17:59:49 +000015067$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015068
15069fi
15070
Matthias Kloseb9621712010-04-24 17:59:49 +000015071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15072$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015073if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015074 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015075else
Matthias Kloseb9621712010-04-24 17:59:49 +000015076 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015077 ac_cv_broken_poll=no
15078else
Matthias Kloseb9621712010-04-24 17:59:49 +000015079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015080/* end confdefs.h. */
15081
15082#include <poll.h>
15083
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015084int main()
15085{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015086 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015087 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015088
15089 close (42);
15090
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015091 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015092 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015093 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015094 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015095 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015096 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015097 return 1;
15098}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015099
15100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015101if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015102 ac_cv_broken_poll=yes
15103else
Matthias Kloseb9621712010-04-24 17:59:49 +000015104 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015105fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015106rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15107 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015108fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015109
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015110fi
15111
Matthias Kloseb9621712010-04-24 17:59:49 +000015112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15113$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015114if test "$ac_cv_broken_poll" = yes
15115then
15116
Matthias Kloseb9621712010-04-24 17:59:49 +000015117$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015118
15119fi
15120
Brett Cannon43802422005-02-10 20:48:03 +000015121# 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 +000015122# (which is not required by ISO C or UNIX spec) and/or if we support
15123# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015124ac_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 +000015125#include <$ac_cv_struct_tm>
15126
Matthias Kloseb9621712010-04-24 17:59:49 +000015127"
Victor Stinnere0be4232011-10-25 13:06:09 +020015128if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015129
15130cat >>confdefs.h <<_ACEOF
15131#define HAVE_STRUCT_TM_TM_ZONE 1
15132_ACEOF
15133
15134
15135fi
15136
15137if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15138
Matthias Kloseb9621712010-04-24 17:59:49 +000015139$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015140
15141else
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15143"
Victor Stinnere0be4232011-10-25 13:06:09 +020015144if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015145 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015146else
Matthias Kloseb9621712010-04-24 17:59:49 +000015147 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015148fi
15149
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015151#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152_ACEOF
15153
Matthias Kloseb9621712010-04-24 17:59:49 +000015154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15155$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015156if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015157 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158else
Matthias Kloseb9621712010-04-24 17:59:49 +000015159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015160/* end confdefs.h. */
15161#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015162#if !HAVE_DECL_TZNAME
15163extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015164#endif
15165
15166int
15167main ()
15168{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015169return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015170 ;
15171 return 0;
15172}
15173_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015174if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015175 ac_cv_var_tzname=yes
15176else
Matthias Kloseb9621712010-04-24 17:59:49 +000015177 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015179rm -f core conftest.err conftest.$ac_objext \
15180 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15183$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015184 if test $ac_cv_var_tzname = yes; then
15185
Matthias Kloseb9621712010-04-24 17:59:49 +000015186$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015187
15188 fi
15189fi
15190
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015191
Martin v. Löwis1d459062005-03-14 21:23:33 +000015192# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15194$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015195if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015196 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015197else
15198
Matthias Kloseb9621712010-04-24 17:59:49 +000015199if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015200 ac_cv_working_tzset=no
15201else
Matthias Kloseb9621712010-04-24 17:59:49 +000015202 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015203/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015204
15205#include <stdlib.h>
15206#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015207#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015208
15209#if HAVE_TZNAME
15210extern char *tzname[];
15211#endif
15212
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015213int main()
15214{
Brett Cannon18367812003-09-19 00:59:16 +000015215 /* Note that we need to ensure that not only does tzset(3)
15216 do 'something' with localtime, but it works as documented
15217 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015218 This includes making sure that tzname is set properly if
15219 tm->tm_zone does not exist since it is the alternative way
15220 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015221
15222 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015223 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015224 */
15225
Martin v. Löwis1d459062005-03-14 21:23:33 +000015226 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015227 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15228
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015229 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015230 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015231 if (localtime(&groundhogday)->tm_hour != 0)
15232 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015233#if HAVE_TZNAME
15234 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15235 if (strcmp(tzname[0], "UTC") ||
15236 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15237 exit(1);
15238#endif
Brett Cannon18367812003-09-19 00:59:16 +000015239
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015240 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015241 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015242 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015243 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015244#if HAVE_TZNAME
15245 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15246 exit(1);
15247#endif
Brett Cannon18367812003-09-19 00:59:16 +000015248
15249 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15250 tzset();
15251 if (localtime(&groundhogday)->tm_hour != 11)
15252 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015253#if HAVE_TZNAME
15254 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15255 exit(1);
15256#endif
15257
15258#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015259 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15260 exit(1);
15261 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15262 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015263#endif
Brett Cannon18367812003-09-19 00:59:16 +000015264
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015265 exit(0);
15266}
15267
15268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015269if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015270 ac_cv_working_tzset=yes
15271else
Matthias Kloseb9621712010-04-24 17:59:49 +000015272 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15275 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015276fi
15277
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015278fi
15279
Matthias Kloseb9621712010-04-24 17:59:49 +000015280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15281$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015282if test "$ac_cv_working_tzset" = yes
15283then
15284
Matthias Kloseb9621712010-04-24 17:59:49 +000015285$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015286
15287fi
15288
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015289# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15291$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015292if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015293 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015294else
Matthias Kloseb9621712010-04-24 17:59:49 +000015295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015296/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015297#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015298int
15299main ()
15300{
15301
15302struct stat st;
15303st.st_mtim.tv_nsec = 1;
15304
15305 ;
15306 return 0;
15307}
15308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015309if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015310 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015311else
Matthias Kloseb9621712010-04-24 17:59:49 +000015312 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15315fi
15316
Matthias Kloseb9621712010-04-24 17:59:49 +000015317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15318$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015319if test "$ac_cv_stat_tv_nsec" = yes
15320then
15321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015323
15324fi
15325
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015326# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15328$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015329if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015330 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015331else
Matthias Kloseb9621712010-04-24 17:59:49 +000015332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015333/* end confdefs.h. */
15334#include <sys/stat.h>
15335int
15336main ()
15337{
15338
15339struct stat st;
15340st.st_mtimespec.tv_nsec = 1;
15341
15342 ;
15343 return 0;
15344}
15345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015347 ac_cv_stat_tv_nsec2=yes
15348else
Matthias Kloseb9621712010-04-24 17:59:49 +000015349 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15352fi
15353
Matthias Kloseb9621712010-04-24 17:59:49 +000015354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15355$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015356if test "$ac_cv_stat_tv_nsec2" = yes
15357then
15358
Matthias Kloseb9621712010-04-24 17:59:49 +000015359$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015360
15361fi
15362
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015363# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015364ac_save_cppflags="$CPPFLAGS"
15365CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015366
15367for ac_header in curses.h ncurses.h
15368do :
15369 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15370ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15371if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15372 cat >>confdefs.h <<_ACEOF
15373#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15374_ACEOF
15375
15376fi
15377
15378done
15379
15380
15381# On Solaris, term.h requires curses.h
15382for ac_header in term.h
15383do :
15384 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15385#ifdef HAVE_CURSES_H
15386#include <curses.h>
15387#endif
15388
15389"
15390if test "x$ac_cv_header_term_h" = xyes; then :
15391 cat >>confdefs.h <<_ACEOF
15392#define HAVE_TERM_H 1
15393_ACEOF
15394
15395fi
15396
15397done
15398
15399
Jack Jansen666b1e72001-10-31 12:11:48 +000015400# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15402$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015403if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015404 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015405else
Matthias Kloseb9621712010-04-24 17:59:49 +000015406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015407/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015408#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015409int
15410main ()
15411{
Jack Jansen666b1e72001-10-31 12:11:48 +000015412
15413 int rtn;
15414 rtn = mvwdelch(0,0,0);
15415
Martin v. Löwis11437992002-04-12 09:54:03 +000015416 ;
15417 return 0;
15418}
15419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015420if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015421 ac_cv_mvwdelch_is_expression=yes
15422else
Matthias Kloseb9621712010-04-24 17:59:49 +000015423 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15426fi
15427
Matthias Kloseb9621712010-04-24 17:59:49 +000015428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15429$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015430
15431if test "$ac_cv_mvwdelch_is_expression" = yes
15432then
Martin v. Löwis11437992002-04-12 09:54:03 +000015433
Matthias Kloseb9621712010-04-24 17:59:49 +000015434$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015435
15436fi
15437
Matthias Kloseb9621712010-04-24 17:59:49 +000015438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15439$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015440if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015441 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015442else
Matthias Kloseb9621712010-04-24 17:59:49 +000015443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015444/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015445#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015446int
15447main ()
15448{
Jack Jansen666b1e72001-10-31 12:11:48 +000015449
15450 WINDOW *w;
15451 w->_flags = 0;
15452
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 ;
15454 return 0;
15455}
15456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015457if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015458 ac_cv_window_has_flags=yes
15459else
Matthias Kloseb9621712010-04-24 17:59:49 +000015460 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15463fi
15464
Matthias Kloseb9621712010-04-24 17:59:49 +000015465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15466$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015467
Jack Jansen666b1e72001-10-31 12:11:48 +000015468
15469if test "$ac_cv_window_has_flags" = yes
15470then
Martin v. Löwis11437992002-04-12 09:54:03 +000015471
Matthias Kloseb9621712010-04-24 17:59:49 +000015472$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015473
15474fi
15475
Matthias Kloseb9621712010-04-24 17:59:49 +000015476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15477$as_echo_n "checking for is_term_resized... " >&6; }
15478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015479/* end confdefs.h. */
15480#include <curses.h>
15481int
15482main ()
15483{
15484void *x=is_term_resized
15485 ;
15486 return 0;
15487}
15488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015490
Matthias Kloseb9621712010-04-24 17:59:49 +000015491$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015492
Matthias Kloseb159a552010-04-25 21:00:44 +000015493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015494$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015495else
Matthias Kloseb9621712010-04-24 17:59:49 +000015496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15497$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015498
15499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15501
Matthias Kloseb9621712010-04-24 17:59:49 +000015502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15503$as_echo_n "checking for resize_term... " >&6; }
15504cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015505/* end confdefs.h. */
15506#include <curses.h>
15507int
15508main ()
15509{
15510void *x=resize_term
15511 ;
15512 return 0;
15513}
15514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015515if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015516
Matthias Kloseb9621712010-04-24 17:59:49 +000015517$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015518
Matthias Kloseb159a552010-04-25 21:00:44 +000015519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015520$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015521else
Matthias Kloseb9621712010-04-24 17:59:49 +000015522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15523$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015524
15525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15527
Matthias Kloseb9621712010-04-24 17:59:49 +000015528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15529$as_echo_n "checking for resizeterm... " >&6; }
15530cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015531/* end confdefs.h. */
15532#include <curses.h>
15533int
15534main ()
15535{
15536void *x=resizeterm
15537 ;
15538 return 0;
15539}
15540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015541if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015542
Matthias Kloseb9621712010-04-24 17:59:49 +000015543$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015544
Matthias Kloseb159a552010-04-25 21:00:44 +000015545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015546$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015547else
Matthias Kloseb9621712010-04-24 17:59:49 +000015548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15549$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015550
15551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015553# last curses configure check
15554CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
15557$as_echo "$as_me: checking for device files" >&6;}
15558
15559if test "x$cross_compiling" = xyes; then
15560 if test "${ac_cv_file__dev_ptmx+set}" != set; then
15561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15562$as_echo_n "checking for /dev/ptmx... " >&6; }
15563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15564$as_echo "not set" >&6; }
15565 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15566 fi
15567 if test "${ac_cv_file__dev_ptc+set}" != set; then
15568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15569$as_echo_n "checking for /dev/ptc... " >&6; }
15570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
15571$as_echo "not set" >&6; }
15572 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
15573 fi
15574fi
15575
Matthias Kloseb9621712010-04-24 17:59:49 +000015576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
15577$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015578if ${ac_cv_file__dev_ptmx+:} false; then :
15579 $as_echo_n "(cached) " >&6
15580else
15581 test "$cross_compiling" = yes &&
15582 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15583if test -r "/dev/ptmx"; then
15584 ac_cv_file__dev_ptmx=yes
15585else
15586 ac_cv_file__dev_ptmx=no
15587fi
15588fi
15589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
15590$as_echo "$ac_cv_file__dev_ptmx" >&6; }
15591if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015592
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015593fi
15594
15595if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015596
Matthias Kloseb9621712010-04-24 17:59:49 +000015597$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015598
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
15601$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015602if ${ac_cv_file__dev_ptc+:} false; then :
15603 $as_echo_n "(cached) " >&6
15604else
15605 test "$cross_compiling" = yes &&
15606 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
15607if test -r "/dev/ptc"; then
15608 ac_cv_file__dev_ptc=yes
15609else
15610 ac_cv_file__dev_ptc=no
15611fi
15612fi
15613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
15614$as_echo "$ac_cv_file__dev_ptc" >&6; }
15615if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000015616
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020015617fi
15618
15619if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000015620
Matthias Kloseb9621712010-04-24 17:59:49 +000015621$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000015622
Neal Norwitz865400f2003-03-21 01:42:58 +000015623fi
15624
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015626$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015627if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015628 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015629else
Matthias Kloseb9621712010-04-24 17:59:49 +000015630 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010015631 ac_cv_have_long_long_format="cross -- assuming no"
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015632if test x$GCC = xyes; then
15633save_CFLAGS=$CFLAGS
15634CFLAGS="$CFLAGS -Werror -Wformat"
15635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Matthias Klose3b739b12012-03-15 19:31:06 +010015636/* end confdefs.h. */
15637
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015638#include <stdio.h>
15639#include <stddef.h>
Matthias Klose3b739b12012-03-15 19:31:06 +010015640
15641int
15642main ()
15643{
15644
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015645char *buffer;
15646sprintf(buffer, "%lld", (long long)123);
15647sprintf(buffer, "%lld", (long long)-123);
15648sprintf(buffer, "%llu", (unsigned long long)123);
Matthias Klose3b739b12012-03-15 19:31:06 +010015649
15650 ;
15651 return 0;
15652}
15653_ACEOF
15654if ac_fn_c_try_compile "$LINENO"; then :
15655 ac_cv_have_long_long_format=yes
15656
15657fi
15658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015659CFLAGS=$save_CFLAGS
15660fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015661else
Matthias Kloseb9621712010-04-24 17:59:49 +000015662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015663/* end confdefs.h. */
15664
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015665#include <stdio.h>
15666#include <stddef.h>
15667#include <string.h>
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015668
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015669#ifdef HAVE_SYS_TYPES_H
15670#include <sys/types.h>
15671#endif
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015672
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015673int main()
15674{
15675char buffer[256];
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015676
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015677if (sprintf(buffer, "%lld", (long long)123) < 0)
15678return 1;
15679if (strcmp(buffer, "123"))
15680return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015681
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015682if (sprintf(buffer, "%lld", (long long)-123) < 0)
15683return 1;
15684if (strcmp(buffer, "-123"))
15685return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015686
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015687if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
15688return 1;
15689if (strcmp(buffer, "123"))
15690return 1;
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015691
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015692return 0;
15693}
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015694
15695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015696if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015697 ac_cv_have_long_long_format=yes
15698else
Matthias Kloseb9621712010-04-24 17:59:49 +000015699 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015700fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15702 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015703fi
15704
15705
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015706fi
15707
Benjamin Petersoned4aa832016-09-05 17:44:18 -070015708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015709$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015710
Mark Dickinson89d7d412009-12-31 20:50:59 +000015711if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015712then
15713
Matthias Kloseb9621712010-04-24 17:59:49 +000015714$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015715
15716fi
15717
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000015718if test $ac_sys_system = Darwin
15719then
15720 LIBS="$LIBS -framework CoreFoundation"
15721fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000015722
Matthias Kloseb9621712010-04-24 17:59:49 +000015723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
15724$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015725if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015726 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015727else
Matthias Kloseb9621712010-04-24 17:59:49 +000015728 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015729 ac_cv_have_size_t_format="cross -- assuming yes"
15730
Thomas Wouters477c8d52006-05-27 19:21:47 +000015731else
Matthias Kloseb9621712010-04-24 17:59:49 +000015732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015733/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015734
Thomas Wouters477c8d52006-05-27 19:21:47 +000015735#include <stdio.h>
15736#include <stddef.h>
15737#include <string.h>
15738
Christian Heimes2c181612007-12-17 20:04:13 +000015739#ifdef HAVE_SYS_TYPES_H
15740#include <sys/types.h>
15741#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000015742
15743#ifdef HAVE_SSIZE_T
15744typedef ssize_t Py_ssize_t;
15745#elif SIZEOF_VOID_P == SIZEOF_LONG
15746typedef long Py_ssize_t;
15747#else
15748typedef int Py_ssize_t;
15749#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000015750
Christian Heimes2c181612007-12-17 20:04:13 +000015751int main()
15752{
15753 char buffer[256];
15754
Thomas Wouters477c8d52006-05-27 19:21:47 +000015755 if(sprintf(buffer, "%zd", (size_t)123) < 0)
15756 return 1;
15757
Thomas Wouters89f507f2006-12-13 04:49:30 +000015758 if (strcmp(buffer, "123"))
15759 return 1;
15760
15761 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
15762 return 1;
15763
15764 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000015765 return 1;
15766
15767 return 0;
15768}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015769
Thomas Wouters477c8d52006-05-27 19:21:47 +000015770_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015771if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015772 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015773else
Matthias Kloseb9621712010-04-24 17:59:49 +000015774 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000015775fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015776rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15777 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015778fi
15779
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015780fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
15782$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000015783if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015784
Matthias Kloseb9621712010-04-24 17:59:49 +000015785$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015786
15787fi
15788
Matthias Kloseb9621712010-04-24 17:59:49 +000015789ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000015790#ifdef HAVE_SYS_TYPES_H
15791#include <sys/types.h>
15792#endif
15793#ifdef HAVE_SYS_SOCKET_H
15794#include <sys/socket.h>
15795#endif
15796
Matthias Kloseb9621712010-04-24 17:59:49 +000015797"
Victor Stinnere0be4232011-10-25 13:06:09 +020015798if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000015799
Martin v. Löwis11437992002-04-12 09:54:03 +000015800else
Guido van Rossum95713eb2000-05-18 20:53:31 +000015801
Matthias Kloseb9621712010-04-24 17:59:49 +000015802$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000015803
15804fi
15805
Michael W. Hudson54241132001-12-07 15:38:26 +000015806
Matthias Kloseb9621712010-04-24 17:59:49 +000015807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
15808$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015809if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015810 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015811else
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015813 ac_cv_broken_mbstowcs=no
15814else
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015816/* end confdefs.h. */
15817
Stefan Krah19c21392012-11-22 23:47:32 +010015818#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000015819#include<stdlib.h>
15820int main() {
15821 size_t len = -1;
15822 const char *str = "text";
15823 len = mbstowcs(NULL, str, 0);
15824 return (len != 4);
15825}
15826
15827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015828if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000015829 ac_cv_broken_mbstowcs=no
15830else
Matthias Kloseb9621712010-04-24 17:59:49 +000015831 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000015832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15834 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000015835fi
15836
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015837fi
15838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
15840$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000015841if test "$ac_cv_broken_mbstowcs" = yes
15842then
15843
Matthias Kloseb9621712010-04-24 17:59:49 +000015844$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000015845
15846fi
15847
Antoine Pitroub52ec782009-01-25 16:34:23 +000015848# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000015849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
15850$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015851
15852# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000015853if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000015854 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000015855if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000015856then
15857
Matthias Kloseb9621712010-04-24 17:59:49 +000015858$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000015859
Matthias Kloseb9621712010-04-24 17:59:49 +000015860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15861$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015862fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000015863if test "$withval" = no
15864then
15865
15866$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
15867
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15869$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000015870fi
15871
Antoine Pitrou042b1282010-08-13 21:15:58 +000015872else
15873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
15874$as_echo "no value specified" >&6; }
15875fi
15876
Antoine Pitroub52ec782009-01-25 16:34:23 +000015877
Matthias Kloseb17289e2012-03-15 19:51:34 +010015878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
15879$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
15880if ${ac_cv_computed_gotos+:} false; then :
15881 $as_echo_n "(cached) " >&6
15882else
15883 if test "$cross_compiling" = yes; then :
15884 if test "${with_computed_gotos+set}" = set; then
15885 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15886 else
15887 ac_cv_computed_gotos=no
15888 fi
15889else
15890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15891/* end confdefs.h. */
15892
15893int main(int argc, char **argv)
15894{
15895 static void *targets[1] = { &&LABEL1 };
15896 goto LABEL2;
15897LABEL1:
15898 return 0;
15899LABEL2:
15900 goto *targets[0];
15901 return 1;
15902}
15903
15904_ACEOF
15905if ac_fn_c_try_run "$LINENO"; then :
15906 ac_cv_computed_gotos=yes
15907else
15908 ac_cv_computed_gotos=no
15909fi
15910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15911 conftest.$ac_objext conftest.beam conftest.$ac_ext
15912fi
15913
15914fi
15915
15916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15917$as_echo "$ac_cv_computed_gotos" >&6; }
15918case "$ac_cv_computed_gotos" in yes*)
15919
15920$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15921
15922esac
15923
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015924case $ac_sys_system in
15925AIX*)
15926
15927$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15928 ;;
15929esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015930
Michael W. Hudson54241132001-12-07 15:38:26 +000015931
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015932
15933
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015934for h in `(cd $srcdir;echo Python/thread_*.h)`
15935do
15936 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15937done
15938
Michael W. Hudson54241132001-12-07 15:38:26 +000015939
Ned Deily0db50cf2014-07-25 12:41:31 -070015940SRCDIRS="Parser Grammar Objects Python Modules Mac Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000015941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15942$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015943for dir in $SRCDIRS; do
15944 if test ! -d $dir; then
15945 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015946 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015947done
Matthias Kloseb9621712010-04-24 17:59:49 +000015948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15949$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015950
Stefan Krah1919b7e2012-03-21 18:25:23 +010015951# Availability of -O2:
15952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15953$as_echo_n "checking for -O2... " >&6; }
15954saved_cflags="$CFLAGS"
15955CFLAGS="-O2"
15956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15957/* end confdefs.h. */
15958
15959int
15960main ()
15961{
15962
15963
15964 ;
15965 return 0;
15966}
15967_ACEOF
15968if ac_fn_c_try_compile "$LINENO"; then :
15969 have_O2=yes
15970else
15971 have_O2=no
15972fi
15973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15975$as_echo "$have_O2" >&6; }
15976CFLAGS="$saved_cflags"
15977
15978# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15979# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15981$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15982saved_cflags="$CFLAGS"
15983CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15984if test "$have_O2" = no; then
15985 CFLAGS=""
15986fi
15987if test "$cross_compiling" = yes; then :
15988 have_glibc_memmove_bug=undefined
15989else
15990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15991/* end confdefs.h. */
15992
15993#include <stdio.h>
15994#include <stdlib.h>
15995#include <string.h>
15996void foo(void *p, void *q) { memmove(p, q, 19); }
15997int main() {
15998 char a[32] = "123456789000000000";
15999 foo(&a[9], a);
16000 if (strcmp(a, "123456789123456789000000000") != 0)
16001 return 1;
16002 foo(a, &a[9]);
16003 if (strcmp(a, "123456789000000000") != 0)
16004 return 1;
16005 return 0;
16006}
16007
16008_ACEOF
16009if ac_fn_c_try_run "$LINENO"; then :
16010 have_glibc_memmove_bug=no
16011else
16012 have_glibc_memmove_bug=yes
16013fi
16014rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16015 conftest.$ac_objext conftest.beam conftest.$ac_ext
16016fi
16017
16018CFLAGS="$saved_cflags"
16019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16020$as_echo "$have_glibc_memmove_bug" >&6; }
16021if test "$have_glibc_memmove_bug" = yes; then
16022
16023$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16024
16025fi
16026
16027if test "$have_gcc_asm_for_x87" = yes; then
16028 # Some versions of gcc miscompile inline asm:
16029 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16030 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16031 case $CC in
16032 *gcc*)
16033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16034$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16035 saved_cflags="$CFLAGS"
16036 CFLAGS="-O2"
16037 if test "$cross_compiling" = yes; then :
16038 have_ipa_pure_const_bug=undefined
16039else
16040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16041/* end confdefs.h. */
16042
16043 __attribute__((noinline)) int
16044 foo(int *p) {
16045 int r;
16046 asm ( "movl \$6, (%1)\n\t"
16047 "xorl %0, %0\n\t"
16048 : "=r" (r) : "r" (p) : "memory"
16049 );
16050 return r;
16051 }
16052 int main() {
16053 int p = 8;
16054 if ((foo(&p) ? : p) != 6)
16055 return 1;
16056 return 0;
16057 }
16058
16059_ACEOF
16060if ac_fn_c_try_run "$LINENO"; then :
16061 have_ipa_pure_const_bug=no
16062else
16063 have_ipa_pure_const_bug=yes
16064fi
16065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16066 conftest.$ac_objext conftest.beam conftest.$ac_ext
16067fi
16068
16069 CFLAGS="$saved_cflags"
16070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16071$as_echo "$have_ipa_pure_const_bug" >&6; }
16072 if test "$have_ipa_pure_const_bug" = yes; then
16073
16074$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16075
16076 fi
16077 ;;
16078 esac
16079fi
16080
Victor Stinner4f5366e2015-01-09 02:13:19 +010016081# Check for stdatomic.h
16082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16083$as_echo_n "checking for stdatomic.h... " >&6; }
16084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16085/* end confdefs.h. */
16086
16087
16088 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016089 atomic_int value = ATOMIC_VAR_INIT(1);
16090 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016091 int main() {
16092 int loaded_value = atomic_load(&value);
16093 return 0;
16094 }
16095
16096
16097_ACEOF
16098if ac_fn_c_try_link "$LINENO"; then :
16099 have_stdatomic_h=yes
16100else
16101 have_stdatomic_h=no
16102fi
16103rm -f core conftest.err conftest.$ac_objext \
16104 conftest$ac_exeext conftest.$ac_ext
16105
16106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16107$as_echo "$have_stdatomic_h" >&6; }
16108
16109if test "$have_stdatomic_h" = yes; then
16110
16111$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16112
16113fi
16114
16115# Check for GCC >= 4.7 __atomic builtins
16116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16117$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16119/* end confdefs.h. */
16120
16121
16122 volatile int val = 1;
16123 int main() {
16124 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16125 return 0;
16126 }
16127
16128
16129_ACEOF
16130if ac_fn_c_try_link "$LINENO"; then :
16131 have_builtin_atomic=yes
16132else
16133 have_builtin_atomic=no
16134fi
16135rm -f core conftest.err conftest.$ac_objext \
16136 conftest$ac_exeext conftest.$ac_ext
16137
16138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16139$as_echo "$have_builtin_atomic" >&6; }
16140
16141if test "$have_builtin_atomic" = yes; then
16142
16143$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16144
16145fi
16146
Ned Deily322f5ba2013-11-21 23:01:59 -080016147# ensurepip option
16148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16149$as_echo_n "checking for ensurepip... " >&6; }
16150
16151# Check whether --with-ensurepip was given.
16152if test "${with_ensurepip+set}" = set; then :
16153 withval=$with_ensurepip;
16154else
16155 with_ensurepip=upgrade
16156fi
16157
16158case $with_ensurepip in #(
16159 yes|upgrade) :
16160 ENSUREPIP=upgrade ;; #(
16161 install) :
16162 ENSUREPIP=install ;; #(
16163 no) :
16164 ENSUREPIP=no ;; #(
16165 *) :
16166 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16167esac
16168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16169$as_echo "$ENSUREPIP" >&6; }
16170
16171
Victor Stinner35a97c02015-03-08 02:59:09 +010016172# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16174$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16176/* end confdefs.h. */
16177
16178
16179 #include <dirent.h>
16180
16181 int main() {
16182 struct dirent entry;
16183 return entry.d_type == DT_UNKNOWN;
16184 }
16185
16186
16187_ACEOF
16188if ac_fn_c_try_link "$LINENO"; then :
16189 have_dirent_d_type=yes
16190else
16191 have_dirent_d_type=no
16192fi
16193rm -f core conftest.err conftest.$ac_objext \
16194 conftest$ac_exeext conftest.$ac_ext
16195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16196$as_echo "$have_dirent_d_type" >&6; }
16197
16198if test "$have_dirent_d_type" = yes; then
16199
16200$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16201
16202fi
16203
Victor Stinner9eb57c52015-03-19 22:21:49 +010016204# check if the Linux getrandom() syscall is available
16205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16206$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16208/* end confdefs.h. */
16209
16210
Victor Stinner1b80b242016-04-12 22:34:58 +020016211 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016212 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016213 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016214
16215 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016216 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016217 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016218 const int flags = GRND_NONBLOCK;
16219 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016220 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016221 return 0;
16222 }
16223
16224
16225_ACEOF
16226if ac_fn_c_try_link "$LINENO"; then :
16227 have_getrandom_syscall=yes
16228else
16229 have_getrandom_syscall=no
16230fi
16231rm -f core conftest.err conftest.$ac_objext \
16232 conftest$ac_exeext conftest.$ac_ext
16233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16234$as_echo "$have_getrandom_syscall" >&6; }
16235
16236if test "$have_getrandom_syscall" = yes; then
16237
16238$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16239
16240fi
16241
Victor Stinner3abf44e2015-09-18 15:38:37 +020016242# check if the getrandom() function is available
16243# the test was written for the Solaris function of <sys/random.h>
16244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16245$as_echo_n "checking for the getrandom() function... " >&6; }
16246cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16247/* end confdefs.h. */
16248
16249
16250 #include <sys/random.h>
16251
16252 int main() {
16253 char buffer[1];
16254 const size_t buflen = sizeof(buffer);
16255 const int flags = 0;
16256 /* ignore the result, Python checks for ENOSYS at runtime */
16257 (void)getrandom(buffer, buflen, flags);
16258 return 0;
16259 }
16260
16261
16262_ACEOF
16263if ac_fn_c_try_link "$LINENO"; then :
16264 have_getrandom=yes
16265else
16266 have_getrandom=no
16267fi
16268rm -f core conftest.err conftest.$ac_objext \
16269 conftest$ac_exeext conftest.$ac_ext
16270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16271$as_echo "$have_getrandom" >&6; }
16272
16273if test "$have_getrandom" = yes; then
16274
16275$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16276
16277fi
16278
Guido van Rossum627b2d71993-12-24 10:39:16 +000016279# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016280ac_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 +000016281
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016282ac_config_files="$ac_config_files Modules/ld_so_aix"
16283
Martin v. Löwis11437992002-04-12 09:54:03 +000016284cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016285# This file is a shell script that caches the results of configure
16286# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016287# scripts and configure runs, see configure's option --config-cache.
16288# It is not useful on other systems. If it contains results you don't
16289# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016290#
Martin v. Löwis11437992002-04-12 09:54:03 +000016291# config.status only pays attention to the cache file if you give it
16292# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016293#
Skip Montanaro6dead952003-09-25 14:50:04 +000016294# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016295# loading this file, other *unset* `ac_cv_foo' will be assigned the
16296# following values.
16297
16298_ACEOF
16299
Guido van Rossumf78abae1997-01-21 22:02:36 +000016300# The following way of writing the cache mishandles newlines in values,
16301# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016303# Ultrix sh set writes to stderr and can't be redirected directly,
16304# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305(
16306 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16307 eval ac_val=\$$ac_var
16308 case $ac_val in #(
16309 *${as_nl}*)
16310 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016311 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16312$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313 esac
16314 case $ac_var in #(
16315 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016316 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16317 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016318 esac ;;
16319 esac
16320 done
16321
Martin v. Löwis11437992002-04-12 09:54:03 +000016322 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016323 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16324 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016325 # `set' does not quote correctly, so add quotes: double-quote
16326 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016327 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016328 "s/'/'\\\\''/g;
16329 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016331 *)
16332 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016334 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016335 esac |
16336 sort
16337) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016340 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016341 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16343 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016344 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16345 :end' >>confcache
16346if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16347 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016348 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016349 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16350$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016351 if test ! -f "$cache_file" || test -h "$cache_file"; then
16352 cat confcache >"$cache_file"
16353 else
16354 case $cache_file in #(
16355 */* | ?:*)
16356 mv -f confcache "$cache_file"$$ &&
16357 mv -f "$cache_file"$$ "$cache_file" ;; #(
16358 *)
16359 mv -f confcache "$cache_file" ;;
16360 esac
16361 fi
16362 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016363 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016364 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16365$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016366 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016367fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016368rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016369
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016370test "x$prefix" = xNONE && prefix=$ac_default_prefix
16371# Let make expand exec_prefix.
16372test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016373
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016374DEFS=-DHAVE_CONFIG_H
16375
Skip Montanaro6dead952003-09-25 14:50:04 +000016376ac_libobjs=
16377ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016378U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016379for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16380 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016381 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016382 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016383 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16384 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016385 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16386 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016387done
16388LIBOBJS=$ac_libobjs
16389
16390LTLIBOBJS=$ac_ltlibobjs
16391
16392
Martin v. Löwis11437992002-04-12 09:54:03 +000016393
Matthias Kloseb9621712010-04-24 17:59:49 +000016394
Victor Stinnere0be4232011-10-25 13:06:09 +020016395: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016396ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016397ac_clean_files_save=$ac_clean_files
16398ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016399{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16400$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16401as_write_fail=0
16402cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016403#! $SHELL
16404# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016405# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016406# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016407# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016408
Martin v. Löwis11437992002-04-12 09:54:03 +000016409debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016410ac_cs_recheck=false
16411ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016412
Matthias Kloseb9621712010-04-24 17:59:49 +000016413SHELL=\${CONFIG_SHELL-$SHELL}
16414export SHELL
16415_ASEOF
16416cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16417## -------------------- ##
16418## M4sh Initialization. ##
16419## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016421# Be more Bourne compatible
16422DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016423if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016424 emulate sh
16425 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016426 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016427 # is contrary to our usage. Disable this feature.
16428 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016429 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016430else
Matthias Kloseb9621712010-04-24 17:59:49 +000016431 case `(set -o) 2>/dev/null` in #(
16432 *posix*) :
16433 set -o posix ;; #(
16434 *) :
16435 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016436esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016437fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016438
16439
Matthias Kloseb9621712010-04-24 17:59:49 +000016440as_nl='
16441'
16442export as_nl
16443# Printing a long string crashes Solaris 7 /usr/bin/printf.
16444as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16445as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16446as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16447# Prefer a ksh shell builtin over an external printf program on Solaris,
16448# but without wasting forks for bash or zsh.
16449if test -z "$BASH_VERSION$ZSH_VERSION" \
16450 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16451 as_echo='print -r --'
16452 as_echo_n='print -rn --'
16453elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16454 as_echo='printf %s\n'
16455 as_echo_n='printf %s'
16456else
16457 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16458 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16459 as_echo_n='/usr/ucb/echo -n'
16460 else
16461 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16462 as_echo_n_body='eval
16463 arg=$1;
16464 case $arg in #(
16465 *"$as_nl"*)
16466 expr "X$arg" : "X\\(.*\\)$as_nl";
16467 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16468 esac;
16469 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16470 '
16471 export as_echo_n_body
16472 as_echo_n='sh -c $as_echo_n_body as_echo'
16473 fi
16474 export as_echo_body
16475 as_echo='sh -c $as_echo_body as_echo'
16476fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016477
16478# The user is always right.
16479if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016480 PATH_SEPARATOR=:
16481 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16482 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16483 PATH_SEPARATOR=';'
16484 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016485fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016487
16488# IFS
16489# We need space, tab and new line, in precisely that order. Quoting is
16490# there to prevent editors from complaining about space-tab.
16491# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16492# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016493IFS=" "" $as_nl"
16494
16495# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016496as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016497case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016498 *[\\/]* ) as_myself=$0 ;;
16499 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016500for as_dir in $PATH
16501do
16502 IFS=$as_save_IFS
16503 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016504 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16505 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016507
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016508 ;;
16509esac
16510# We did not find ourselves, most probably we were run as `sh COMMAND'
16511# in which case we are not to be found in the path.
16512if test "x$as_myself" = x; then
16513 as_myself=$0
16514fi
16515if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016516 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16517 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016518fi
16519
Matthias Kloseb9621712010-04-24 17:59:49 +000016520# Unset variables that we do not need and which cause bugs (e.g. in
16521# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16522# suppresses any "Segmentation fault" message there. '((' could
16523# trigger a bug in pdksh 5.2.14.
16524for as_var in BASH_ENV ENV MAIL MAILPATH
16525do eval test x\${$as_var+set} = xset \
16526 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016527done
16528PS1='$ '
16529PS2='> '
16530PS4='+ '
16531
16532# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016533LC_ALL=C
16534export LC_ALL
16535LANGUAGE=C
16536export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016537
Matthias Kloseb9621712010-04-24 17:59:49 +000016538# CDPATH.
16539(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16540
16541
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016542# as_fn_error STATUS ERROR [LINENO LOG_FD]
16543# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016544# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16545# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016546# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016547as_fn_error ()
16548{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016549 as_status=$1; test $as_status -eq 0 && as_status=1
16550 if test "$4"; then
16551 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16552 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016553 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016554 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016555 as_fn_exit $as_status
16556} # as_fn_error
16557
16558
16559# as_fn_set_status STATUS
16560# -----------------------
16561# Set $? to STATUS, without forking.
16562as_fn_set_status ()
16563{
16564 return $1
16565} # as_fn_set_status
16566
16567# as_fn_exit STATUS
16568# -----------------
16569# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16570as_fn_exit ()
16571{
16572 set +e
16573 as_fn_set_status $1
16574 exit $1
16575} # as_fn_exit
16576
16577# as_fn_unset VAR
16578# ---------------
16579# Portably unset VAR.
16580as_fn_unset ()
16581{
16582 { eval $1=; unset $1;}
16583}
16584as_unset=as_fn_unset
16585# as_fn_append VAR VALUE
16586# ----------------------
16587# Append the text in VALUE to the end of the definition contained in VAR. Take
16588# advantage of any shell optimizations that allow amortized linear growth over
16589# repeated appends, instead of the typical quadratic growth present in naive
16590# implementations.
16591if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16592 eval 'as_fn_append ()
16593 {
16594 eval $1+=\$2
16595 }'
16596else
16597 as_fn_append ()
16598 {
16599 eval $1=\$$1\$2
16600 }
16601fi # as_fn_append
16602
16603# as_fn_arith ARG...
16604# ------------------
16605# Perform arithmetic evaluation on the ARGs, and store the result in the
16606# global $as_val. Take advantage of shells that can avoid forks. The arguments
16607# must be portable across $(()) and expr.
16608if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16609 eval 'as_fn_arith ()
16610 {
16611 as_val=$(( $* ))
16612 }'
16613else
16614 as_fn_arith ()
16615 {
16616 as_val=`expr "$@" || test $? -eq 1`
16617 }
16618fi # as_fn_arith
16619
16620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621if expr a : '\(a\)' >/dev/null 2>&1 &&
16622 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16623 as_expr=expr
16624else
16625 as_expr=false
16626fi
16627
16628if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16629 as_basename=basename
16630else
16631 as_basename=false
16632fi
16633
Matthias Kloseb9621712010-04-24 17:59:49 +000016634if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16635 as_dirname=dirname
16636else
16637 as_dirname=false
16638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016640as_me=`$as_basename -- "$0" ||
16641$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
16642 X"$0" : 'X\(//\)$' \| \
16643 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016644$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016645 sed '/^.*\/\([^/][^/]*\)\/*$/{
16646 s//\1/
16647 q
16648 }
16649 /^X\/\(\/\/\)$/{
16650 s//\1/
16651 q
16652 }
16653 /^X\/\(\/\).*/{
16654 s//\1/
16655 q
16656 }
16657 s/.*/./; q'`
16658
Matthias Kloseb9621712010-04-24 17:59:49 +000016659# Avoid depending upon Character Ranges.
16660as_cr_letters='abcdefghijklmnopqrstuvwxyz'
16661as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
16662as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16663as_cr_digits='0123456789'
16664as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016665
16666ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000016667case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016668-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016669 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000016671 xy) ECHO_C='\c';;
16672 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16673 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016674 esac;;
16675*)
16676 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000016677esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016678
Martin v. Löwis11437992002-04-12 09:54:03 +000016679rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016680if test -d conf$$.dir; then
16681 rm -f conf$$.dir/conf$$.file
16682else
16683 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000016684 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016686if (echo >conf$$.file) 2>/dev/null; then
16687 if ln -s conf$$.file conf$$ 2>/dev/null; then
16688 as_ln_s='ln -s'
16689 # ... but there are two gotchas:
16690 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
16691 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016692 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000016693 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016694 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016695 elif ln conf$$.file conf$$ 2>/dev/null; then
16696 as_ln_s=ln
16697 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016698 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000016699 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016700else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016701 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000016702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016703rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
16704rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000016705
Matthias Kloseb9621712010-04-24 17:59:49 +000016706
16707# as_fn_mkdir_p
16708# -------------
16709# Create "$as_dir" as a directory, including parents if necessary.
16710as_fn_mkdir_p ()
16711{
16712
16713 case $as_dir in #(
16714 -*) as_dir=./$as_dir;;
16715 esac
16716 test -d "$as_dir" || eval $as_mkdir_p || {
16717 as_dirs=
16718 while :; do
16719 case $as_dir in #(
16720 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16721 *) as_qdir=$as_dir;;
16722 esac
16723 as_dirs="'$as_qdir' $as_dirs"
16724 as_dir=`$as_dirname -- "$as_dir" ||
16725$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16726 X"$as_dir" : 'X\(//\)[^/]' \| \
16727 X"$as_dir" : 'X\(//\)$' \| \
16728 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16729$as_echo X"$as_dir" |
16730 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16731 s//\1/
16732 q
16733 }
16734 /^X\(\/\/\)[^/].*/{
16735 s//\1/
16736 q
16737 }
16738 /^X\(\/\/\)$/{
16739 s//\1/
16740 q
16741 }
16742 /^X\(\/\).*/{
16743 s//\1/
16744 q
16745 }
16746 s/.*/./; q'`
16747 test -d "$as_dir" && break
16748 done
16749 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016750 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000016751
16752
16753} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000016754if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016755 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000016756else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016757 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000016758 as_mkdir_p=false
16759fi
16760
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016761
16762# as_fn_executable_p FILE
16763# -----------------------
16764# Test if FILE is an executable regular file.
16765as_fn_executable_p ()
16766{
16767 test -f "$1" && test -x "$1"
16768} # as_fn_executable_p
16769as_test_x='test -x'
16770as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016771
16772# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016773as_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 +000016774
16775# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000016776as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016777
16778
Martin v. Löwis11437992002-04-12 09:54:03 +000016779exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000016780## ----------------------------------- ##
16781## Main body of $CONFIG_STATUS script. ##
16782## ----------------------------------- ##
16783_ASEOF
16784test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016785
Matthias Kloseb9621712010-04-24 17:59:49 +000016786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16787# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000016788# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016789# values after options handling.
16790ac_log="
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016791This file was extended by python $as_me 3.6, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016792generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000016793
16794 CONFIG_FILES = $CONFIG_FILES
16795 CONFIG_HEADERS = $CONFIG_HEADERS
16796 CONFIG_LINKS = $CONFIG_LINKS
16797 CONFIG_COMMANDS = $CONFIG_COMMANDS
16798 $ $0 $@
16799
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016800on `(hostname || uname -n) 2>/dev/null | sed 1q`
16801"
16802
Martin v. Löwis11437992002-04-12 09:54:03 +000016803_ACEOF
16804
Matthias Kloseb9621712010-04-24 17:59:49 +000016805case $ac_config_files in *"
16806"*) set x $ac_config_files; shift; ac_config_files=$*;;
16807esac
16808
16809case $ac_config_headers in *"
16810"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16811esac
16812
16813
16814cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016815# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010016816config_files="$ac_config_files"
16817config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000016818
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016819_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016820
Matthias Kloseb9621712010-04-24 17:59:49 +000016821cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016822ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000016823\`$as_me' instantiates files and other configuration actions
16824from templates according to the current configuration. Unless the files
16825and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000016826
Matthias Kloseb9621712010-04-24 17:59:49 +000016827Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000016828
16829 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016830 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000016831 --config print configuration, then exit
16832 -q, --quiet, --silent
16833 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 -d, --debug don't remove temporary files
16835 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000016836 --file=FILE[:TEMPLATE]
16837 instantiate the configuration file FILE
16838 --header=FILE[:TEMPLATE]
16839 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000016840
16841Configuration files:
16842$config_files
16843
16844Configuration headers:
16845$config_headers
16846
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070016847Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016850cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16851ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000016852ac_cs_version="\\
Benjamin Petersona8c22a02015-05-27 23:29:00 -050016853python config.status 3.6
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016854configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000016855 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000016856
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016857Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000016858This config.status script is free software; the Free Software Foundation
16859gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860
16861ac_pwd='$ac_pwd'
16862srcdir='$srcdir'
16863INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010016864MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000016865test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000016866_ACEOF
16867
Matthias Kloseb9621712010-04-24 17:59:49 +000016868cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16869# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000016870ac_need_defaults=:
16871while test $# != 0
16872do
16873 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016874 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016875 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16876 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000016877 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000016878 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016879 --*=)
16880 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16881 ac_optarg=
16882 ac_shift=:
16883 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016884 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000016885 ac_option=$1
16886 ac_optarg=$2
16887 ac_shift=shift
16888 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016889 esac
16890
Skip Montanaro6dead952003-09-25 14:50:04 +000016891 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000016892 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000016893 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16894 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016895 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000016896 $as_echo "$ac_cs_version"; exit ;;
16897 --config | --confi | --conf | --con | --co | --c )
16898 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016899 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000016900 debug=: ;;
16901 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000016902 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016903 case $ac_optarg in
16904 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016905 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000016906 esac
16907 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016908 ac_need_defaults=false;;
16909 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000016910 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000016911 case $ac_optarg in
16912 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16913 esac
16914 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000016915 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916 --he | --h)
16917 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016918 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016919Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016920 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000016921 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016922 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
16923 | -silent | --silent | --silen | --sile | --sil | --si | --s)
16924 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016925
16926 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016927 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000016928Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016929
Matthias Kloseb9621712010-04-24 17:59:49 +000016930 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016932
16933 esac
16934 shift
16935done
16936
Skip Montanaro6dead952003-09-25 14:50:04 +000016937ac_configure_extra_args=
16938
16939if $ac_cs_silent; then
16940 exec 6>/dev/null
16941 ac_configure_extra_args="$ac_configure_extra_args --silent"
16942fi
16943
16944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016945cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000016946if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000016947 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000016948 shift
16949 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16950 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016951 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000016952 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000016953fi
16954
Martin v. Löwis11437992002-04-12 09:54:03 +000016955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016957exec 5>>config.log
16958{
16959 echo
16960 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
16961## Running $as_me. ##
16962_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000016963 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016964} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016967cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016968_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016969
Matthias Kloseb9621712010-04-24 17:59:49 +000016970cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016971
16972# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000016973for ac_config_target in $ac_config_targets
16974do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016975 case $ac_config_target in
16976 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
16977 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
16978 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000016979 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
16980 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
16982 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000016983 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010016984 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016985 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016986
Victor Stinnere0be4232011-10-25 13:06:09 +020016987 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016988 esac
16989done
16990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991
Martin v. Löwis11437992002-04-12 09:54:03 +000016992# If the user did not use the arguments to specify the items to instantiate,
16993# then the envvar interface is used. Set only those that are not.
16994# We use the long form for the default assignment because of an extremely
16995# bizarre bug on SunOS 4.1.3.
16996if $ac_need_defaults; then
16997 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16998 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16999fi
17000
Skip Montanaro6dead952003-09-25 14:50:04 +000017001# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017002# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017003# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017004# Hook for its removal unless debugging.
17005# Note that there is a small window in which the directory will not be cleaned:
17006# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017007$debug ||
17008{
Victor Stinnere0be4232011-10-25 13:06:09 +020017009 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017010 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017011 : "${ac_tmp:=$tmp}"
17012 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017013' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017014 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017015}
Martin v. Löwis11437992002-04-12 09:54:03 +000017016# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017017
Martin v. Löwis11437992002-04-12 09:54:03 +000017018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017019 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017020 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017021} ||
17022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017023 tmp=./conf$$-$RANDOM
17024 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017025} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017026ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017027
Matthias Kloseb9621712010-04-24 17:59:49 +000017028# Set up the scripts for CONFIG_FILES section.
17029# No need to generate them if there are no CONFIG_FILES.
17030# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017031if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017032
Matthias Kloseb9621712010-04-24 17:59:49 +000017033
17034ac_cr=`echo X | tr X '\015'`
17035# On cygwin, bash can eat \r inside `` if the user requested igncr.
17036# But we know of no other shell where ac_cr would be empty at this
17037# point, so we can use a bashism as a fallback.
17038if test "x$ac_cr" = x; then
17039 eval ac_cr=\$\'\\r\'
17040fi
17041ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17042if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017043 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017044else
17045 ac_cs_awk_cr=$ac_cr
17046fi
17047
Victor Stinnere0be4232011-10-25 13:06:09 +020017048echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017049_ACEOF
17050
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017051
Matthias Kloseb9621712010-04-24 17:59:49 +000017052{
17053 echo "cat >conf$$subs.awk <<_ACEOF" &&
17054 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17055 echo "_ACEOF"
17056} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017057 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17058ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017059ac_delim='%!_!# '
17060for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017061 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017062 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017063
Matthias Kloseb9621712010-04-24 17:59:49 +000017064 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17065 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017066 break
17067 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017068 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017069 else
17070 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017071 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072done
Matthias Kloseb9621712010-04-24 17:59:49 +000017073rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074
Matthias Kloseb9621712010-04-24 17:59:49 +000017075cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017076cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017078sed -n '
17079h
17080s/^/S["/; s/!.*/"]=/
17081p
17082g
17083s/^[^!]*!//
17084:repl
17085t repl
17086s/'"$ac_delim"'$//
17087t delim
17088:nl
17089h
17090s/\(.\{148\}\)..*/\1/
17091t more1
17092s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17093p
17094n
17095b repl
17096:more1
17097s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17098p
17099g
17100s/.\{148\}//
17101t nl
17102:delim
17103h
17104s/\(.\{148\}\)..*/\1/
17105t more2
17106s/["\\]/\\&/g; s/^/"/; s/$/"/
17107p
17108b
17109:more2
17110s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17111p
17112g
17113s/.\{148\}//
17114t delim
17115' <conf$$subs.awk | sed '
17116/^[^""]/{
17117 N
17118 s/\n//
17119}
17120' >>$CONFIG_STATUS || ac_write_fail=1
17121rm -f conf$$subs.awk
17122cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17123_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017124cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017125 for (key in S) S_is_set[key] = 1
17126 FS = ""
17127
17128}
17129{
17130 line = $ 0
17131 nfields = split(line, field, "@")
17132 substed = 0
17133 len = length(field[1])
17134 for (i = 2; i < nfields; i++) {
17135 key = field[i]
17136 keylen = length(key)
17137 if (S_is_set[key]) {
17138 value = S[key]
17139 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17140 len += length(value) + length(field[++i])
17141 substed = 1
17142 } else
17143 len += 1 + keylen
17144 }
17145
17146 print line
17147}
17148
17149_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017150_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017151cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17152if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17153 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17154else
17155 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017156fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017157 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017158_ACEOF
17159
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017160# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17161# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017162# trailing colons and then remove the whole line if VPATH becomes empty
17163# (actually we leave an empty line to preserve line numbers).
17164if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017165 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17166h
17167s///
17168s/^/:/
17169s/[ ]*$/:/
17170s/:\$(srcdir):/:/g
17171s/:\${srcdir}:/:/g
17172s/:@srcdir@:/:/g
17173s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017174s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017175x
17176s/\(=[ ]*\).*/\1/
17177G
17178s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017179s/^[^=]*=[ ]*$//
17180}'
17181fi
17182
Matthias Kloseb9621712010-04-24 17:59:49 +000017183cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017184fi # test -n "$CONFIG_FILES"
17185
Matthias Kloseb9621712010-04-24 17:59:49 +000017186# Set up the scripts for CONFIG_HEADERS section.
17187# No need to generate them if there are no CONFIG_HEADERS.
17188# This happens for instance with `./config.status Makefile'.
17189if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017190cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017191BEGIN {
17192_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017193
Matthias Kloseb9621712010-04-24 17:59:49 +000017194# Transform confdefs.h into an awk script `defines.awk', embedded as
17195# here-document in config.status, that substitutes the proper values into
17196# config.h.in to produce config.h.
17197
17198# Create a delimiter string that does not exist in confdefs.h, to ease
17199# handling of long lines.
17200ac_delim='%!_!# '
17201for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017202 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17203 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017204 break
17205 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017206 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017207 else
17208 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17209 fi
17210done
17211
17212# For the awk script, D is an array of macro values keyed by name,
17213# likewise P contains macro parameters if any. Preserve backslash
17214# newline sequences.
17215
17216ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17217sed -n '
17218s/.\{148\}/&'"$ac_delim"'/g
17219t rset
17220:rset
17221s/^[ ]*#[ ]*define[ ][ ]*/ /
17222t def
17223d
17224:def
17225s/\\$//
17226t bsnl
17227s/["\\]/\\&/g
17228s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17229D["\1"]=" \3"/p
17230s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17231d
17232:bsnl
17233s/["\\]/\\&/g
17234s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17235D["\1"]=" \3\\\\\\n"\\/p
17236t cont
17237s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17238t cont
17239d
17240:cont
17241n
17242s/.\{148\}/&'"$ac_delim"'/g
17243t clear
17244:clear
17245s/\\$//
17246t bsnlc
17247s/["\\]/\\&/g; s/^/"/; s/$/"/p
17248d
17249:bsnlc
17250s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17251b cont
17252' <confdefs.h | sed '
17253s/'"$ac_delim"'/"\\\
17254"/g' >>$CONFIG_STATUS || ac_write_fail=1
17255
17256cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17257 for (key in D) D_is_set[key] = 1
17258 FS = ""
17259}
17260/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17261 line = \$ 0
17262 split(line, arg, " ")
17263 if (arg[1] == "#") {
17264 defundef = arg[2]
17265 mac1 = arg[3]
17266 } else {
17267 defundef = substr(arg[1], 2)
17268 mac1 = arg[2]
17269 }
17270 split(mac1, mac2, "(") #)
17271 macro = mac2[1]
17272 prefix = substr(line, 1, index(line, defundef) - 1)
17273 if (D_is_set[macro]) {
17274 # Preserve the white space surrounding the "#".
17275 print prefix "define", macro P[macro] D[macro]
17276 next
17277 } else {
17278 # Replace #undef with comments. This is necessary, for example,
17279 # in the case of _POSIX_SOURCE, which is predefined and required
17280 # on some systems where configure will not decide to define it.
17281 if (defundef == "undef") {
17282 print "/*", prefix defundef, macro, "*/"
17283 next
17284 }
17285 }
17286}
17287{ print }
17288_ACAWK
17289_ACEOF
17290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017291 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017292fi # test -n "$CONFIG_HEADERS"
17293
17294
17295eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17296shift
17297for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017298do
17299 case $ac_tag in
17300 :[FHLC]) ac_mode=$ac_tag; continue;;
17301 esac
17302 case $ac_mode$ac_tag in
17303 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017304 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305 :[FH]-) ac_tag=-:-;;
17306 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17307 esac
17308 ac_save_IFS=$IFS
17309 IFS=:
17310 set x $ac_tag
17311 IFS=$ac_save_IFS
17312 shift
17313 ac_file=$1
17314 shift
17315
17316 case $ac_mode in
17317 :L) ac_source=$1;;
17318 :[FH])
17319 ac_file_inputs=
17320 for ac_f
17321 do
17322 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017323 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017324 *) # Look for the file first in the build tree, then in the source tree
17325 # (if the path is not absolute). The absolute path cannot be DOS-style,
17326 # because $ac_f cannot contain `:'.
17327 test -f "$ac_f" ||
17328 case $ac_f in
17329 [\\/$]*) false;;
17330 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17331 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017332 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017334 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17335 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336 done
17337
17338 # Let's still pretend it is `configure' which instantiates (i.e., don't
17339 # use $as_me), people would be surprised to read:
17340 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017341 configure_input='Generated from '`
17342 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17343 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017344 if test x"$ac_file" != x-; then
17345 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017346 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17347$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017348 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017349 # Neutralize special characters interpreted by sed in replacement strings.
17350 case $configure_input in #(
17351 *\&* | *\|* | *\\* )
17352 ac_sed_conf_input=`$as_echo "$configure_input" |
17353 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17354 *) ac_sed_conf_input=$configure_input;;
17355 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356
17357 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017358 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17359 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017360 esac
17361 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017362 esac
17363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017364 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017365$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017366 X"$ac_file" : 'X\(//\)[^/]' \| \
17367 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017369$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017370 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17371 s//\1/
17372 q
17373 }
17374 /^X\(\/\/\)[^/].*/{
17375 s//\1/
17376 q
17377 }
17378 /^X\(\/\/\)$/{
17379 s//\1/
17380 q
17381 }
17382 /^X\(\/\).*/{
17383 s//\1/
17384 q
17385 }
17386 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017387 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017388 ac_builddir=.
17389
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017390case "$ac_dir" in
17391.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17392*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017393 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017395 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396 case $ac_top_builddir_sub in
17397 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17398 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17399 esac ;;
17400esac
17401ac_abs_top_builddir=$ac_pwd
17402ac_abs_builddir=$ac_pwd$ac_dir_suffix
17403# for backward compatibility:
17404ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017405
17406case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017407 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017408 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409 ac_top_srcdir=$ac_top_builddir_sub
17410 ac_abs_top_srcdir=$ac_pwd ;;
17411 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017413 ac_top_srcdir=$srcdir
17414 ac_abs_top_srcdir=$srcdir ;;
17415 *) # Relative name.
17416 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17417 ac_top_srcdir=$ac_top_build_prefix$srcdir
17418 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017419esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017420ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017421
Martin v. Löwis11437992002-04-12 09:54:03 +000017422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017423 case $ac_mode in
17424 :F)
17425 #
17426 # CONFIG_FILE
17427 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017428
17429 case $INSTALL in
17430 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017432 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017433 ac_MKDIR_P=$MKDIR_P
17434 case $MKDIR_P in
17435 [\\/$]* | ?:[\\/]* ) ;;
17436 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17437 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017438_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439
Matthias Kloseb9621712010-04-24 17:59:49 +000017440cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017441# If the template does not know about datarootdir, expand it.
17442# FIXME: This hack should be removed a few years after 2.60.
17443ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017444ac_sed_dataroot='
17445/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017446 p
17447 q
17448}
17449/@datadir@/p
17450/@docdir@/p
17451/@infodir@/p
17452/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017453/@mandir@/p'
17454case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455*datarootdir*) ac_datarootdir_seen=yes;;
17456*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017457 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17458$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017460cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461 ac_datarootdir_hack='
17462 s&@datadir@&$datadir&g
17463 s&@docdir@&$docdir&g
17464 s&@infodir@&$infodir&g
17465 s&@localedir@&$localedir&g
17466 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017467 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017468esac
17469_ACEOF
17470
17471# Neutralize VPATH when `$srcdir' = `.'.
17472# Shell code in configure.ac might set extrasub.
17473# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017474cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17475ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017476$extrasub
17477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017478cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017479:t
17480/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017481s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017482s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017483s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017484s&@srcdir@&$ac_srcdir&;t t
17485s&@abs_srcdir@&$ac_abs_srcdir&;t t
17486s&@top_srcdir@&$ac_top_srcdir&;t t
17487s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17488s&@builddir@&$ac_builddir&;t t
17489s&@abs_builddir@&$ac_abs_builddir&;t t
17490s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17491s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017492s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017493$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017494"
Victor Stinnere0be4232011-10-25 13:06:09 +020017495eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17496 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017498test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017499 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17500 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17501 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017502 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017503which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017504$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017505which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017506
Victor Stinnere0be4232011-10-25 13:06:09 +020017507 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017508 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017509 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17510 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017511 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017512 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017513 ;;
17514 :H)
17515 #
17516 # CONFIG_HEADER
17517 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017518 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017519 {
17520 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017521 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17522 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017523 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017524 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017525 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17526$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017527 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017528 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017529 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017530 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017531 fi
17532 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017533 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017534 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017535 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017536 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539
17540 esac
17541
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017542
17543 case $ac_file$ac_mode in
17544 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17545
17546 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017547done # for ac_tag
17548
Guido van Rossum627b2d71993-12-24 10:39:16 +000017549
Matthias Kloseb9621712010-04-24 17:59:49 +000017550as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017551_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017552ac_clean_files=$ac_clean_files_save
17553
Matthias Kloseb9621712010-04-24 17:59:49 +000017554test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017555 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017556
Martin v. Löwis11437992002-04-12 09:54:03 +000017557
17558# configure is writing to config.log, and then calls config.status.
17559# config.status does its own redirection, appending to config.log.
17560# Unfortunately, on DOS this fails, as config.log is still kept open
17561# by configure, so config.status won't be able to write to it; its
17562# output is simply discarded. So we exec the FD to /dev/null,
17563# effectively closing config.log, so it can be properly (re)opened and
17564# appended to by config.status. When coming back to configure, we
17565# need to make the FD available again.
17566if test "$no_create" != yes; then
17567 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017568 ac_config_status_args=
17569 test "$silent" = yes &&
17570 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017571 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017572 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017573 exec 5>>config.log
17574 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17575 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017576 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017577fi
17578if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17579 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17580$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017581fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017582
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017583
Christian Heimes75ed8902013-11-20 01:11:18 +010017584echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017585if test ! -f Modules/Setup
17586then
17587 cp $srcdir/Modules/Setup.dist Modules/Setup
17588fi
17589
Christian Heimes75ed8902013-11-20 01:11:18 +010017590echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017591if test ! -f Modules/Setup.local
17592then
17593 echo "# Edit this file for local setup changes" >Modules/Setup.local
17594fi
17595
Christian Heimes75ed8902013-11-20 01:11:18 +010017596echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017597$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17598 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017599 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017600mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017601
17602if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17603 echo "" >&6
17604 echo "" >&6
17605 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
17606 echo "please run ./configure --with-optimizations" >&6
17607 echo "" >&6
17608 echo "" >&6
17609fi
17610