blob: 3e89bfabc3a519ae13a83e35eed97e7322b2b6e2 [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.
Ned Deily4829bc62016-09-12 17:29:04 -04003# Generated by GNU Autoconf 2.69 for python 3.7.
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'
Ned Deily4829bc62016-09-12 17:29:04 -0400583PACKAGE_VERSION='3.7'
584PACKAGE_STRING='python 3.7'
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
Łukasz Langaa785c872016-09-09 17:37:37 -0700645DTRACE_OBJS
646DTRACE_HEADERS
647DFLAGS
648DTRACE
Matthias Kloseb9621712010-04-24 17:59:49 +0000649THREADOBJ
650LDLAST
651USE_THREAD_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700652TCLTK_LIBS
653TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000654LIBFFI_INCLUDEDIR
Victor Stinner8291b5e2015-03-20 16:03:14 +0100655PKG_CONFIG_LIBDIR
656PKG_CONFIG_PATH
657PKG_CONFIG
Matthias Kloseb9621712010-04-24 17:59:49 +0000658SHLIBS
659CFLAGSFORSHARED
660LINKFORSHARED
661CCSHARED
662BLDSHARED
663LDCXXSHARED
664LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700665SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000666LIBTOOL_CRUFT
667OTHER_LIBTOOL_OPT
668UNIVERSAL_ARCH_FLAGS
Benjamin Petersonacb8c522014-08-09 20:01:49 -0700669CFLAGS_NODIST
Matthias Kloseb9621712010-04-24 17:59:49 +0000670BASECFLAGS
Victor Stinner826f83f2017-04-28 15:07:10 +0200671CFLAGS_ALIASING
Matthias Kloseb9621712010-04-24 17:59:49 +0000672OPT
Brett Cannon7188a3e2015-09-18 15:13:44 -0700673LLVM_PROF_FOUND
Gregory P. Smith799520c2016-09-07 16:10:00 -0700674target_os
675target_vendor
676target_cpu
677target
678LLVM_PROFDATA
Brett Cannon7188a3e2015-09-18 15:13:44 -0700679LLVM_PROF_ERR
680LLVM_PROF_FILE
681LLVM_PROF_MERGER
682PGO_PROF_USE_FLAG
683PGO_PROF_GEN_FLAG
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700684LTOFLAGS
Brett Cannon63d98bc2016-09-06 17:12:40 -0700685DEF_MAKE_RULE
686DEF_MAKE_ALL_RULE
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000687ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000688LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100689MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000690INSTALL_DATA
691INSTALL_SCRIPT
692INSTALL_PROGRAM
doko@ubuntu.com58844492012-06-30 18:25:32 +0200693ac_ct_READELF
694READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000695ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000697AR
698RANLIB
699GNULD
700LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000701LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000702RUNSHARED
703INSTSONAME
704LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000705PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000706BLDLIBRARY
707DLLLIBRARY
708LDLIBRARY
709LIBRARY
710BUILDEXEEXT
711EGREP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200712NO_AS_NEEDED
doko@ubuntu.com55532312016-06-14 08:55:19 +0200713MULTIARCH_CPPFLAGS
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200714PLATFORM_TRIPLET
715MULTIARCH
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200716ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000717MAINCC
718CXX
Łukasz Langaa785c872016-09-09 17:37:37 -0700719SED
doko@ubuntu.comd3899c12015-04-15 20:23:14 +0200720GREP
721CPP
Matthias Kloseb9621712010-04-24 17:59:49 +0000722OBJEXT
723EXEEXT
724ac_ct_CC
725CPPFLAGS
726LDFLAGS
727CFLAGS
728CC
729EXPORT_MACOSX_DEPLOYMENT_TARGET
730CONFIGURE_MACOSX_DEPLOYMENT_TARGET
731SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200732_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000733MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000734FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000735FRAMEWORKUNIXTOOLSPREFIX
Ned Deilyb8f944f2013-11-21 22:42:25 -0800736FRAMEWORKPYTHONW
Matthias Kloseb9621712010-04-24 17:59:49 +0000737FRAMEWORKALTINSTALLLAST
738FRAMEWORKALTINSTALLFIRST
739FRAMEWORKINSTALLLAST
740FRAMEWORKINSTALLFIRST
741PYTHONFRAMEWORKINSTALLDIR
742PYTHONFRAMEWORKPREFIX
743PYTHONFRAMEWORKDIR
744PYTHONFRAMEWORKIDENTIFIER
745PYTHONFRAMEWORK
746LIPO_32BIT_FLAGS
747ARCH_RUN_32BIT
748UNIVERSALSDK
749CONFIG_ARGS
750SOVERSION
751VERSION
Martin Panter43a94a72016-07-29 05:52:32 +0000752GENERATED_COMMENT
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200753PYTHON_FOR_BUILD
Xavier de Gayefd0d5932016-07-26 12:48:08 +0200754PYTHON_FOR_GEN
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100755host_os
756host_vendor
757host_cpu
758host
759build_os
760build_vendor
761build_cpu
762build
Ned Deily5c4b0d02017-03-04 00:19:55 -0500763HAS_GIT
764GITBRANCH
765GITTAG
766GITVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400767BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000768target_alias
769host_alias
770build_alias
771LIBS
772ECHO_T
773ECHO_N
774ECHO_C
775DEFS
776mandir
777localedir
778libdir
779psdir
780pdfdir
781dvidir
782htmldir
783infodir
784docdir
785oldincludedir
786includedir
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700787runstatedir
Matthias Kloseb9621712010-04-24 17:59:49 +0000788localstatedir
789sharedstatedir
790sysconfdir
791datadir
792datarootdir
793libexecdir
794sbindir
795bindir
796program_transform_name
797prefix
798exec_prefix
799PACKAGE_URL
800PACKAGE_BUGREPORT
801PACKAGE_STRING
802PACKAGE_VERSION
803PACKAGE_TARNAME
804PACKAGE_NAME
805PATH_SEPARATOR
806SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000807ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000808ac_user_opts='
809enable_option_checking
810enable_universalsdk
811with_universal_archs
812with_framework_name
813enable_framework
814with_gcc
Zachary Ware5af85642015-12-21 12:09:17 -0600815with_icc
Matthias Kloseb9621712010-04-24 17:59:49 +0000816with_cxx_main
817with_suffix
818enable_shared
819enable_profiling
820with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +0000821enable_optimizations
Gregory P. Smithd82da9f2016-04-15 16:57:04 -0700822with_lto
Christian Heimes985ecdc2013-11-20 11:46:18 +0100823with_hash_algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +0100824with_address_sanitizer
Matthias Kloseb9621712010-04-24 17:59:49 +0000825with_libs
826with_system_expat
827with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100828with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000829enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700830with_tcltk_includes
831with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000832with_dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +0000833with_threads
834with_thread
835enable_ipv6
836with_doc_strings
Matthias Kloseb9621712010-04-24 17:59:49 +0000837with_pymalloc
838with_valgrind
Łukasz Langaa785c872016-09-09 17:37:37 -0700839with_dtrace
Matthias Kloseb9621712010-04-24 17:59:49 +0000840with_fpectl
841with_libm
842with_libc
843enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000844with_computed_gotos
Ned Deily322f5ba2013-11-21 23:01:59 -0800845with_ensurepip
Matthias Kloseb9621712010-04-24 17:59:49 +0000846'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000847 ac_precious_vars='build_alias
848host_alias
849target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100850MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000851CC
852CFLAGS
853LDFLAGS
854LIBS
855CPPFLAGS
Victor Stinner8291b5e2015-03-20 16:03:14 +0100856CPP
857PKG_CONFIG
858PKG_CONFIG_PATH
859PKG_CONFIG_LIBDIR'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000863ac_init_help=
864ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000865ac_unrecognized_opts=
866ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867# The variables have the same names as the options, with
868# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000869cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000872no_recursion=
873prefix=NONE
874program_prefix=NONE
875program_suffix=NONE
876program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000878site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000880verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881x_includes=NONE
882x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000883
884# Installation directory options.
885# These are left unexpanded so users can "make install exec_prefix=/foo"
886# and all the variables that are supposed to be based on exec_prefix
887# by default will actually change.
888# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890bindir='${exec_prefix}/bin'
891sbindir='${exec_prefix}/sbin'
892libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893datarootdir='${prefix}/share'
894datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895sysconfdir='${prefix}/etc'
896sharedstatedir='${prefix}/com'
897localstatedir='${prefix}/var'
Benjamin Petersone4f961b2017-04-14 09:36:45 -0700898runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899includedir='${prefix}/include'
900oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000901docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
902infodir='${datarootdir}/info'
903htmldir='${docdir}'
904dvidir='${docdir}'
905pdfdir='${docdir}'
906psdir='${docdir}'
907libdir='${exec_prefix}/lib'
908localedir='${datarootdir}/locale'
909mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910
Guido van Rossum7f43da71994-08-01 12:15:30 +0000911ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000914do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000915 # If the previous option needs an argument, assign it.
916 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918 ac_prev=
919 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000920 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200923 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
924 *=) ac_optarg= ;;
925 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000926 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Accept the important Cygnus configure options, so we can diagnose typos.
929
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000930 case $ac_dashdash$ac_option in
931 --)
932 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934 -bindir | --bindir | --bindi | --bind | --bin | --bi)
935 ac_prev=bindir ;;
936 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938
939 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000942 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000943
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 -cache-file | --cache-file | --cache-fil | --cache-fi \
945 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
946 ac_prev=cache_file ;;
947 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
948 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000949 cache_file=$ac_optarg ;;
950
951 --config-cache | -C)
952 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000953
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000954 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000956 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000958
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000959 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
960 | --dataroo | --dataro | --datar)
961 ac_prev=datarootdir ;;
962 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
963 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
964 datarootdir=$ac_optarg ;;
965
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000967 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000969 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200970 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000971 ac_useropt_orig=$ac_useropt
972 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
973 case $ac_user_opts in
974 *"
975"enable_$ac_useropt"
976"*) ;;
977 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
978 ac_unrecognized_sep=', ';;
979 esac
980 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000981
982 -docdir | --docdir | --docdi | --doc | --do)
983 ac_prev=docdir ;;
984 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
985 docdir=$ac_optarg ;;
986
987 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
988 ac_prev=dvidir ;;
989 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
990 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000993 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000995 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200996 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000997 ac_useropt_orig=$ac_useropt
998 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
999 case $ac_user_opts in
1000 *"
1001"enable_$ac_useropt"
1002"*) ;;
1003 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1004 ac_unrecognized_sep=', ';;
1005 esac
1006 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1009 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1010 | --exec | --exe | --ex)
1011 ac_prev=exec_prefix ;;
1012 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1013 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1014 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001016
1017 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --with-gas.
1019 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 -help | --help | --hel | --he | -h)
1022 ac_init_help=long ;;
1023 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1024 ac_init_help=recursive ;;
1025 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1026 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027
1028 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001029 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001030 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1034 ac_prev=htmldir ;;
1035 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1036 | --ht=*)
1037 htmldir=$ac_optarg ;;
1038
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039 -includedir | --includedir | --includedi | --included | --include \
1040 | --includ | --inclu | --incl | --inc)
1041 ac_prev=includedir ;;
1042 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1043 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
1046 -infodir | --infodir | --infodi | --infod | --info | --inf)
1047 ac_prev=infodir ;;
1048 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -libdir | --libdir | --libdi | --libd)
1052 ac_prev=libdir ;;
1053 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1057 | --libexe | --libex | --libe)
1058 ac_prev=libexecdir ;;
1059 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1060 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001063 -localedir | --localedir | --localedi | --localed | --locale)
1064 ac_prev=localedir ;;
1065 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1066 localedir=$ac_optarg ;;
1067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001069 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001070 ac_prev=localstatedir ;;
1071 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001072 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001073 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001074
1075 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1076 ac_prev=mandir ;;
1077 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001079
Guido van Rossum7f43da71994-08-01 12:15:30 +00001080 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001081 # Obsolete; use --without-fp.
1082 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086 no_create=yes ;;
1087
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001088 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1089 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1090 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1093 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1094 | --oldin | --oldi | --old | --ol | --o)
1095 ac_prev=oldincludedir ;;
1096 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1097 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1098 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001100
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1102 ac_prev=prefix ;;
1103 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001104 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105
1106 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1107 | --program-pre | --program-pr | --program-p)
1108 ac_prev=program_prefix ;;
1109 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1110 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
1113 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1114 | --program-suf | --program-su | --program-s)
1115 ac_prev=program_suffix ;;
1116 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1117 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
1120 -program-transform-name | --program-transform-name \
1121 | --program-transform-nam | --program-transform-na \
1122 | --program-transform-n | --program-transform- \
1123 | --program-transform | --program-transfor \
1124 | --program-transfo | --program-transf \
1125 | --program-trans | --program-tran \
1126 | --progr-tra | --program-tr | --program-t)
1127 ac_prev=program_transform_name ;;
1128 -program-transform-name=* | --program-transform-name=* \
1129 | --program-transform-nam=* | --program-transform-na=* \
1130 | --program-transform-n=* | --program-transform-=* \
1131 | --program-transform=* | --program-transfor=* \
1132 | --program-transfo=* | --program-transf=* \
1133 | --program-trans=* | --program-tran=* \
1134 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001137 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1138 ac_prev=pdfdir ;;
1139 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1140 pdfdir=$ac_optarg ;;
1141
1142 -psdir | --psdir | --psdi | --psd | --ps)
1143 ac_prev=psdir ;;
1144 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1145 psdir=$ac_optarg ;;
1146
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1148 | -silent | --silent | --silen | --sile | --sil)
1149 silent=yes ;;
1150
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001151 -runstatedir | --runstatedir | --runstatedi | --runstated \
1152 | --runstate | --runstat | --runsta | --runst | --runs \
1153 | --run | --ru | --r)
1154 ac_prev=runstatedir ;;
1155 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1156 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1157 | --run=* | --ru=* | --r=*)
1158 runstatedir=$ac_optarg ;;
1159
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1161 ac_prev=sbindir ;;
1162 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1163 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001165
1166 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1167 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1168 | --sharedst | --shareds | --shared | --share | --shar \
1169 | --sha | --sh)
1170 ac_prev=sharedstatedir ;;
1171 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1172 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1173 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1174 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001177 -site | --site | --sit)
1178 ac_prev=site ;;
1179 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001181
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1183 ac_prev=srcdir ;;
1184 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001186
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001187 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1188 | --syscon | --sysco | --sysc | --sys | --sy)
1189 ac_prev=sysconfdir ;;
1190 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1191 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001192 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001193
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1200 verbose=yes ;;
1201
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 -version | --version | --versio | --versi | --vers | -V)
1203 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001206 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001207 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001208 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001209 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001210 ac_useropt_orig=$ac_useropt
1211 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1212 case $ac_user_opts in
1213 *"
1214"with_$ac_useropt"
1215"*) ;;
1216 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1217 ac_unrecognized_sep=', ';;
1218 esac
1219 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220
1221 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001223 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001225 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 ac_useropt_orig=$ac_useropt
1227 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1228 case $ac_user_opts in
1229 *"
1230"with_$ac_useropt"
1231"*) ;;
1232 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1233 ac_unrecognized_sep=', ';;
1234 esac
1235 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001236
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001237 --x)
1238 # Obsolete; use --with-x.
1239 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240
1241 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1242 | --x-incl | --x-inc | --x-in | --x-i)
1243 ac_prev=x_includes ;;
1244 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1245 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001246 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247
1248 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1249 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1250 ac_prev=x_libraries ;;
1251 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1252 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001254
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001255 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1256Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 ;;
1258
Martin v. Löwis11437992002-04-12 09:54:03 +00001259 *=*)
1260 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1261 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001262 case $ac_envvar in #(
1263 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001264 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001265 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001266 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001267 export $ac_envvar ;;
1268
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001269 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001271 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001272 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001273 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001274 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001275 ;;
1276
1277 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001278done
1279
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001282 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283fi
1284
Matthias Kloseb9621712010-04-24 17:59:49 +00001285if test -n "$ac_unrecognized_opts"; then
1286 case $enable_option_checking in
1287 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001289 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1290 esac
1291fi
1292
1293# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001294for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1295 datadir sysconfdir sharedstatedir localstatedir includedir \
1296 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001297 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001298do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001300 # Remove trailing slashes.
1301 case $ac_val in
1302 */ )
1303 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1304 eval $ac_var=\$ac_val;;
1305 esac
1306 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001307 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001308 [\\/$]* | ?:[\\/]* ) continue;;
1309 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001310 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001311 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001312done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314# There might be people who depend on the old broken behavior: `$host'
1315# used to hold the argument of --host etc.
1316# FIXME: To remove some day.
1317build=$build_alias
1318host=$host_alias
1319target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320
Martin v. Löwis11437992002-04-12 09:54:03 +00001321# FIXME: To remove some day.
1322if test "x$host_alias" != x; then
1323 if test "x$build_alias" = x; then
1324 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001325 elif test "x$build_alias" != "x$host_alias"; then
1326 cross_compiling=yes
1327 fi
1328fi
1329
1330ac_tool_prefix=
1331test -n "$host_alias" && ac_tool_prefix=$host_alias-
1332
1333test "$silent" = yes && exec 6>/dev/null
1334
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336ac_pwd=`pwd` && test -n "$ac_pwd" &&
1337ac_ls_di=`ls -di .` &&
1338ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342
1343
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344# Find the source files, if location was not specified.
1345if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001346 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001347 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001348 ac_confdir=`$as_dirname -- "$as_myself" ||
1349$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1350 X"$as_myself" : 'X\(//\)[^/]' \| \
1351 X"$as_myself" : 'X\(//\)$' \| \
1352 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1353$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001354 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1355 s//\1/
1356 q
1357 }
1358 /^X\(\/\/\)[^/].*/{
1359 s//\1/
1360 q
1361 }
1362 /^X\(\/\/\)$/{
1363 s//\1/
1364 q
1365 }
1366 /^X\(\/\).*/{
1367 s//\1/
1368 q
1369 }
1370 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001372 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373 srcdir=..
1374 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001375else
1376 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001378if test ! -r "$srcdir/$ac_unique_file"; then
1379 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001380 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001382ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1383ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001384 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001385 pwd)`
1386# When building in place, set srcdir=.
1387if test "$ac_abs_confdir" = "$ac_pwd"; then
1388 srcdir=.
1389fi
1390# Remove unnecessary trailing slashes from srcdir.
1391# Double slashes in file names in object file debugging info
1392# mess up M-x gdb in Emacs.
1393case $srcdir in
1394*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1395esac
1396for ac_var in $ac_precious_vars; do
1397 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1398 eval ac_env_${ac_var}_value=\$${ac_var}
1399 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1400 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1401done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001402
Martin v. Löwis11437992002-04-12 09:54:03 +00001403#
1404# Report the --help message.
1405#
1406if test "$ac_init_help" = "long"; then
1407 # Omit some internal or obsolete options to make the list less imposing.
1408 # This message is too long to be a string in the A/UX 3.1 sh.
1409 cat <<_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001410\`configure' configures python 3.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001411
1412Usage: $0 [OPTION]... [VAR=VALUE]...
1413
1414To assign environment variables (e.g., CC, CFLAGS...), specify them as
1415VAR=VALUE. See below for descriptions of some of the useful variables.
1416
1417Defaults for the options are specified in brackets.
1418
1419Configuration:
1420 -h, --help display this help and exit
1421 --help=short display options specific to this package
1422 --help=recursive display the short help of all the included packages
1423 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001424 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001425 --cache-file=FILE cache test results in FILE [disabled]
1426 -C, --config-cache alias for \`--cache-file=config.cache'
1427 -n, --no-create do not create output files
1428 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1429
Martin v. Löwis11437992002-04-12 09:54:03 +00001430Installation directories:
1431 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001432 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001433 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001434 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001435
1436By default, \`make install' will install all the files in
1437\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1438an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1439for instance \`--prefix=\$HOME'.
1440
1441For better control, use the options below.
1442
1443Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001444 --bindir=DIR user executables [EPREFIX/bin]
1445 --sbindir=DIR system admin executables [EPREFIX/sbin]
1446 --libexecdir=DIR program executables [EPREFIX/libexec]
1447 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1448 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1449 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Petersone4f961b2017-04-14 09:36:45 -07001450 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 --libdir=DIR object code libraries [EPREFIX/lib]
1452 --includedir=DIR C header files [PREFIX/include]
1453 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1454 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1455 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1456 --infodir=DIR info documentation [DATAROOTDIR/info]
1457 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1458 --mandir=DIR man documentation [DATAROOTDIR/man]
1459 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1460 --htmldir=DIR html documentation [DOCDIR]
1461 --dvidir=DIR dvi documentation [DOCDIR]
1462 --pdfdir=DIR pdf documentation [DOCDIR]
1463 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001464_ACEOF
1465
1466 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001467
1468System types:
1469 --build=BUILD configure for building on BUILD [guessed]
1470 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Gregory P. Smith799520c2016-09-07 16:10:00 -07001471 --target=TARGET configure for building compilers for TARGET [HOST]
Martin v. Löwis11437992002-04-12 09:54:03 +00001472_ACEOF
1473fi
1474
1475if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001476 case $ac_init_help in
Ned Deily4829bc62016-09-12 17:29:04 -04001477 short | recursive ) echo "Configuration of python 3.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001478 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001479 cat <<\_ACEOF
1480
1481Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001482 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001483 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1484 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001485 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001486 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --enable-framework[=INSTALLDIR]
1488 Build (MacOSX|Darwin) framework
1489 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001490 --enable-profiling enable C-level code profiling
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)164eea52016-11-20 21:13:16 +00001491 --enable-optimizations Enable expensive optimizations (PGO, etc). Disabled
1492 by default.
Benjamin Peterson076ed002010-10-31 17:11:02 +00001493 --enable-loadable-sqlite-extensions
1494 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --enable-ipv6 Enable ipv6 (with ipv4) support
1496 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001497 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001498 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001499
1500Optional Packages:
1501 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1502 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001503 --with-universal-archs=ARCH
1504 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001505 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001506 --with-framework-name=FRAMEWORK
1507 specify an alternate name of the framework built
1508 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --without-gcc never use gcc
Zachary Ware5af85642015-12-21 12:09:17 -06001510 --with-icc build with icc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001511 --with-cxx-main=<compiler>
1512 compile main() and link python executable with C++
1513 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001514 --with-suffix=.exe set executable suffix
1515 --with-pydebug build with Py_DEBUG defined
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07001516 --with-lto Enable Link Time Optimization in PGO builds.
1517 Disabled by default.
Christian Heimes985ecdc2013-11-20 11:46:18 +01001518 --with-hash-algorithm=[fnv|siphash24]
1519 select hash algorithm
Charles-François Natalid30b0222014-05-08 23:08:51 +01001520 --with-address-sanitizer
1521 enable AddressSanitizer
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001522 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001523 --with-system-expat build pyexpat module using an installed expat
1524 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001525 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001526 --with-system-libmpdec build _decimal module using an installed libmpdec
1527 library
Ned Deilyd819b932013-09-06 01:07:05 -07001528 --with-tcltk-includes='-I...'
1529 override search for Tcl and Tk include files
1530 --with-tcltk-libs='-L...'
1531 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001532 --with-dbmliborder=db1:db2:...
1533 order to check db backends for dbm. Valid value is a
1534 colon separated string with the backend names
1535 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001536 --with(out)-threads[=DIRECTORY]
1537 disable/enable thread support
1538 --with(out)-thread[=DIRECTORY]
1539 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001540 --with(out)-doc-strings disable/enable documentation strings
1541 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001542 --with-valgrind Enable Valgrind support
Łukasz Langaa785c872016-09-09 17:37:37 -07001543 --with(out)-dtrace disable/enable DTrace support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001544 --with-fpectl enable SIGFPE catching
1545 --with-libm=STRING math library
1546 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001547 --with(out)-computed-gotos
1548 Use computed gotos in evaluation loop (enabled by
1549 default on supported compilers)
Ned Deily322f5ba2013-11-21 23:01:59 -08001550 --with(out)-ensurepip=[=upgrade]
1551 "install" or "upgrade" using bundled pip
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
1553Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001554 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 CC C compiler command
1556 CFLAGS C compiler flags
1557 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1558 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001560 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001561 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001562 CPP C preprocessor
Victor Stinner8291b5e2015-03-20 16:03:14 +01001563 PKG_CONFIG path to pkg-config utility
1564 PKG_CONFIG_PATH
1565 directories to add to pkg-config's search path
1566 PKG_CONFIG_LIBDIR
1567 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001568
1569Use these variables to override the choices made by `configure' or to help
1570it to find libraries and programs with nonstandard names/locations.
1571
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001572Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001573_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001574ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001575fi
1576
1577if test "$ac_init_help" = "recursive"; then
1578 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001580 test -d "$ac_dir" ||
1581 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1582 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001583 ac_builddir=.
1584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001585case "$ac_dir" in
1586.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1587*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001588 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001590 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591 case $ac_top_builddir_sub in
1592 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1593 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1594 esac ;;
1595esac
1596ac_abs_top_builddir=$ac_pwd
1597ac_abs_builddir=$ac_pwd$ac_dir_suffix
1598# for backward compatibility:
1599ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001600
1601case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001602 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001603 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001604 ac_top_srcdir=$ac_top_builddir_sub
1605 ac_abs_top_srcdir=$ac_pwd ;;
1606 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001607 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001608 ac_top_srcdir=$srcdir
1609 ac_abs_top_srcdir=$srcdir ;;
1610 *) # Relative name.
1611 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1612 ac_top_srcdir=$ac_top_build_prefix$srcdir
1613 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001614esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001615ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001617 cd "$ac_dir" || { ac_status=$?; continue; }
1618 # Check for guested configure.
1619 if test -f "$ac_srcdir/configure.gnu"; then
1620 echo &&
1621 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1622 elif test -f "$ac_srcdir/configure"; then
1623 echo &&
1624 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001625 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001626 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001627 fi || ac_status=$?
1628 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001629 done
1630fi
1631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001632test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001633if $ac_init_version; then
1634 cat <<\_ACEOF
Ned Deily4829bc62016-09-12 17:29:04 -04001635python configure 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001636generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001637
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001638Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001639This configure script is free software; the Free Software Foundation
1640gives unlimited permission to copy, distribute and modify it.
1641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001642 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001643fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001644
1645## ------------------------ ##
1646## Autoconf initialization. ##
1647## ------------------------ ##
1648
1649# ac_fn_c_try_compile LINENO
1650# --------------------------
1651# Try to compile conftest.$ac_ext, and return whether this succeeded.
1652ac_fn_c_try_compile ()
1653{
1654 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1655 rm -f conftest.$ac_objext
1656 if { { ac_try="$ac_compile"
1657case "(($ac_try" in
1658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659 *) ac_try_echo=$ac_try;;
1660esac
1661eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662$as_echo "$ac_try_echo"; } >&5
1663 (eval "$ac_compile") 2>conftest.err
1664 ac_status=$?
1665 if test -s conftest.err; then
1666 grep -v '^ *+' conftest.err >conftest.er1
1667 cat conftest.er1 >&5
1668 mv -f conftest.er1 conftest.err
1669 fi
1670 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671 test $ac_status = 0; } && {
1672 test -z "$ac_c_werror_flag" ||
1673 test ! -s conftest.err
1674 } && test -s conftest.$ac_objext; then :
1675 ac_retval=0
1676else
1677 $as_echo "$as_me: failed program was:" >&5
1678sed 's/^/| /' conftest.$ac_ext >&5
1679
1680 ac_retval=1
1681fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001682 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001683 as_fn_set_status $ac_retval
1684
1685} # ac_fn_c_try_compile
1686
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02001687# ac_fn_c_try_cpp LINENO
1688# ----------------------
1689# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1690ac_fn_c_try_cpp ()
1691{
1692 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1693 if { { ac_try="$ac_cpp conftest.$ac_ext"
1694case "(($ac_try" in
1695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1696 *) ac_try_echo=$ac_try;;
1697esac
1698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1699$as_echo "$ac_try_echo"; } >&5
1700 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1701 ac_status=$?
1702 if test -s conftest.err; then
1703 grep -v '^ *+' conftest.err >conftest.er1
1704 cat conftest.er1 >&5
1705 mv -f conftest.er1 conftest.err
1706 fi
1707 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1708 test $ac_status = 0; } > conftest.i && {
1709 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1710 test ! -s conftest.err
1711 }; then :
1712 ac_retval=0
1713else
1714 $as_echo "$as_me: failed program was:" >&5
1715sed 's/^/| /' conftest.$ac_ext >&5
1716
1717 ac_retval=1
1718fi
1719 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1720 as_fn_set_status $ac_retval
1721
1722} # ac_fn_c_try_cpp
1723
Matthias Kloseb9621712010-04-24 17:59:49 +00001724# ac_fn_c_try_link LINENO
1725# -----------------------
1726# Try to link conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_c_try_link ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 rm -f conftest.$ac_objext conftest$ac_exeext
1731 if { { ac_try="$ac_link"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_link") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } && {
1747 test -z "$ac_c_werror_flag" ||
1748 test ! -s conftest.err
1749 } && test -s conftest$ac_exeext && {
1750 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001751 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001752 }; then :
1753 ac_retval=0
1754else
1755 $as_echo "$as_me: failed program was:" >&5
1756sed 's/^/| /' conftest.$ac_ext >&5
1757
1758 ac_retval=1
1759fi
1760 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1761 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1762 # interfere with the next link command; also delete a directory that is
1763 # left behind by Apple's compiler. We do this before executing the actions.
1764 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001766 as_fn_set_status $ac_retval
1767
1768} # ac_fn_c_try_link
1769
Matthias Kloseb9621712010-04-24 17:59:49 +00001770# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1771# -------------------------------------------------------
1772# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1773# the include files in INCLUDES and setting the cache variable VAR
1774# accordingly.
1775ac_fn_c_check_header_mongrel ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001778 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001781if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001782 $as_echo_n "(cached) " >&6
1783fi
1784eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786$as_echo "$ac_res" >&6; }
1787else
1788 # Is the header compilable?
1789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1790$as_echo_n "checking $2 usability... " >&6; }
1791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792/* end confdefs.h. */
1793$4
1794#include <$2>
1795_ACEOF
1796if ac_fn_c_try_compile "$LINENO"; then :
1797 ac_header_compiler=yes
1798else
1799 ac_header_compiler=no
1800fi
1801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1803$as_echo "$ac_header_compiler" >&6; }
1804
1805# Is the header present?
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1807$as_echo_n "checking $2 presence... " >&6; }
1808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809/* end confdefs.h. */
1810#include <$2>
1811_ACEOF
1812if ac_fn_c_try_cpp "$LINENO"; then :
1813 ac_header_preproc=yes
1814else
1815 ac_header_preproc=no
1816fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001817rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1819$as_echo "$ac_header_preproc" >&6; }
1820
1821# So? What about this header?
1822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1823 yes:no: )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1825$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1828 ;;
1829 no:yes:* )
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1831$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1833$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1835$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1837$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -07001840( $as_echo "## --------------------------------------- ##
1841## Report this to https://bugs.python.org/ ##
1842## --------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 ) | sed "s/^/$as_me: WARNING: /" >&2
1844 ;;
1845esac
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001848if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001849 $as_echo_n "(cached) " >&6
1850else
1851 eval "$3=\$ac_header_compiler"
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858
1859} # ac_fn_c_check_header_mongrel
1860
1861# ac_fn_c_try_run LINENO
1862# ----------------------
1863# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1864# that executables *can* be run.
1865ac_fn_c_try_run ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 if { { ac_try="$ac_link"
1869case "(($ac_try" in
1870 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1871 *) ac_try_echo=$ac_try;;
1872esac
1873eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1874$as_echo "$ac_try_echo"; } >&5
1875 (eval "$ac_link") 2>&5
1876 ac_status=$?
1877 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1878 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1879 { { case "(($ac_try" in
1880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1881 *) ac_try_echo=$ac_try;;
1882esac
1883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1884$as_echo "$ac_try_echo"; } >&5
1885 (eval "$ac_try") 2>&5
1886 ac_status=$?
1887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1888 test $ac_status = 0; }; }; then :
1889 ac_retval=0
1890else
1891 $as_echo "$as_me: program exited with status $ac_status" >&5
1892 $as_echo "$as_me: failed program was:" >&5
1893sed 's/^/| /' conftest.$ac_ext >&5
1894
1895 ac_retval=$ac_status
1896fi
1897 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001898 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001899 as_fn_set_status $ac_retval
1900
1901} # ac_fn_c_try_run
1902
1903# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1904# -------------------------------------------------------
1905# Tests whether HEADER exists and can be compiled using the include files in
1906# INCLUDES, setting the cache variable VAR accordingly.
1907ac_fn_c_check_header_compile ()
1908{
1909 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1911$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001912if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001913 $as_echo_n "(cached) " >&6
1914else
1915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1916/* end confdefs.h. */
1917$4
1918#include <$2>
1919_ACEOF
1920if ac_fn_c_try_compile "$LINENO"; then :
1921 eval "$3=yes"
1922else
1923 eval "$3=no"
1924fi
1925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1926fi
1927eval ac_res=\$$3
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1929$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001930 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001931
1932} # ac_fn_c_check_header_compile
1933
Matthias Kloseb9621712010-04-24 17:59:49 +00001934# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1935# -------------------------------------------
1936# Tests whether TYPE exists after having included INCLUDES, setting cache
1937# variable VAR accordingly.
1938ac_fn_c_check_type ()
1939{
1940 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1942$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001943if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001944 $as_echo_n "(cached) " >&6
1945else
1946 eval "$3=no"
1947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1948/* end confdefs.h. */
1949$4
1950int
1951main ()
1952{
1953if (sizeof ($2))
1954 return 0;
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1961/* end confdefs.h. */
1962$4
1963int
1964main ()
1965{
1966if (sizeof (($2)))
1967 return 0;
1968 ;
1969 return 0;
1970}
1971_ACEOF
1972if ac_fn_c_try_compile "$LINENO"; then :
1973
1974else
1975 eval "$3=yes"
1976fi
1977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1978fi
1979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1980fi
1981eval ac_res=\$$3
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1983$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001984 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001985
1986} # ac_fn_c_check_type
1987
Matthias Kloseb9621712010-04-24 17:59:49 +00001988# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1989# --------------------------------------------
1990# Tries to find the compile-time value of EXPR in a program that includes
1991# INCLUDES, setting VAR accordingly. Returns whether the value could be
1992# computed
1993ac_fn_c_compute_int ()
1994{
1995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1996 if test "$cross_compiling" = yes; then
1997 # Depending upon the size, compute the lo and hi bounds.
1998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1999/* end confdefs.h. */
2000$4
2001int
2002main ()
2003{
2004static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002005test_array [0] = 0;
2006return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013 ac_lo=0 ac_mid=0
2014 while :; do
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$4
2018int
2019main ()
2020{
2021static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002022test_array [0] = 0;
2023return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030 ac_hi=$ac_mid; break
2031else
2032 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2033 if test $ac_lo -le $ac_mid; then
2034 ac_lo= ac_hi=
2035 break
2036 fi
2037 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040 done
2041else
2042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2043/* end confdefs.h. */
2044$4
2045int
2046main ()
2047{
2048static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002049test_array [0] = 0;
2050return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002051
2052 ;
2053 return 0;
2054}
2055_ACEOF
2056if ac_fn_c_try_compile "$LINENO"; then :
2057 ac_hi=-1 ac_mid=-1
2058 while :; do
2059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2060/* end confdefs.h. */
2061$4
2062int
2063main ()
2064{
2065static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002066test_array [0] = 0;
2067return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002068
2069 ;
2070 return 0;
2071}
2072_ACEOF
2073if ac_fn_c_try_compile "$LINENO"; then :
2074 ac_lo=$ac_mid; break
2075else
2076 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2077 if test $ac_mid -le $ac_hi; then
2078 ac_lo= ac_hi=
2079 break
2080 fi
2081 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2082fi
2083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 done
2085else
2086 ac_lo= ac_hi=
2087fi
2088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2089fi
2090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2091# Binary search between lo and hi bounds.
2092while test "x$ac_lo" != "x$ac_hi"; do
2093 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095/* end confdefs.h. */
2096$4
2097int
2098main ()
2099{
2100static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002101test_array [0] = 0;
2102return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002103
2104 ;
2105 return 0;
2106}
2107_ACEOF
2108if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid
2110else
2111 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2112fi
2113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2114done
2115case $ac_lo in #((
2116?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2117'') ac_retval=1 ;;
2118esac
2119 else
2120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2121/* end confdefs.h. */
2122$4
2123static long int longval () { return $2; }
2124static unsigned long int ulongval () { return $2; }
2125#include <stdio.h>
2126#include <stdlib.h>
2127int
2128main ()
2129{
2130
2131 FILE *f = fopen ("conftest.val", "w");
2132 if (! f)
2133 return 1;
2134 if (($2) < 0)
2135 {
2136 long int i = longval ();
2137 if (i != ($2))
2138 return 1;
2139 fprintf (f, "%ld", i);
2140 }
2141 else
2142 {
2143 unsigned long int i = ulongval ();
2144 if (i != ($2))
2145 return 1;
2146 fprintf (f, "%lu", i);
2147 }
2148 /* Do not output a trailing newline, as this causes \r\n confusion
2149 on some platforms. */
2150 return ferror (f) || fclose (f) != 0;
2151
2152 ;
2153 return 0;
2154}
2155_ACEOF
2156if ac_fn_c_try_run "$LINENO"; then :
2157 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2158else
2159 ac_retval=1
2160fi
2161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2162 conftest.$ac_objext conftest.beam conftest.$ac_ext
2163rm -f conftest.val
2164
2165 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002166 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002167 as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_compute_int
2170
2171# ac_fn_c_check_func LINENO FUNC VAR
2172# ----------------------------------
2173# Tests whether FUNC exists, setting the cache variable VAR accordingly
2174ac_fn_c_check_func ()
2175{
2176 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2178$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002179if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002180 $as_echo_n "(cached) " >&6
2181else
2182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2183/* end confdefs.h. */
2184/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2185 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2186#define $2 innocuous_$2
2187
2188/* System header to define __stub macros and hopefully few prototypes,
2189 which can conflict with char $2 (); below.
2190 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2191 <limits.h> exists even on freestanding compilers. */
2192
2193#ifdef __STDC__
2194# include <limits.h>
2195#else
2196# include <assert.h>
2197#endif
2198
2199#undef $2
2200
2201/* Override any GCC internal prototype to avoid an error.
2202 Use char because int might match the return type of a GCC
2203 builtin and then its argument prototype would still apply. */
2204#ifdef __cplusplus
2205extern "C"
2206#endif
2207char $2 ();
2208/* The GNU C library defines this for functions which it implements
2209 to always fail with ENOSYS. Some functions are actually named
2210 something starting with __ and the normal name is an alias. */
2211#if defined __stub_$2 || defined __stub___$2
2212choke me
2213#endif
2214
2215int
2216main ()
2217{
2218return $2 ();
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223if ac_fn_c_try_link "$LINENO"; then :
2224 eval "$3=yes"
2225else
2226 eval "$3=no"
2227fi
2228rm -f core conftest.err conftest.$ac_objext \
2229 conftest$ac_exeext conftest.$ac_ext
2230fi
2231eval ac_res=\$$3
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2233$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002234 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002235
2236} # ac_fn_c_check_func
2237
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002238# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2239# ---------------------------------------------
2240# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2241# accordingly.
2242ac_fn_c_check_decl ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 as_decl_name=`echo $2|sed 's/ *(.*//'`
2246 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2248$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2249if eval \${$3+:} false; then :
2250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254$4
2255int
2256main ()
2257{
2258#ifndef $as_decl_name
2259#ifdef __cplusplus
2260 (void) $as_decl_use;
2261#else
2262 (void) $as_decl_name;
2263#endif
2264#endif
2265
2266 ;
2267 return 0;
2268}
2269_ACEOF
2270if ac_fn_c_try_compile "$LINENO"; then :
2271 eval "$3=yes"
2272else
2273 eval "$3=no"
2274fi
2275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2276fi
2277eval ac_res=\$$3
2278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2279$as_echo "$ac_res" >&6; }
2280 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2281
2282} # ac_fn_c_check_decl
2283
Matthias Kloseb9621712010-04-24 17:59:49 +00002284# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2285# ----------------------------------------------------
2286# Tries to find if the field MEMBER exists in type AGGR, after including
2287# INCLUDES, setting cache variable VAR accordingly.
2288ac_fn_c_check_member ()
2289{
2290 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2292$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002293if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002294 $as_echo_n "(cached) " >&6
2295else
2296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2297/* end confdefs.h. */
2298$5
2299int
2300main ()
2301{
2302static $2 ac_aggr;
2303if (ac_aggr.$3)
2304return 0;
2305 ;
2306 return 0;
2307}
2308_ACEOF
2309if ac_fn_c_try_compile "$LINENO"; then :
2310 eval "$4=yes"
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$5
2315int
2316main ()
2317{
2318static $2 ac_aggr;
2319if (sizeof ac_aggr.$3)
2320return 0;
2321 ;
2322 return 0;
2323}
2324_ACEOF
2325if ac_fn_c_try_compile "$LINENO"; then :
2326 eval "$4=yes"
2327else
2328 eval "$4=no"
2329fi
2330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$4
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002338
2339} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002340cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002341This file contains any messages produced by compilers while
2342running configure, to aid debugging if configure makes a mistake.
2343
Ned Deily4829bc62016-09-12 17:29:04 -04002344It was created by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002345generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002346
2347 $ $0 $@
2348
2349_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002350exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002351{
2352cat <<_ASUNAME
2353## --------- ##
2354## Platform. ##
2355## --------- ##
2356
2357hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2358uname -m = `(uname -m) 2>/dev/null || echo unknown`
2359uname -r = `(uname -r) 2>/dev/null || echo unknown`
2360uname -s = `(uname -s) 2>/dev/null || echo unknown`
2361uname -v = `(uname -v) 2>/dev/null || echo unknown`
2362
2363/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2364/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2365
2366/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2367/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2368/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002369/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002370/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2371/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2372/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2373
2374_ASUNAME
2375
2376as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2377for as_dir in $PATH
2378do
2379 IFS=$as_save_IFS
2380 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002381 $as_echo "PATH: $as_dir"
2382 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002384
2385} >&5
2386
2387cat >&5 <<_ACEOF
2388
2389
2390## ----------- ##
2391## Core tests. ##
2392## ----------- ##
2393
2394_ACEOF
2395
2396
2397# Keep a trace of the command line.
2398# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002399# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002400# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002401# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002403ac_configure_args0=
2404ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002405ac_must_keep_next=false
2406for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002407do
Skip Montanaro6dead952003-09-25 14:50:04 +00002408 for ac_arg
2409 do
2410 case $ac_arg in
2411 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2412 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2413 | -silent | --silent | --silen | --sile | --sil)
2414 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002415 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002416 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002417 esac
2418 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002419 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002420 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002421 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002422 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002423 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002424 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002425 case $ac_arg in
2426 *=* | --config-cache | -C | -disable-* | --disable-* \
2427 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2428 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2429 | -with-* | --with-* | -without-* | --without-* | --x)
2430 case "$ac_configure_args0 " in
2431 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2432 esac
2433 ;;
2434 -* ) ac_must_keep_next=true ;;
2435 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002437 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002438 ;;
2439 esac
2440 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002441done
Matthias Kloseb9621712010-04-24 17:59:49 +00002442{ ac_configure_args0=; unset ac_configure_args0;}
2443{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445# When interrupted or exit'd, cleanup temporary files, and complete
2446# config.log. We remove comments because anyway the quotes in there
2447# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002448# WARNING: Use '\'' to represent an apostrophe within the trap.
2449# 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 +00002450trap 'exit_status=$?
2451 # Save into config.log some information that might help in debugging.
2452 {
2453 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002454
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002455 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002456## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002457## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002458 echo
2459 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460(
2461 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2462 eval ac_val=\$$ac_var
2463 case $ac_val in #(
2464 *${as_nl}*)
2465 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002466 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2467$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468 esac
2469 case $ac_var in #(
2470 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002471 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2472 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002473 esac ;;
2474 esac
2475 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002476 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002477 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2478 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 "s/'\''/'\''\\\\'\'''\''/g;
2481 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2482 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002483 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002485 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002486 esac |
2487 sort
2488)
Martin v. Löwis11437992002-04-12 09:54:03 +00002489 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002490
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002491 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002492## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002493## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 echo
2495 for ac_var in $ac_subst_vars
2496 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002497 eval ac_val=\$$ac_var
2498 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002499 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002501 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002502 done | sort
2503 echo
2504
2505 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002506 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002508## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002509 echo
2510 for ac_var in $ac_subst_files
2511 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002512 eval ac_val=\$$ac_var
2513 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002514 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002515 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002516 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 done | sort
2518 echo
2519 fi
2520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002522 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002523## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002524## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002525 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002526 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002527 echo
2528 fi
2529 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002530 $as_echo "$as_me: caught signal $ac_signal"
2531 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002532 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 rm -f core *.core core.conftest.* &&
2534 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002537for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002538 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002539done
2540ac_signal=0
2541
2542# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002544
Matthias Kloseb9621712010-04-24 17:59:49 +00002545$as_echo "/* confdefs.h */" > confdefs.h
2546
Martin v. Löwis11437992002-04-12 09:54:03 +00002547# Predefined preprocessor variables.
2548
2549cat >>confdefs.h <<_ACEOF
2550#define PACKAGE_NAME "$PACKAGE_NAME"
2551_ACEOF
2552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553cat >>confdefs.h <<_ACEOF
2554#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2555_ACEOF
2556
Martin v. Löwis11437992002-04-12 09:54:03 +00002557cat >>confdefs.h <<_ACEOF
2558#define PACKAGE_VERSION "$PACKAGE_VERSION"
2559_ACEOF
2560
Martin v. Löwis11437992002-04-12 09:54:03 +00002561cat >>confdefs.h <<_ACEOF
2562#define PACKAGE_STRING "$PACKAGE_STRING"
2563_ACEOF
2564
Martin v. Löwis11437992002-04-12 09:54:03 +00002565cat >>confdefs.h <<_ACEOF
2566#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2567_ACEOF
2568
Matthias Kloseb9621712010-04-24 17:59:49 +00002569cat >>confdefs.h <<_ACEOF
2570#define PACKAGE_URL "$PACKAGE_URL"
2571_ACEOF
2572
Martin v. Löwis11437992002-04-12 09:54:03 +00002573
2574# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002575# Prefer an explicitly selected file to automatically selected ones.
2576ac_site_file1=NONE
2577ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002578if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579 # We do not want a PATH search for config.site.
2580 case $CONFIG_SITE in #((
2581 -*) ac_site_file1=./$CONFIG_SITE;;
2582 */*) ac_site_file1=$CONFIG_SITE;;
2583 *) ac_site_file1=./$CONFIG_SITE;;
2584 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 ac_site_file1=$prefix/share/config.site
2587 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002588else
Matthias Kloseb9621712010-04-24 17:59:49 +00002589 ac_site_file1=$ac_default_prefix/share/config.site
2590 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002592for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593do
Matthias Kloseb9621712010-04-24 17:59:49 +00002594 test "x$ac_site_file" = xNONE && continue
2595 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2597$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002598 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002599 . "$ac_site_file" \
2600 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2602as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002603See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002604 fi
2605done
2606
2607if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 # Some versions of bash will fail to source /dev/null (special files
2609 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2610 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2612$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002613 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002614 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2615 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002616 esac
2617 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002618else
Matthias Kloseb9621712010-04-24 17:59:49 +00002619 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2620$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002621 >$cache_file
2622fi
2623
2624# Check that the precious variables saved in the cache have kept the same
2625# value.
2626ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002627for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2629 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002630 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2631 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 case $ac_old_set,$ac_new_set in
2633 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002634 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2635$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 +00002636 ac_cache_corrupted=: ;;
2637 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002638 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2639$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002640 ac_cache_corrupted=: ;;
2641 ,);;
2642 *)
2643 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002644 # differences in whitespace do not lead to failure.
2645 ac_old_val_w=`echo x $ac_old_val`
2646 ac_new_val_w=`echo x $ac_new_val`
2647 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2649$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2650 ac_cache_corrupted=:
2651 else
2652 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2653$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2654 eval $ac_var=\$ac_old_val
2655 fi
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2657$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2659$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 fi;;
2661 esac
2662 # Pass precious variables to config.status.
2663 if test "$ac_new_set" = set; then
2664 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 *) ac_arg=$ac_var=$ac_new_val ;;
2667 esac
2668 case " $ac_configure_args " in
2669 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002670 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002671 esac
2672 fi
2673done
2674if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002675 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2676$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2677 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2678$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002679 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002680fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002681## -------------------- ##
2682## Main body of script. ##
2683## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684
Guido van Rossum7f43da71994-08-01 12:15:30 +00002685ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002687ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2688ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2689ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002690
Guido van Rossum627b2d71993-12-24 10:39:16 +00002691
Michael W. Hudson54241132001-12-07 15:38:26 +00002692
Trent Nelson4d4ec652012-10-16 08:51:24 -04002693
Martin Panterc5ee3ca2016-09-12 01:32:03 +00002694if test "$srcdir" != . -a "$srcdir" != "$(pwd)"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002695 # If we're building out-of-tree, we need to make sure the following
2696 # resources get picked up before their $srcdir counterparts.
2697 # Objects/ -> typeslots.inc
2698 # Include/ -> Python-ast.h, graminit.h
2699 # Python/ -> importlib.h
2700 # (A side effect of this is that these resources will automatically be
2701 # regenerated when building out-of-tree, regardless of whether or not
2702 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2703 # off.)
2704 BASECPPFLAGS="-IObjects -IInclude -IPython"
2705else
2706 BASECPPFLAGS=""
2707fi
2708
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002709
2710
2711
2712
Ned Deily5c4b0d02017-03-04 00:19:55 -05002713if test -e $srcdir/.git/HEAD
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002714then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002715# Extract the first word of "git", so it can be a program name with args.
2716set dummy git; ac_word=$2
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2718$as_echo_n "checking for $ac_word... " >&6; }
Ned Deily5c4b0d02017-03-04 00:19:55 -05002719if ${ac_cv_prog_HAS_GIT+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002720 $as_echo_n "(cached) " >&6
2721else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002722 if test -n "$HAS_GIT"; then
2723 ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test.
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002724else
2725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2726for as_dir in $PATH
2727do
2728 IFS=$as_save_IFS
2729 test -z "$as_dir" && as_dir=.
2730 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deily5c4b0d02017-03-04 00:19:55 -05002732 ac_cv_prog_HAS_GIT="found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2734 break 2
2735 fi
2736done
2737 done
2738IFS=$as_save_IFS
2739
Ned Deily5c4b0d02017-03-04 00:19:55 -05002740 test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002741fi
2742fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002743HAS_GIT=$ac_cv_prog_HAS_GIT
2744if test -n "$HAS_GIT"; then
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5
2746$as_echo "$HAS_GIT" >&6; }
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002747else
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2749$as_echo "no" >&6; }
2750fi
2751
2752
2753else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002754HAS_GIT=no-repository
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002755fi
Ned Deily5c4b0d02017-03-04 00:19:55 -05002756if test $HAS_GIT = found
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002757then
Ned Deily554626a2017-03-20 23:41:52 -04002758 GITVERSION="git -C \$(srcdir) rev-parse --short HEAD"
2759 GITTAG="git -C \$(srcdir) describe --all --always --dirty"
Ned Deily5c4b0d02017-03-04 00:19:55 -05002760 GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD"
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002761else
Ned Deily5c4b0d02017-03-04 00:19:55 -05002762 GITVERSION=""
2763 GITTAG=""
2764 GITBRANCH=""
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002765fi
2766
2767
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002768ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002769
2770
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002771ac_aux_dir=
2772for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2773 if test -f "$ac_dir/install-sh"; then
2774 ac_aux_dir=$ac_dir
2775 ac_install_sh="$ac_aux_dir/install-sh -c"
2776 break
2777 elif test -f "$ac_dir/install.sh"; then
2778 ac_aux_dir=$ac_dir
2779 ac_install_sh="$ac_aux_dir/install.sh -c"
2780 break
2781 elif test -f "$ac_dir/shtool"; then
2782 ac_aux_dir=$ac_dir
2783 ac_install_sh="$ac_aux_dir/shtool install -c"
2784 break
2785 fi
2786done
2787if test -z "$ac_aux_dir"; then
2788 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2789fi
2790
2791# These three variables are undocumented and unsupported,
2792# and are intended to be withdrawn in a future Autoconf release.
2793# They can cause serious problems if a builder's source tree is in a directory
2794# whose full name contains unusual characters.
2795ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2796ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2797ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2798
2799
2800# Make sure we can run config.sub.
2801$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2802 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2803
2804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2805$as_echo_n "checking build system type... " >&6; }
2806if ${ac_cv_build+:} false; then :
2807 $as_echo_n "(cached) " >&6
2808else
2809 ac_build_alias=$build_alias
2810test "x$ac_build_alias" = x &&
2811 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2812test "x$ac_build_alias" = x &&
2813 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2814ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2815 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2816
2817fi
2818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2819$as_echo "$ac_cv_build" >&6; }
2820case $ac_cv_build in
2821*-*-*) ;;
2822*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2823esac
2824build=$ac_cv_build
2825ac_save_IFS=$IFS; IFS='-'
2826set x $ac_cv_build
2827shift
2828build_cpu=$1
2829build_vendor=$2
2830shift; shift
2831# Remember, the first character of IFS is used to create $*,
2832# except with old shells:
2833build_os=$*
2834IFS=$ac_save_IFS
2835case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2836
2837
2838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2839$as_echo_n "checking host system type... " >&6; }
2840if ${ac_cv_host+:} false; then :
2841 $as_echo_n "(cached) " >&6
2842else
2843 if test "x$host_alias" = x; then
2844 ac_cv_host=$ac_cv_build
2845else
2846 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2847 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2848fi
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2852$as_echo "$ac_cv_host" >&6; }
2853case $ac_cv_host in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2856esac
2857host=$ac_cv_host
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_host
2860shift
2861host_cpu=$1
2862host_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866host_os=$*
2867IFS=$ac_save_IFS
2868case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2869
2870
2871
doko@python.orga10e4a92013-01-25 18:45:12 +01002872
2873
Ned Deilyfcbc2462014-08-22 13:32:49 -07002874# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2875rm -f pybuilddir.txt
2876
Xavier de Gayefd0d5932016-07-26 12:48:08 +02002877for ac_prog in python$PACKAGE_VERSION python3 python
2878do
2879 # Extract the first word of "$ac_prog", so it can be a program name with args.
2880set dummy $ac_prog; ac_word=$2
2881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2882$as_echo_n "checking for $ac_word... " >&6; }
2883if ${ac_cv_prog_PYTHON_FOR_GEN+:} false; then :
2884 $as_echo_n "(cached) " >&6
2885else
2886 if test -n "$PYTHON_FOR_GEN"; then
2887 ac_cv_prog_PYTHON_FOR_GEN="$PYTHON_FOR_GEN" # Let the user override the test.
2888else
2889as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2890for as_dir in $PATH
2891do
2892 IFS=$as_save_IFS
2893 test -z "$as_dir" && as_dir=.
2894 for ac_exec_ext in '' $ac_executable_extensions; do
2895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2896 ac_cv_prog_PYTHON_FOR_GEN="$ac_prog"
2897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2898 break 2
2899 fi
2900done
2901 done
2902IFS=$as_save_IFS
2903
2904fi
2905fi
2906PYTHON_FOR_GEN=$ac_cv_prog_PYTHON_FOR_GEN
2907if test -n "$PYTHON_FOR_GEN"; then
2908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_FOR_GEN" >&5
2909$as_echo "$PYTHON_FOR_GEN" >&6; }
2910else
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2912$as_echo "no" >&6; }
2913fi
2914
2915
2916 test -n "$PYTHON_FOR_GEN" && break
2917done
2918test -n "$PYTHON_FOR_GEN" || PYTHON_FOR_GEN="not-found"
2919
2920if test "$PYTHON_FOR_GEN" = not-found; then
2921 PYTHON_FOR_GEN='@echo "Cannot generate $@, python not found !" && \
2922 echo "To skip re-generation of $@ run <make touch> or <make -t $@>." && \
2923 echo "Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>." && false &&'
2924fi
2925
2926
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002927if test "$cross_compiling" = yes; then
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2929$as_echo_n "checking for python interpreter for cross build... " >&6; }
2930 if test -z "$PYTHON_FOR_BUILD"; then
2931 for interp in python$PACKAGE_VERSION python3 python; do
2932 which $interp >/dev/null 2>&1 || continue
Xavier de Gaye4afd1432016-07-07 18:00:22 +02002933 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 +02002934 break
2935 fi
2936 interp=
2937 done
2938 if test x$interp = x; then
2939 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2940 fi
2941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2942$as_echo "$interp" >&6; }
Xavier de Gaye92dec542016-09-11 22:22:24 +02002943 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 _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002944 fi
Martin Panter43a94a72016-07-29 05:52:32 +00002945 # Used to comment out stuff for rebuilding generated files
2946 GENERATED_COMMENT='#'
Christian Heimes954ac032012-12-12 13:10:21 +01002947elif test "$cross_compiling" = maybe; then
2948 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002949else
2950 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter43a94a72016-07-29 05:52:32 +00002951 GENERATED_COMMENT=''
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002952fi
2953
2954
Martin v. Löwis11437992002-04-12 09:54:03 +00002955
Martin Pantereac67be2016-07-28 01:28:27 +00002956
Benjamin Petersond23f8222009-04-05 19:13:16 +00002957if test "$prefix" != "/"; then
2958 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2959fi
2960
2961
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002964# We don't use PACKAGE_ variables, and they cause conflicts
2965# with other autoconf-based packages that include Python.h
2966grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2967rm confdefs.h
2968mv confdefs.h.new confdefs.h
2969
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002970
Ned Deily4829bc62016-09-12 17:29:04 -04002971VERSION=3.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002972
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002973# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974
2975SOVERSION=1.0
2976
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977# The later defininition of _XOPEN_SOURCE disables certain features
2978# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
2982
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988
2989
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2991# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995
2996
Martin v. Löwisd6320502004-08-12 13:45:08 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003001
3002
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008
3009
3010
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003011define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003013# Arguments passed to configure.
3014
3015CONFIG_ARGS="$ac_configure_args"
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3018$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003020if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003022 case $enableval in
3023 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 # Locate the best usable SDK, see Mac/README.txt for more
3025 # information
3026 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003027 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003029 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3030 if test ! -d "${enableval}"
3031 then
3032 enableval=/
3033 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 ;;
3036 esac
3037 case $enableval in
3038 no)
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041 ;;
3042 *)
3043 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 if test ! -d "${UNIVERSALSDK}"
3045 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003046 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048 ;;
3049 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003050
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052else
3053
3054 UNIVERSALSDK=
3055 enable_universalsdk=
3056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059if test -n "${UNIVERSALSDK}"
3060then
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3062$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063else
Matthias Kloseb9621712010-04-24 17:59:49 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003069
Ned Deily87adb6e2013-10-18 21:09:56 -07003070ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003071
Ned Deilycbfb9a52012-06-23 16:02:19 -07003072# For backward compatibility reasons we prefer to select '32-bit' if available,
3073# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003074UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003075if test "`uname -s`" = "Darwin"
3076then
3077 if test -n "${UNIVERSALSDK}"
3078 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003079 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003080 then
3081 UNIVERSAL_ARCHS="intel"
3082 fi
3083 fi
3084fi
3085
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003086
Matthias Kloseb9621712010-04-24 17:59:49 +00003087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3088$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003089
3090# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003091if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003092 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003093 UNIVERSAL_ARCHS="$withval"
3094
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003095fi
3096
Ned Deily87adb6e2013-10-18 21:09:56 -07003097if test -n "${UNIVERSALSDK}"
3098then
3099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3100$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3101else
3102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3103$as_echo "no" >&6; }
3104fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106
3107# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003109 withval=$with_framework_name;
3110 PYTHONFRAMEWORK=${withval}
3111 PYTHONFRAMEWORKDIR=${withval}.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3113
3114else
3115
3116 PYTHONFRAMEWORK=Python
3117 PYTHONFRAMEWORKDIR=Python.framework
3118 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3119
3120fi
3121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003123if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003125 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003126 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003127 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 esac
3129 case $enableval in
3130 no)
3131 PYTHONFRAMEWORK=
3132 PYTHONFRAMEWORKDIR=no-framework
3133 PYTHONFRAMEWORKPREFIX=
3134 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135 FRAMEWORKINSTALLFIRST=
3136 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 FRAMEWORKALTINSTALLFIRST=
3138 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003139 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 if test "x${prefix}" = "xNONE"; then
3141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3142 else
3143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3144 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003145 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003146 ;;
3147 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003148 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003149 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003150 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003151 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003152 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3153 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ned Deilyb8f944f2013-11-21 22:42:25 -08003154 FRAMEWORKPYTHONW="frameworkpythonw"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003155 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003156
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003157 if test "x${prefix}" = "xNONE" ; then
3158 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003159
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003160 else
3161 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3162 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003163
3164 case "${enableval}" in
3165 /System*)
3166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3167 if test "${prefix}" = "NONE" ; then
3168 # See below
3169 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3170 fi
3171 ;;
3172
3173 /Library*)
3174 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3175 ;;
3176
3177 */Library/Frameworks)
3178 MDIR="`dirname "${enableval}"`"
3179 MDIR="`dirname "${MDIR}"`"
3180 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3181
3182 if test "${prefix}" = "NONE"; then
3183 # User hasn't specified the
3184 # --prefix option, but wants to install
3185 # the framework in a non-default location,
3186 # ensure that the compatibility links get
3187 # installed relative to that prefix as well
3188 # instead of in /usr/local.
3189 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3190 fi
3191 ;;
3192
3193 *)
3194 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3195 ;;
3196 esac
3197
Jack Jansen127e56e2001-09-11 14:41:54 +00003198 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003200 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003204 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003205
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003206 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3207
3208 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3209
Jack Jansene578a632001-08-15 01:27:14 +00003210 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
Guido van Rossum563e7081996-09-10 18:20:48 +00003212else
Martin v. Löwis11437992002-04-12 09:54:03 +00003213
Jack Jansene578a632001-08-15 01:27:14 +00003214 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003215 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003216 PYTHONFRAMEWORKPREFIX=
3217 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003218 FRAMEWORKINSTALLFIRST=
3219 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003220 FRAMEWORKALTINSTALLFIRST=
3221 FRAMEWORKALTINSTALLLAST=
Ned Deilyb8f944f2013-11-21 22:42:25 -08003222 FRAMEWORKPYTHONW=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003223 if test "x${prefix}" = "xNONE" ; then
3224 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3225 else
3226 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3227 fi
Jack Jansene578a632001-08-15 01:27:14 +00003228 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231fi
3232
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
3234
Michael W. Hudson54241132001-12-07 15:38:26 +00003235
3236
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003240
3241
3242
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003243
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003244
Ned Deilyb8f944f2013-11-21 22:42:25 -08003245
Jack Jansene578a632001-08-15 01:27:14 +00003246##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003247## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003248## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003249##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250# Set name for machine-dependent library files
3251
Matthias Kloseb9621712010-04-24 17:59:49 +00003252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3253$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254if test -z "$MACHDEP"
3255then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003256 # avoid using uname for cross builds
3257 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003258 # ac_sys_system and ac_sys_release are used for setting
3259 # a lot of different things including 'define_xopen_source'
3260 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003261 case "$host" in
Xavier de Gaye2a352b62017-01-04 21:51:16 +01003262 *-*-linux-android*)
3263 ac_sys_system=Linux-android
3264 ;;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 *-*-linux*)
3266 ac_sys_system=Linux
3267 ;;
3268 *-*-cygwin*)
3269 ac_sys_system=Cygwin
3270 ;;
3271 *)
3272 # for now, limit cross builds to known configurations
3273 MACHDEP="unknown"
3274 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3275 esac
3276 ac_sys_release=
3277 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003278 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003279 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003280 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003281 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003282 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003283 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003284 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 fi
3286 ac_md_system=`echo $ac_sys_system |
3287 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3288 ac_md_release=`echo $ac_sys_release |
3289 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3290 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003291
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003292 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003293 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003294 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003295 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003296 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003297 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003299fi
Guido van Rossum91922671997-10-09 20:24:13 +00003300
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003301
3302if test "$cross_compiling" = yes; then
3303 case "$host" in
3304 *-*-linux*)
3305 case "$host_cpu" in
3306 arm*)
3307 _host_cpu=arm
3308 ;;
3309 *)
3310 _host_cpu=$host_cpu
3311 esac
3312 ;;
3313 *-*-cygwin*)
3314 _host_cpu=
3315 ;;
3316 *)
3317 # for now, limit cross builds to known configurations
3318 MACHDEP="unknown"
3319 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3320 esac
3321 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3322fi
3323
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003324# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3325# disable features if it is defined, without any means to access these
3326# features as extensions. For these systems, we skip the definition of
3327# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3328# some feature, make sure there is no alternative way to access this
3329# feature. Also, when using wildcards, make sure you have verified the
3330# need for not defining _XOPEN_SOURCE on all systems matching the
3331# wildcard, and that the wildcard does not include future systems
3332# (which may remove their limitations).
3333case $ac_sys_system/$ac_sys_release in
3334 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3335 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003336 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003337 # In addition, Stefan Krah confirms that issue #1244610 exists through
3338 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003339 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003340 define_xopen_source=no
3341 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3342 # also defined. This can be overridden by defining _BSD_SOURCE
3343 # As this has a different meaning on Linux, only define it on OpenBSD
3344
Matthias Kloseb9621712010-04-24 17:59:49 +00003345$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003346
3347 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003348 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003349 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3350 # also defined. This can be overridden by defining _BSD_SOURCE
3351 # As this has a different meaning on Linux, only define it on OpenBSD
3352
Matthias Kloseb9621712010-04-24 17:59:49 +00003353$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003354
3355 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003356 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3357 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3358 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003359 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 +00003360 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003361 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3362 # request to enable features supported by the standard as a request
3363 # to disable features not supported by the standard. The best way
3364 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3365 # entirely and define __EXTENSIONS__ instead.
3366 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003367 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3369 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003370 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003371 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 define_xopen_source=no;;
3373 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003374 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003375 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003376 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003377 # On FreeBSD 4, the math functions C89 does not cover are never defined
3378 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3379 FreeBSD/4.*)
3380 define_xopen_source=no;;
3381 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3382 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3383 # identifies itself as Darwin/7.*
3384 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3385 # disables platform specific features beyond repair.
3386 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3387 # has no effect, don't bother defining them
3388 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003389 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003390 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003391 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003392 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3393 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3394 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003395 AIX/4)
3396 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003397 AIX/5)
3398 if test `uname -r` -eq 1; then
3399 define_xopen_source=no
3400 fi
3401 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003402 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3403 # defining NI_NUMERICHOST.
3404 QNX/6.3.2)
3405 define_xopen_source=no
3406 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003407
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003408esac
3409
3410if test $define_xopen_source = yes
3411then
Victor Stinner14d098d2011-09-07 22:29:43 +02003412 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003413
Victor Stinner14d098d2011-09-07 22:29:43 +02003414$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003415
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
3417 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3418 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3419 # several APIs are not declared. Since this is also needed in some
3420 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003421
Matthias Kloseb9621712010-04-24 17:59:49 +00003422$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003423
3424
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003425
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003426$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003428fi
3429
Christian Heimes647cd872013-12-07 23:39:33 +01003430# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
3431case $ac_sys_system in
Christian Heimesb02bcae2013-12-08 15:21:08 +01003432 hp*|HP*)
3433 define_stdc_a1=yes;;
3434 *)
3435 define_stdc_a1=no;;
3436esac
3437
3438if test $define_stdc_a1 = yes
3439then
Christian Heimes647cd872013-12-07 23:39:33 +01003440
3441$as_echo "#define _INCLUDE__STDC_A1_SOURCE 1" >>confdefs.h
3442
Christian Heimesb02bcae2013-12-08 15:21:08 +01003443fi
Christian Heimes647cd872013-12-07 23:39:33 +01003444
Guido van Rossum91922671997-10-09 20:24:13 +00003445#
3446# SGI compilers allow the specification of the both the ABI and the
3447# ISA on the command line. Depending on the values of these switches,
Martin Panter46f50722016-05-26 05:35:26 +00003448# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003449#
3450# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3451# thus supply support for various ABI/ISA combinations. The MACHDEP
3452# variable is also adjusted.
3453#
3454
3455if test ! -z "$SGI_ABI"
3456then
3457 CC="cc $SGI_ABI"
3458 LDFLAGS="$SGI_ABI $LDFLAGS"
3459 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3460fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3462$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003463
Jack Jansen6b08a402004-06-03 12:41:45 +00003464# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3465# it may influence the way we can build extensions, so distutils
3466# needs to check it
3467
Thomas Wouters477c8d52006-05-27 19:21:47 +00003468
Jack Jansen6b08a402004-06-03 12:41:45 +00003469CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003470EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003471
Guido van Rossum627b2d71993-12-24 10:39:16 +00003472# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003473
3474# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3475# for debug/optimization stuff. BASECFLAGS is for flags that are required
3476# just to get things to compile and link. Users are free to override OPT
3477# when running configure or make. The build should not break if they do.
3478# BASECFLAGS should generally not be messed with, however.
3479
3480# XXX shouldn't some/most/all of this code be merged with the stuff later
3481# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3483$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003484
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003485# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003486if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003487 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003488 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003489 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003490 without_gcc=yes;;
3491 yes) CC=gcc
3492 without_gcc=no;;
3493 *) CC=$withval
3494 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003495 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003496else
Martin v. Löwis11437992002-04-12 09:54:03 +00003497
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003498 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003499 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003500 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003501 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003502 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003503fi
3504
Matthias Kloseb9621712010-04-24 17:59:49 +00003505{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3506$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003507
Zachary Ware5af85642015-12-21 12:09:17 -06003508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3509$as_echo_n "checking for --with-icc... " >&6; }
3510
3511# Check whether --with-icc was given.
3512if test "${with_icc+set}" = set; then :
3513 withval=$with_icc;
3514 case $withval in
3515 no) CC=${CC:-cc}
3516 with_icc=no;;
3517 yes) CC=icc
3518 CXX=icpc
3519 with_icc=yes;;
3520 *) CC=$withval
3521 with_icc=$withval;;
3522 esac
3523else
3524
3525 with_icc=no
3526fi
3527
3528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3529$as_echo "$with_icc" >&6; }
3530
Guido van Rossum8b131c51995-03-09 14:10:13 +00003531# If the user switches compilers, we can't believe the cache
3532if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3533then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003534 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003535(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003536fi
3537
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003538# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3539# when the compiler supports them, but we don't always want -O2, and
3540# we set -g later.
3541if test -z "$CFLAGS"; then
3542 CFLAGS=
3543fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003544
3545if test "$ac_sys_system" = "Darwin"
3546then
3547 # Compiler selection on MacOSX is more complicated than
3548 # AC_PROG_CC can handle, see Mac/README.txt for more
3549 # information
3550 if test -z "${CC}"
3551 then
3552 found_gcc=
3553 found_clang=
3554 as_save_IFS=$IFS; IFS=:
3555 for as_dir in $PATH
3556 do
3557 IFS=$as_save_IFS
3558 if test -x $as_dir/gcc; then
3559 if test -z "${found_gcc}"; then
3560 found_gcc=$as_dir/gcc
3561 fi
3562 fi
3563 if test -x $as_dir/clang; then
3564 if test -z "${found_clang}"; then
3565 found_clang=$as_dir/clang
3566 fi
3567 fi
3568 done
3569 IFS=$as_save_IFS
3570
3571 if test -n "$found_gcc" -a -n "$found_clang"
3572 then
3573 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3574 then
3575 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3576$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3577 CC="$found_clang"
3578 CXX="$found_clang++"
3579 fi
3580
3581
3582 elif test -z "$found_gcc" -a -n "$found_clang"
3583 then
3584 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3585$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3586 CC="$found_clang"
3587 CXX="$found_clang++"
3588
3589 elif test -z "$found_gcc" -a -z "$found_clang"
3590 then
3591 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3592 if test -n "${found_clang}"
3593 then
3594 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3595$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3596 CC="${found_clang}"
3597 CXX="`/usr/bin/xcrun -find clang++`"
3598
3599 # else: use default behaviour
3600 fi
3601 fi
3602 fi
3603fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003604ac_ext=c
3605ac_cpp='$CPP $CPPFLAGS'
3606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3608ac_compiler_gnu=$ac_cv_c_compiler_gnu
3609if test -n "$ac_tool_prefix"; then
3610 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3611set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3613$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003614if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003615 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003616else
3617 if test -n "$CC"; then
3618 ac_cv_prog_CC="$CC" # Let the user override the test.
3619else
Martin v. Löwis11437992002-04-12 09:54:03 +00003620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3621for as_dir in $PATH
3622do
3623 IFS=$as_save_IFS
3624 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003625 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003628 $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 +00003629 break 2
3630 fi
3631done
Matthias Kloseb9621712010-04-24 17:59:49 +00003632 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003633IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003634
Jack Jansendd19cf82001-12-06 22:36:17 +00003635fi
3636fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003637CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003638if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3640$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003641else
Matthias Kloseb9621712010-04-24 17:59:49 +00003642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3643$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003644fi
3645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003646
Martin v. Löwis11437992002-04-12 09:54:03 +00003647fi
3648if test -z "$ac_cv_prog_CC"; then
3649 ac_ct_CC=$CC
3650 # Extract the first word of "gcc", so it can be a program name with args.
3651set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3653$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003654if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003656else
3657 if test -n "$ac_ct_CC"; then
3658 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3659else
3660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661for as_dir in $PATH
3662do
3663 IFS=$as_save_IFS
3664 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003665 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003667 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003668 $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 +00003669 break 2
3670 fi
3671done
Matthias Kloseb9621712010-04-24 17:59:49 +00003672 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003674
3675fi
3676fi
3677ac_ct_CC=$ac_cv_prog_ac_ct_CC
3678if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3680$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003681else
Matthias Kloseb9621712010-04-24 17:59:49 +00003682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3683$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003684fi
3685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686 if test "x$ac_ct_CC" = x; then
3687 CC=""
3688 else
3689 case $cross_compiling:$ac_tool_warned in
3690yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003691{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3692$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003693ac_tool_warned=yes ;;
3694esac
3695 CC=$ac_ct_CC
3696 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003697else
3698 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003699fi
3700
Jack Jansendd19cf82001-12-06 22:36:17 +00003701if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003702 if test -n "$ac_tool_prefix"; then
3703 # 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 +00003704set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3706$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003707if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003708 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003709else
3710 if test -n "$CC"; then
3711 ac_cv_prog_CC="$CC" # Let the user override the test.
3712else
Martin v. Löwis11437992002-04-12 09:54:03 +00003713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3714for as_dir in $PATH
3715do
3716 IFS=$as_save_IFS
3717 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003718 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003719 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $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 +00003722 break 2
3723 fi
3724done
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003727
3728fi
3729fi
3730CC=$ac_cv_prog_CC
3731if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3733$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003734else
Matthias Kloseb9621712010-04-24 17:59:49 +00003735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3736$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
3738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739
Martin v. Löwis11437992002-04-12 09:54:03 +00003740 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003741fi
3742if test -z "$CC"; then
3743 # Extract the first word of "cc", so it can be a program name with args.
3744set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3746$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003747if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003748 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003749else
3750 if test -n "$CC"; then
3751 ac_cv_prog_CC="$CC" # Let the user override the test.
3752else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003753 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3755for as_dir in $PATH
3756do
3757 IFS=$as_save_IFS
3758 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003761 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3762 ac_prog_rejected=yes
3763 continue
3764 fi
3765 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003766 $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 +00003767 break 2
3768 fi
3769done
Matthias Kloseb9621712010-04-24 17:59:49 +00003770 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003772
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003773if test $ac_prog_rejected = yes; then
3774 # We found a bogon in the path, so make sure we never use it.
3775 set dummy $ac_cv_prog_CC
3776 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003778 # We chose a different compiler from the bogus one.
3779 # However, it has the same basename, so the bogon will be chosen
3780 # first if we set CC to just the basename; use the full file name.
3781 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003782 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003783 fi
3784fi
3785fi
3786fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003787CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003788if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3790$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003791else
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3793$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003794fi
3795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797fi
3798if test -z "$CC"; then
3799 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003800 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003801 do
3802 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3803set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3805$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003806if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003807 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003808else
3809 if test -n "$CC"; then
3810 ac_cv_prog_CC="$CC" # Let the user override the test.
3811else
Martin v. Löwis11437992002-04-12 09:54:03 +00003812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3813for as_dir in $PATH
3814do
3815 IFS=$as_save_IFS
3816 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003818 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003819 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003820 $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 +00003821 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003822 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003823done
Matthias Kloseb9621712010-04-24 17:59:49 +00003824 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003826
3827fi
3828fi
3829CC=$ac_cv_prog_CC
3830if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3832$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003833else
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3835$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003836fi
3837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839 test -n "$CC" && break
3840 done
3841fi
3842if test -z "$CC"; then
3843 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003845do
3846 # Extract the first word of "$ac_prog", so it can be a program name with args.
3847set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3849$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003850if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003851 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003852else
3853 if test -n "$ac_ct_CC"; then
3854 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3855else
3856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3857for as_dir in $PATH
3858do
3859 IFS=$as_save_IFS
3860 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003861 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003862 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003863 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003864 $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 +00003865 break 2
3866 fi
3867done
Matthias Kloseb9621712010-04-24 17:59:49 +00003868 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003870
Martin v. Löwis11437992002-04-12 09:54:03 +00003871fi
3872fi
3873ac_ct_CC=$ac_cv_prog_ac_ct_CC
3874if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3876$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003877else
Matthias Kloseb9621712010-04-24 17:59:49 +00003878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3879$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003880fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882
Martin v. Löwis11437992002-04-12 09:54:03 +00003883 test -n "$ac_ct_CC" && break
3884done
Michael W. Hudson54241132001-12-07 15:38:26 +00003885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886 if test "x$ac_ct_CC" = x; then
3887 CC=""
3888 else
3889 case $cross_compiling:$ac_tool_warned in
3890yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003891{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3892$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893ac_tool_warned=yes ;;
3894esac
3895 CC=$ac_ct_CC
3896 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003897fi
3898
3899fi
3900
3901
Matthias Kloseb9621712010-04-24 17:59:49 +00003902test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3903$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003904as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003905See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003906
3907# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003908$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3909set X $ac_compile
3910ac_compiler=$2
3911for ac_option in --version -v -V -qversion; do
3912 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913case "(($ac_try" in
3914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3915 *) ac_try_echo=$ac_try;;
3916esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3918$as_echo "$ac_try_echo"; } >&5
3919 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003920 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003921 if test -s conftest.err; then
3922 sed '10a\
3923... rest of stderr output deleted ...
3924 10q' conftest.err >conftest.er1
3925 cat conftest.er1 >&5
3926 fi
3927 rm -f conftest.er1 conftest.err
3928 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3929 test $ac_status = 0; }
3930done
Martin v. Löwis11437992002-04-12 09:54:03 +00003931
Matthias Kloseb9621712010-04-24 17:59:49 +00003932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003933/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003934
Martin v. Löwis11437992002-04-12 09:54:03 +00003935int
3936main ()
3937{
3938
3939 ;
3940 return 0;
3941}
3942_ACEOF
3943ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003944ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003945# Try to create an executable without -o first, disregard a.out.
3946# It will help us diagnose broken compilers, and finding out an intuition
3947# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3949$as_echo_n "checking whether the C compiler works... " >&6; }
3950ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3951
3952# The possible output files:
3953ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3954
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003955ac_rmfiles=
3956for ac_file in $ac_files
3957do
3958 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003959 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003960 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3961 esac
3962done
3963rm -f $ac_rmfiles
3964
Matthias Kloseb9621712010-04-24 17:59:49 +00003965if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003966case "(($ac_try" in
3967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3968 *) ac_try_echo=$ac_try;;
3969esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003970eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3971$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3975 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003976 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3977# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3978# in a Makefile. We should not override ac_cv_exeext if it was cached,
3979# so that the user can short-circuit this test for compilers unknown to
3980# Autoconf.
3981for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003982do
3983 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003984 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003985 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003986 ;;
3987 [ab].out )
3988 # We found the default executable, but exeext='' is most
3989 # certainly right.
3990 break;;
3991 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003992 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003993 then :; else
3994 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3995 fi
3996 # We set ac_cv_exeext here because the later test for it is not
3997 # safe: cross compilers may not add the suffix if given an `-o'
3998 # argument, so we may need to know it at that point already.
3999 # Even if this section looks crufty: it has the advantage of
4000 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001 break;;
4002 * )
4003 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004004 esac
4005done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006test "$ac_cv_exeext" = no && ac_cv_exeext=
4007
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004008else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004009 ac_file=''
4010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004011if test -z "$ac_file"; then :
4012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4013$as_echo "no" >&6; }
4014$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004015sed 's/^/| /' conftest.$ac_ext >&5
4016
Matthias Kloseb9621712010-04-24 17:59:49 +00004017{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004019as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02004020See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004021else
4022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4023$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4026$as_echo_n "checking for C compiler default output file name... " >&6; }
4027{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4028$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004029ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004030
Matthias Kloseb9621712010-04-24 17:59:49 +00004031rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004032ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4034$as_echo_n "checking for suffix of executables... " >&6; }
4035if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004036case "(($ac_try" in
4037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4038 *) ac_try_echo=$ac_try;;
4039esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004040eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4041$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004043 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004044 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4045 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004046 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4047# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4048# work properly (i.e., refer to `conftest.exe'), while it won't with
4049# `rm'.
4050for ac_file in conftest.exe conftest conftest.*; do
4051 test -f "$ac_file" || continue
4052 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004053 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004054 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4055 break;;
4056 * ) break;;
4057 esac
4058done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004059else
Matthias Kloseb9621712010-04-24 17:59:49 +00004060 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4061$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004062as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004063See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004065rm -f conftest conftest$ac_cv_exeext
4066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4067$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004068
4069rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004070EXEEXT=$ac_cv_exeext
4071ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4073/* end confdefs.h. */
4074#include <stdio.h>
4075int
4076main ()
4077{
4078FILE *f = fopen ("conftest.out", "w");
4079 return ferror (f) || fclose (f) != 0;
4080
4081 ;
4082 return 0;
4083}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004084_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004085ac_clean_files="$ac_clean_files conftest.out"
4086# Check that the compiler produces executables we can run. If not, either
4087# the compiler is broken, or we cross compile.
4088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4089$as_echo_n "checking whether we are cross compiling... " >&6; }
4090if test "$cross_compiling" != yes; then
4091 { { ac_try="$ac_link"
4092case "(($ac_try" in
4093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4094 *) ac_try_echo=$ac_try;;
4095esac
4096eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4097$as_echo "$ac_try_echo"; } >&5
4098 (eval "$ac_link") 2>&5
4099 ac_status=$?
4100 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4101 test $ac_status = 0; }
4102 if { ac_try='./conftest$ac_cv_exeext'
4103 { { case "(($ac_try" in
4104 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4105 *) ac_try_echo=$ac_try;;
4106esac
4107eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4108$as_echo "$ac_try_echo"; } >&5
4109 (eval "$ac_try") 2>&5
4110 ac_status=$?
4111 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4112 test $ac_status = 0; }; }; then
4113 cross_compiling=no
4114 else
4115 if test "$cross_compiling" = maybe; then
4116 cross_compiling=yes
4117 else
4118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004120as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004121If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004122See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 fi
4124 fi
4125fi
4126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4127$as_echo "$cross_compiling" >&6; }
4128
4129rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4130ac_clean_files=$ac_clean_files_save
4131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4132$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004133if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 $as_echo_n "(cached) " >&6
4135else
4136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004137/* end confdefs.h. */
4138
4139int
4140main ()
4141{
4142
4143 ;
4144 return 0;
4145}
4146_ACEOF
4147rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004148if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004149case "(($ac_try" in
4150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4151 *) ac_try_echo=$ac_try;;
4152esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004153eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4154$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004155 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004156 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004157 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4158 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004159 for ac_file in conftest.o conftest.obj conftest.*; do
4160 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004161 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004163 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4164 break;;
4165 esac
4166done
4167else
Matthias Kloseb9621712010-04-24 17:59:49 +00004168 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004169sed 's/^/| /' conftest.$ac_ext >&5
4170
Matthias Kloseb9621712010-04-24 17:59:49 +00004171{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4172$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004173as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004174See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004175fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004176rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4179$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004180OBJEXT=$ac_cv_objext
4181ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4183$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004184if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004185 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004186else
Matthias Kloseb9621712010-04-24 17:59:49 +00004187 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004189
Martin v. Löwis11437992002-04-12 09:54:03 +00004190int
4191main ()
4192{
4193#ifndef __GNUC__
4194 choke me
4195#endif
4196
4197 ;
4198 return 0;
4199}
4200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004201if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 ac_compiler_gnu=yes
4203else
Matthias Kloseb9621712010-04-24 17:59:49 +00004204 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004205fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004207ac_cv_c_compiler_gnu=$ac_compiler_gnu
4208
4209fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4211$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4212if test $ac_compiler_gnu = yes; then
4213 GCC=yes
4214else
4215 GCC=
4216fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004217ac_test_CFLAGS=${CFLAGS+set}
4218ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4220$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004221if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004222 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004223else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 ac_save_c_werror_flag=$ac_c_werror_flag
4225 ac_c_werror_flag=yes
4226 ac_cv_prog_cc_g=no
4227 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004230
Martin v. Löwis11437992002-04-12 09:54:03 +00004231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004239if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004240 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241else
Matthias Kloseb9621712010-04-24 17:59:49 +00004242 CFLAGS=""
4243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004244/* end confdefs.h. */
4245
4246int
4247main ()
4248{
4249
4250 ;
4251 return 0;
4252}
4253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004254if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004255
Matthias Kloseb9621712010-04-24 17:59:49 +00004256else
4257 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004258 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260/* end confdefs.h. */
4261
4262int
4263main ()
4264{
4265
4266 ;
4267 return 0;
4268}
4269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004270if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004271 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004274fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4278 ac_c_werror_flag=$ac_save_c_werror_flag
4279fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4281$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004282if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004283 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004284elif test $ac_cv_prog_cc_g = yes; then
4285 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004286 CFLAGS="-g -O2"
4287 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004288 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004289 fi
4290else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004291 if test "$GCC" = yes; then
4292 CFLAGS="-O2"
4293 else
4294 CFLAGS=
4295 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4298$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004299if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004300 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004301else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004303ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004304cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004305/* end confdefs.h. */
4306#include <stdarg.h>
4307#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004308struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004309/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4310struct buf { int x; };
4311FILE * (*rcsopen) (struct buf *, struct stat *, int);
4312static char *e (p, i)
4313 char **p;
4314 int i;
4315{
4316 return p[i];
4317}
4318static char *f (char * (*g) (char **, int), char **p, ...)
4319{
4320 char *s;
4321 va_list v;
4322 va_start (v,p);
4323 s = g (p, va_arg (v,int));
4324 va_end (v);
4325 return s;
4326}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004327
4328/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4329 function prototypes and stuff, but not '\xHH' hex character constants.
4330 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004332 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4333 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004335int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4338 inside strings and character constants. */
4339#define FOO(x) 'x'
4340int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4341
Skip Montanaro6dead952003-09-25 14:50:04 +00004342int test (int i, double x);
4343struct s1 {int (*f) (int a);};
4344struct s2 {int (*f) (double a);};
4345int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4346int argc;
4347char **argv;
4348int
4349main ()
4350{
4351return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4352 ;
4353 return 0;
4354}
4355_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4357 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004358do
4359 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004360 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004361 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004363rm -f core conftest.err conftest.$ac_objext
4364 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004365done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004366rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004367CC=$ac_save_CC
4368
4369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004370# AC_CACHE_VAL
4371case "x$ac_cv_prog_cc_c89" in
4372 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4374$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4377$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004378 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004379 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4381$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004382esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004383if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004384
Matthias Kloseb9621712010-04-24 17:59:49 +00004385fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004386
Martin v. Löwis11437992002-04-12 09:54:03 +00004387ac_ext=c
4388ac_cpp='$CPP $CPPFLAGS'
4389ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4390ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4391ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004392
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02004393ac_ext=c
4394ac_cpp='$CPP $CPPFLAGS'
4395ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4396ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4397ac_compiler_gnu=$ac_cv_c_compiler_gnu
4398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4399$as_echo_n "checking how to run the C preprocessor... " >&6; }
4400# On Suns, sometimes $CPP names a directory.
4401if test -n "$CPP" && test -d "$CPP"; then
4402 CPP=
4403fi
4404if test -z "$CPP"; then
4405 if ${ac_cv_prog_CPP+:} false; then :
4406 $as_echo_n "(cached) " >&6
4407else
4408 # Double quotes because CPP needs to be expanded
4409 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4410 do
4411 ac_preproc_ok=false
4412for ac_c_preproc_warn_flag in '' yes
4413do
4414 # Use a header file that comes with gcc, so configuring glibc
4415 # with a fresh cross-compiler works.
4416 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4417 # <limits.h> exists even on freestanding compilers.
4418 # On the NeXT, cc -E runs the code through the compiler's parser,
4419 # not just through cpp. "Syntax error" is here to catch this case.
4420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4421/* end confdefs.h. */
4422#ifdef __STDC__
4423# include <limits.h>
4424#else
4425# include <assert.h>
4426#endif
4427 Syntax error
4428_ACEOF
4429if ac_fn_c_try_cpp "$LINENO"; then :
4430
4431else
4432 # Broken: fails on valid input.
4433continue
4434fi
4435rm -f conftest.err conftest.i conftest.$ac_ext
4436
4437 # OK, works on sane cases. Now check whether nonexistent headers
4438 # can be detected and how.
4439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4440/* end confdefs.h. */
4441#include <ac_nonexistent.h>
4442_ACEOF
4443if ac_fn_c_try_cpp "$LINENO"; then :
4444 # Broken: success on invalid input.
4445continue
4446else
4447 # Passes both tests.
4448ac_preproc_ok=:
4449break
4450fi
4451rm -f conftest.err conftest.i conftest.$ac_ext
4452
4453done
4454# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4455rm -f conftest.i conftest.err conftest.$ac_ext
4456if $ac_preproc_ok; then :
4457 break
4458fi
4459
4460 done
4461 ac_cv_prog_CPP=$CPP
4462
4463fi
4464 CPP=$ac_cv_prog_CPP
4465else
4466 ac_cv_prog_CPP=$CPP
4467fi
4468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4469$as_echo "$CPP" >&6; }
4470ac_preproc_ok=false
4471for ac_c_preproc_warn_flag in '' yes
4472do
4473 # Use a header file that comes with gcc, so configuring glibc
4474 # with a fresh cross-compiler works.
4475 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4476 # <limits.h> exists even on freestanding compilers.
4477 # On the NeXT, cc -E runs the code through the compiler's parser,
4478 # not just through cpp. "Syntax error" is here to catch this case.
4479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4480/* end confdefs.h. */
4481#ifdef __STDC__
4482# include <limits.h>
4483#else
4484# include <assert.h>
4485#endif
4486 Syntax error
4487_ACEOF
4488if ac_fn_c_try_cpp "$LINENO"; then :
4489
4490else
4491 # Broken: fails on valid input.
4492continue
4493fi
4494rm -f conftest.err conftest.i conftest.$ac_ext
4495
4496 # OK, works on sane cases. Now check whether nonexistent headers
4497 # can be detected and how.
4498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4499/* end confdefs.h. */
4500#include <ac_nonexistent.h>
4501_ACEOF
4502if ac_fn_c_try_cpp "$LINENO"; then :
4503 # Broken: success on invalid input.
4504continue
4505else
4506 # Passes both tests.
4507ac_preproc_ok=:
4508break
4509fi
4510rm -f conftest.err conftest.i conftest.$ac_ext
4511
4512done
4513# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4514rm -f conftest.i conftest.err conftest.$ac_ext
4515if $ac_preproc_ok; then :
4516
4517else
4518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4519$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4520as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4521See \`config.log' for more details" "$LINENO" 5; }
4522fi
4523
4524ac_ext=c
4525ac_cpp='$CPP $CPPFLAGS'
4526ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4527ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4528ac_compiler_gnu=$ac_cv_c_compiler_gnu
4529
4530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4531$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4532if ${ac_cv_path_GREP+:} false; then :
4533 $as_echo_n "(cached) " >&6
4534else
4535 if test -z "$GREP"; then
4536 ac_path_GREP_found=false
4537 # Loop through the user's path and test for each of PROGNAME-LIST
4538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4539for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4540do
4541 IFS=$as_save_IFS
4542 test -z "$as_dir" && as_dir=.
4543 for ac_prog in grep ggrep; do
4544 for ac_exec_ext in '' $ac_executable_extensions; do
4545 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4546 as_fn_executable_p "$ac_path_GREP" || continue
4547# Check for GNU ac_path_GREP and select it if it is found.
4548 # Check for GNU $ac_path_GREP
4549case `"$ac_path_GREP" --version 2>&1` in
4550*GNU*)
4551 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4552*)
4553 ac_count=0
4554 $as_echo_n 0123456789 >"conftest.in"
4555 while :
4556 do
4557 cat "conftest.in" "conftest.in" >"conftest.tmp"
4558 mv "conftest.tmp" "conftest.in"
4559 cp "conftest.in" "conftest.nl"
4560 $as_echo 'GREP' >> "conftest.nl"
4561 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4562 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4563 as_fn_arith $ac_count + 1 && ac_count=$as_val
4564 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4565 # Best one so far, save it but keep looking for a better one
4566 ac_cv_path_GREP="$ac_path_GREP"
4567 ac_path_GREP_max=$ac_count
4568 fi
4569 # 10*(2^10) chars as input seems more than enough
4570 test $ac_count -gt 10 && break
4571 done
4572 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4573esac
4574
4575 $ac_path_GREP_found && break 3
4576 done
4577 done
4578 done
4579IFS=$as_save_IFS
4580 if test -z "$ac_cv_path_GREP"; then
4581 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4582 fi
4583else
4584 ac_cv_path_GREP=$GREP
4585fi
4586
4587fi
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4589$as_echo "$ac_cv_path_GREP" >&6; }
4590 GREP="$ac_cv_path_GREP"
4591
4592
Łukasz Langaa785c872016-09-09 17:37:37 -07004593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
4594$as_echo_n "checking for a sed that does not truncate output... " >&6; }
4595if ${ac_cv_path_SED+:} false; then :
4596 $as_echo_n "(cached) " >&6
4597else
4598 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
4599 for ac_i in 1 2 3 4 5 6 7; do
4600 ac_script="$ac_script$as_nl$ac_script"
4601 done
4602 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
4603 { ac_script=; unset ac_script;}
4604 if test -z "$SED"; then
4605 ac_path_SED_found=false
4606 # Loop through the user's path and test for each of PROGNAME-LIST
4607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4608for as_dir in $PATH
4609do
4610 IFS=$as_save_IFS
4611 test -z "$as_dir" && as_dir=.
4612 for ac_prog in sed gsed; do
4613 for ac_exec_ext in '' $ac_executable_extensions; do
4614 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
4615 as_fn_executable_p "$ac_path_SED" || continue
4616# Check for GNU ac_path_SED and select it if it is found.
4617 # Check for GNU $ac_path_SED
4618case `"$ac_path_SED" --version 2>&1` in
4619*GNU*)
4620 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
4621*)
4622 ac_count=0
4623 $as_echo_n 0123456789 >"conftest.in"
4624 while :
4625 do
4626 cat "conftest.in" "conftest.in" >"conftest.tmp"
4627 mv "conftest.tmp" "conftest.in"
4628 cp "conftest.in" "conftest.nl"
4629 $as_echo '' >> "conftest.nl"
4630 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
4631 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4632 as_fn_arith $ac_count + 1 && ac_count=$as_val
4633 if test $ac_count -gt ${ac_path_SED_max-0}; then
4634 # Best one so far, save it but keep looking for a better one
4635 ac_cv_path_SED="$ac_path_SED"
4636 ac_path_SED_max=$ac_count
4637 fi
4638 # 10*(2^10) chars as input seems more than enough
4639 test $ac_count -gt 10 && break
4640 done
4641 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4642esac
4643
4644 $ac_path_SED_found && break 3
4645 done
4646 done
4647 done
4648IFS=$as_save_IFS
4649 if test -z "$ac_cv_path_SED"; then
4650 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
4651 fi
4652else
4653 ac_cv_path_SED=$SED
4654fi
4655
4656fi
4657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
4658$as_echo "$ac_cv_path_SED" >&6; }
4659 SED="$ac_cv_path_SED"
4660 rm -f conftest.sed
4661
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004662
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004663
4664
Matthias Kloseb9621712010-04-24 17:59:49 +00004665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4666$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004667
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004668# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004669if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004670 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004671
4672 case $withval in
4673 no) with_cxx_main=no
4674 MAINCC='$(CC)';;
4675 yes) with_cxx_main=yes
4676 MAINCC='$(CXX)';;
4677 *) with_cxx_main=yes
4678 MAINCC=$withval
4679 if test -z "$CXX"
4680 then
4681 CXX=$withval
4682 fi;;
4683 esac
4684else
4685
4686 with_cxx_main=no
4687 MAINCC='$(CC)'
4688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004689fi
4690
Matthias Kloseb9621712010-04-24 17:59:49 +00004691{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4692$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004693
4694preset_cxx="$CXX"
4695if test -z "$CXX"
4696then
4697 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004698 gcc) if test -n "$ac_tool_prefix"; then
4699 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4700set dummy ${ac_tool_prefix}g++; ac_word=$2
4701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4702$as_echo_n "checking for $ac_word... " >&6; }
4703if ${ac_cv_path_CXX+:} false; then :
4704 $as_echo_n "(cached) " >&6
4705else
4706 case $CXX in
4707 [\\/]* | ?:[\\/]*)
4708 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4709 ;;
4710 *)
4711 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712for as_dir in notfound
4713do
4714 IFS=$as_save_IFS
4715 test -z "$as_dir" && as_dir=.
4716 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004717 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004718 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4719 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720 break 2
4721 fi
4722done
4723 done
4724IFS=$as_save_IFS
4725
4726 ;;
4727esac
4728fi
4729CXX=$ac_cv_path_CXX
4730if test -n "$CXX"; then
4731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4732$as_echo "$CXX" >&6; }
4733else
4734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
4736fi
4737
4738
4739fi
4740if test -z "$ac_cv_path_CXX"; then
4741 ac_pt_CXX=$CXX
4742 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004743set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4745$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004746if ${ac_cv_path_ac_pt_CXX+:} false; then :
4747 $as_echo_n "(cached) " >&6
4748else
4749 case $ac_pt_CXX in
4750 [\\/]* | ?:[\\/]*)
4751 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4752 ;;
4753 *)
4754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4755for as_dir in notfound
4756do
4757 IFS=$as_save_IFS
4758 test -z "$as_dir" && as_dir=.
4759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4763 break 2
4764 fi
4765done
4766 done
4767IFS=$as_save_IFS
4768
4769 ;;
4770esac
4771fi
4772ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4773if test -n "$ac_pt_CXX"; then
4774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4775$as_echo "$ac_pt_CXX" >&6; }
4776else
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4778$as_echo "no" >&6; }
4779fi
4780
4781 if test "x$ac_pt_CXX" = x; then
4782 CXX="g++"
4783 else
4784 case $cross_compiling:$ac_tool_warned in
4785yes:)
4786{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4787$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4788ac_tool_warned=yes ;;
4789esac
4790 CXX=$ac_pt_CXX
4791 fi
4792else
4793 CXX="$ac_cv_path_CXX"
4794fi
4795 ;;
4796 cc) if test -n "$ac_tool_prefix"; then
4797 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4798set dummy ${ac_tool_prefix}c++; ac_word=$2
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4800$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004801if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004802 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004803else
4804 case $CXX in
4805 [\\/]* | ?:[\\/]*)
4806 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4807 ;;
4808 *)
4809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4810for as_dir in notfound
4811do
4812 IFS=$as_save_IFS
4813 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004814 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004816 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004818 break 2
4819 fi
4820done
Matthias Kloseb9621712010-04-24 17:59:49 +00004821 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004822IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004823
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004824 ;;
4825esac
4826fi
4827CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004828if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4830$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004831else
Matthias Kloseb9621712010-04-24 17:59:49 +00004832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004835
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004836
4837fi
4838if test -z "$ac_cv_path_CXX"; then
4839 ac_pt_CXX=$CXX
4840 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004841set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4843$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004844if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004845 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004846else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004847 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004848 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004849 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 +00004850 ;;
4851 *)
4852 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4853for as_dir in notfound
4854do
4855 IFS=$as_save_IFS
4856 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004857 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004858 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004859 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004860 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004861 break 2
4862 fi
4863done
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004865IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004866
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004867 ;;
4868esac
4869fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004870ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4871if test -n "$ac_pt_CXX"; then
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4873$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004874else
Matthias Kloseb9621712010-04-24 17:59:49 +00004875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4876$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004877fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004878
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004879 if test "x$ac_pt_CXX" = x; then
4880 CXX="c++"
4881 else
4882 case $cross_compiling:$ac_tool_warned in
4883yes:)
4884{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4885$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4886ac_tool_warned=yes ;;
4887esac
4888 CXX=$ac_pt_CXX
4889 fi
4890else
4891 CXX="$ac_cv_path_CXX"
4892fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004893 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004894 clang|*/clang) if test -n "$ac_tool_prefix"; then
4895 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4896set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4898$as_echo_n "checking for $ac_word... " >&6; }
4899if ${ac_cv_path_CXX+:} false; then :
4900 $as_echo_n "(cached) " >&6
4901else
4902 case $CXX in
4903 [\\/]* | ?:[\\/]*)
4904 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4905 ;;
4906 *)
4907 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4908for as_dir in notfound
4909do
4910 IFS=$as_save_IFS
4911 test -z "$as_dir" && as_dir=.
4912 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004913 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004914 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4915 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4916 break 2
4917 fi
4918done
4919 done
4920IFS=$as_save_IFS
4921
Ned Deilycbfb9a52012-06-23 16:02:19 -07004922 ;;
4923esac
4924fi
4925CXX=$ac_cv_path_CXX
4926if test -n "$CXX"; then
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4928$as_echo "$CXX" >&6; }
4929else
4930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4931$as_echo "no" >&6; }
4932fi
4933
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004934
4935fi
4936if test -z "$ac_cv_path_CXX"; then
4937 ac_pt_CXX=$CXX
4938 # Extract the first word of "clang++", so it can be a program name with args.
4939set dummy clang++; ac_word=$2
4940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4941$as_echo_n "checking for $ac_word... " >&6; }
4942if ${ac_cv_path_ac_pt_CXX+:} false; then :
4943 $as_echo_n "(cached) " >&6
4944else
4945 case $ac_pt_CXX in
4946 [\\/]* | ?:[\\/]*)
4947 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4948 ;;
4949 *)
4950 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4951for as_dir in notfound
4952do
4953 IFS=$as_save_IFS
4954 test -z "$as_dir" && as_dir=.
4955 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004956 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004957 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4958 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4959 break 2
4960 fi
4961done
4962 done
4963IFS=$as_save_IFS
4964
4965 ;;
4966esac
4967fi
4968ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4969if test -n "$ac_pt_CXX"; then
4970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4971$as_echo "$ac_pt_CXX" >&6; }
4972else
4973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4974$as_echo "no" >&6; }
4975fi
4976
4977 if test "x$ac_pt_CXX" = x; then
4978 CXX="clang++"
4979 else
4980 case $cross_compiling:$ac_tool_warned in
4981yes:)
4982{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4983$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4984ac_tool_warned=yes ;;
4985esac
4986 CXX=$ac_pt_CXX
4987 fi
4988else
4989 CXX="$ac_cv_path_CXX"
4990fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004991 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06004992 icc|*/icc) if test -n "$ac_tool_prefix"; then
4993 # Extract the first word of "${ac_tool_prefix}icpc", so it can be a program name with args.
4994set dummy ${ac_tool_prefix}icpc; ac_word=$2
4995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_path_CXX+:} false; then :
4998 $as_echo_n "(cached) " >&6
4999else
5000 case $CXX in
5001 [\\/]* | ?:[\\/]*)
5002 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
5003 ;;
5004 *)
5005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5006for as_dir in notfound
5007do
5008 IFS=$as_save_IFS
5009 test -z "$as_dir" && as_dir=.
5010 for ac_exec_ext in '' $ac_executable_extensions; do
5011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5012 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
5013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5014 break 2
5015 fi
5016done
5017 done
5018IFS=$as_save_IFS
5019
5020 ;;
5021esac
5022fi
5023CXX=$ac_cv_path_CXX
5024if test -n "$CXX"; then
5025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5026$as_echo "$CXX" >&6; }
5027else
5028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
5030fi
5031
5032
5033fi
5034if test -z "$ac_cv_path_CXX"; then
5035 ac_pt_CXX=$CXX
5036 # Extract the first word of "icpc", so it can be a program name with args.
5037set dummy icpc; ac_word=$2
5038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5039$as_echo_n "checking for $ac_word... " >&6; }
5040if ${ac_cv_path_ac_pt_CXX+:} false; then :
5041 $as_echo_n "(cached) " >&6
5042else
5043 case $ac_pt_CXX in
5044 [\\/]* | ?:[\\/]*)
5045 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
5046 ;;
5047 *)
5048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5049for as_dir in notfound
5050do
5051 IFS=$as_save_IFS
5052 test -z "$as_dir" && as_dir=.
5053 for ac_exec_ext in '' $ac_executable_extensions; do
5054 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5055 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
5056 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5057 break 2
5058 fi
5059done
5060 done
5061IFS=$as_save_IFS
5062
5063 ;;
5064esac
5065fi
5066ac_pt_CXX=$ac_cv_path_ac_pt_CXX
5067if test -n "$ac_pt_CXX"; then
5068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
5069$as_echo "$ac_pt_CXX" >&6; }
5070else
5071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5072$as_echo "no" >&6; }
5073fi
5074
5075 if test "x$ac_pt_CXX" = x; then
5076 CXX="icpc"
5077 else
5078 case $cross_compiling:$ac_tool_warned in
5079yes:)
5080{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5081$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5082ac_tool_warned=yes ;;
5083esac
5084 CXX=$ac_pt_CXX
5085 fi
5086else
5087 CXX="$ac_cv_path_CXX"
5088fi
5089 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005090 esac
5091 if test "$CXX" = "notfound"
5092 then
5093 CXX=""
5094 fi
5095fi
5096if test -z "$CXX"
5097then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005098 if test -n "$ac_tool_prefix"; then
5099 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5100 do
5101 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5102set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5104$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005105if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005106 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005107else
5108 if test -n "$CXX"; then
5109 ac_cv_prog_CXX="$CXX" # Let the user override the test.
5110else
5111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5112for as_dir in $PATH
5113do
5114 IFS=$as_save_IFS
5115 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005116 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005117 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005118 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005119 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005120 break 2
5121 fi
5122done
Matthias Kloseb9621712010-04-24 17:59:49 +00005123 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005124IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005125
5126fi
5127fi
5128CXX=$ac_cv_prog_CXX
5129if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
5131$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005132else
Matthias Kloseb9621712010-04-24 17:59:49 +00005133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5134$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005135fi
5136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005137
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005138 test -n "$CXX" && break
5139 done
5140fi
5141if test -z "$CXX"; then
5142 ac_ct_CXX=$CXX
5143 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
5144do
5145 # Extract the first word of "$ac_prog", so it can be a program name with args.
5146set dummy $ac_prog; ac_word=$2
5147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5148$as_echo_n "checking for $ac_word... " >&6; }
5149if ${ac_cv_prog_ac_ct_CXX+:} false; then :
5150 $as_echo_n "(cached) " >&6
5151else
5152 if test -n "$ac_ct_CXX"; then
5153 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
5154else
5155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156for as_dir in $PATH
5157do
5158 IFS=$as_save_IFS
5159 test -z "$as_dir" && as_dir=.
5160 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005162 ac_cv_prog_ac_ct_CXX="$ac_prog"
5163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5164 break 2
5165 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005166done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005167 done
5168IFS=$as_save_IFS
5169
5170fi
5171fi
5172ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
5173if test -n "$ac_ct_CXX"; then
5174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
5175$as_echo "$ac_ct_CXX" >&6; }
5176else
5177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5178$as_echo "no" >&6; }
5179fi
5180
5181
5182 test -n "$ac_ct_CXX" && break
5183done
5184
5185 if test "x$ac_ct_CXX" = x; then
5186 CXX="notfound"
5187 else
5188 case $cross_compiling:$ac_tool_warned in
5189yes:)
5190{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5191$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5192ac_tool_warned=yes ;;
5193esac
5194 CXX=$ac_ct_CXX
5195 fi
5196fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005197
5198 if test "$CXX" = "notfound"
5199 then
5200 CXX=""
5201 fi
5202fi
5203if test "$preset_cxx" != "$CXX"
5204then
Christian Heimesfe32aec2013-11-20 01:18:26 +01005205 { $as_echo "$as_me:${as_lineno-$LINENO}:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005206
5207 By default, distutils will build C++ extension modules with \"$CXX\".
5208 If this is not intended, then set CXX on the configure command line.
5209 " >&5
Christian Heimesfe32aec2013-11-20 01:18:26 +01005210$as_echo "$as_me:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005211
5212 By default, distutils will build C++ extension modules with \"$CXX\".
5213 If this is not intended, then set CXX on the configure command line.
Christian Heimesfe32aec2013-11-20 01:18:26 +01005214 " >&6;}
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00005215fi
5216
5217
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005218MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5219
5220
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the platform triplet based on compiler characteristics" >&5
5222$as_echo_n "checking for the platform triplet based on compiler characteristics... " >&6; }
5223cat >> conftest.c <<EOF
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005224#undef bfin
5225#undef cris
5226#undef fr30
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005227#undef linux
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005228#undef hppa
5229#undef hpux
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005230#undef i386
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005231#undef mips
doko@ubuntu.com9abe0492015-04-15 23:31:02 +02005232#undef powerpc
doko@ubuntu.com5cc9c4f2015-04-19 14:44:05 +02005233#undef sparc
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005234#undef unix
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005235#if defined(__ANDROID__)
Xavier de Gaye32cf1ac2016-12-10 17:31:28 +01005236 # Android is not a multiarch system.
doko@ubuntu.com5c38cb22016-09-01 22:05:20 +02005237#elif defined(__linux__)
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005238# if defined(__x86_64__) && defined(__LP64__)
5239 x86_64-linux-gnu
5240# elif defined(__x86_64__) && defined(__ILP32__)
5241 x86_64-linux-gnux32
5242# elif defined(__i386__)
5243 i386-linux-gnu
5244# elif defined(__aarch64__) && defined(__AARCH64EL__)
5245# if defined(__ILP32__)
5246 aarch64_ilp32-linux-gnu
5247# else
5248 aarch64-linux-gnu
5249# endif
5250# elif defined(__aarch64__) && defined(__AARCH64EB__)
5251# if defined(__ILP32__)
5252 aarch64_be_ilp32-linux-gnu
5253# else
5254 aarch64_be-linux-gnu
5255# endif
5256# elif defined(__alpha__)
5257 alpha-linux-gnu
5258# elif defined(__ARM_EABI__) && defined(__ARM_PCS_VFP)
5259# if defined(__ARMEL__)
5260 arm-linux-gnueabihf
5261# else
5262 armeb-linux-gnueabihf
5263# endif
5264# elif defined(__ARM_EABI__) && !defined(__ARM_PCS_VFP)
5265# if defined(__ARMEL__)
5266 arm-linux-gnueabi
5267# else
5268 armeb-linux-gnueabi
5269# endif
5270# elif defined(__hppa__)
5271 hppa-linux-gnu
5272# elif defined(__ia64__)
5273 ia64-linux-gnu
5274# elif defined(__m68k__) && !defined(__mcoldfire__)
5275 m68k-linux-gnu
5276# elif defined(__mips_hard_float) && defined(_MIPSEL)
5277# if _MIPS_SIM == _ABIO32
5278 mipsel-linux-gnu
5279# elif _MIPS_SIM == _ABIN32
5280 mips64el-linux-gnuabin32
5281# elif _MIPS_SIM == _ABI64
5282 mips64el-linux-gnuabi64
5283# else
5284# error unknown platform triplet
5285# endif
5286# elif defined(__mips_hard_float)
5287# if _MIPS_SIM == _ABIO32
5288 mips-linux-gnu
5289# elif _MIPS_SIM == _ABIN32
5290 mips64-linux-gnuabin32
5291# elif _MIPS_SIM == _ABI64
5292 mips64-linux-gnuabi64
5293# else
5294# error unknown platform triplet
5295# endif
5296# elif defined(__or1k__)
5297 or1k-linux-gnu
5298# elif defined(__powerpc__) && defined(__SPE__)
5299 powerpc-linux-gnuspe
5300# elif defined(__powerpc64__)
5301# if defined(__LITTLE_ENDIAN__)
5302 powerpc64le-linux-gnu
5303# else
5304 powerpc64-linux-gnu
5305# endif
5306# elif defined(__powerpc__)
5307 powerpc-linux-gnu
5308# elif defined(__s390x__)
5309 s390x-linux-gnu
5310# elif defined(__s390__)
5311 s390-linux-gnu
5312# elif defined(__sh__) && defined(__LITTLE_ENDIAN__)
5313 sh4-linux-gnu
5314# elif defined(__sparc__) && defined(__arch64__)
5315 sparc64-linux-gnu
5316# elif defined(__sparc__)
5317 sparc-linux-gnu
5318# else
5319# error unknown platform triplet
5320# endif
5321#elif defined(__FreeBSD_kernel__)
5322# if defined(__LP64__)
5323 x86_64-kfreebsd-gnu
5324# elif defined(__i386__)
5325 i386-kfreebsd-gnu
5326# else
5327# error unknown platform triplet
5328# endif
5329#elif defined(__gnu_hurd__)
5330 i386-gnu
Ned Deily3b812482015-04-15 17:11:47 -07005331#elif defined(__APPLE__)
5332 darwin
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005333#else
5334# error unknown platform triplet
5335#endif
5336
5337EOF
5338
Xavier de Gaye3a32bdf2016-07-30 11:28:35 +02005339if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005340 PLATFORM_TRIPLET=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
5341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PLATFORM_TRIPLET" >&5
5342$as_echo "$PLATFORM_TRIPLET" >&6; }
5343else
5344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
5345$as_echo "none" >&6; }
5346fi
5347rm -f conftest.c conftest.out
5348
5349if test x$PLATFORM_TRIPLET != x && test x$MULTIARCH != x; then
5350 if test x$PLATFORM_TRIPLET != x$MULTIARCH; then
5351 as_fn_error $? "internal configure error for the platform triplet, please file a bug report" "$LINENO" 5
5352 fi
doko@ubuntu.com75b1cb12016-08-29 20:03:25 +02005353elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then
5354 MULTIARCH=$PLATFORM_TRIPLET
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005355fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005356
doko@ubuntu.com55532312016-06-14 08:55:19 +02005357if test x$MULTIARCH != x; then
5358 MULTIARCH_CPPFLAGS="-DMULTIARCH=\\\"$MULTIARCH\\\""
5359fi
doko@ubuntu.comd3899c12015-04-15 20:23:14 +02005360
5361
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
5363$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
5364save_LDFLAGS="$LDFLAGS"
5365LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00005366
Martin v. Löwis48e14d32011-05-09 07:37:45 +02005367cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5368/* end confdefs.h. */
5369
5370int
5371main ()
5372{
5373
5374 ;
5375 return 0;
5376}
5377_ACEOF
5378if ac_fn_c_try_link "$LINENO"; then :
5379 NO_AS_NEEDED="-Wl,--no-as-needed"
5380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5381$as_echo "yes" >&6; }
5382else
5383 NO_AS_NEEDED=""
5384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5385$as_echo "no" >&6; }
5386fi
5387rm -f core conftest.err conftest.$ac_objext \
5388 conftest$ac_exeext conftest.$ac_ext
5389LDFLAGS="$save_LDFLAGS"
5390
5391
5392
5393# checks for UNIX variants that set C preprocessor variables
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005394
Matthias Kloseb9621712010-04-24 17:59:49 +00005395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5396$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005397if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005398 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005399else
5400 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5401 then ac_cv_path_EGREP="$GREP -E"
5402 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005403 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005404 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005405 # Loop through the user's path and test for each of PROGNAME-LIST
5406 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005407for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5408do
5409 IFS=$as_save_IFS
5410 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005411 for ac_prog in egrep; do
5412 for ac_exec_ext in '' $ac_executable_extensions; do
5413 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005414 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005415# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005416 # Check for GNU $ac_path_EGREP
5417case `"$ac_path_EGREP" --version 2>&1` in
5418*GNU*)
5419 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5420*)
5421 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005422 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005423 while :
5424 do
5425 cat "conftest.in" "conftest.in" >"conftest.tmp"
5426 mv "conftest.tmp" "conftest.in"
5427 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005428 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005429 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5430 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005431 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005432 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5433 # Best one so far, save it but keep looking for a better one
5434 ac_cv_path_EGREP="$ac_path_EGREP"
5435 ac_path_EGREP_max=$ac_count
5436 fi
5437 # 10*(2^10) chars as input seems more than enough
5438 test $ac_count -gt 10 && break
5439 done
5440 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5441esac
5442
Matthias Kloseb9621712010-04-24 17:59:49 +00005443 $ac_path_EGREP_found && break 3
5444 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005445 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005446 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005447IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005448 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005449 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 +00005450 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005451else
5452 ac_cv_path_EGREP=$EGREP
5453fi
5454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005455 fi
5456fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5458$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005459 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005460
5461
Matthias Kloseb9621712010-04-24 17:59:49 +00005462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5463$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005464if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005465 $as_echo_n "(cached) " >&6
5466else
5467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005468/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005469#include <stdlib.h>
5470#include <stdarg.h>
5471#include <string.h>
5472#include <float.h>
5473
5474int
5475main ()
5476{
5477
5478 ;
5479 return 0;
5480}
5481_ACEOF
5482if ac_fn_c_try_compile "$LINENO"; then :
5483 ac_cv_header_stdc=yes
5484else
5485 ac_cv_header_stdc=no
5486fi
5487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5488
5489if test $ac_cv_header_stdc = yes; then
5490 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492/* end confdefs.h. */
5493#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005494
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005495_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005496if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005497 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005498
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005499else
Matthias Kloseb9621712010-04-24 17:59:49 +00005500 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005501fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005502rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005503
Matthias Kloseb9621712010-04-24 17:59:49 +00005504fi
5505
5506if test $ac_cv_header_stdc = yes; then
5507 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5509/* end confdefs.h. */
5510#include <stdlib.h>
5511
5512_ACEOF
5513if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5514 $EGREP "free" >/dev/null 2>&1; then :
5515
5516else
5517 ac_cv_header_stdc=no
5518fi
5519rm -f conftest*
5520
5521fi
5522
5523if test $ac_cv_header_stdc = yes; then
5524 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5525 if test "$cross_compiling" = yes; then :
5526 :
5527else
5528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5529/* end confdefs.h. */
5530#include <ctype.h>
5531#include <stdlib.h>
5532#if ((' ' & 0x0FF) == 0x020)
5533# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5534# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5535#else
5536# define ISLOWER(c) \
5537 (('a' <= (c) && (c) <= 'i') \
5538 || ('j' <= (c) && (c) <= 'r') \
5539 || ('s' <= (c) && (c) <= 'z'))
5540# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5541#endif
5542
5543#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5544int
5545main ()
5546{
5547 int i;
5548 for (i = 0; i < 256; i++)
5549 if (XOR (islower (i), ISLOWER (i))
5550 || toupper (i) != TOUPPER (i))
5551 return 2;
5552 return 0;
5553}
5554_ACEOF
5555if ac_fn_c_try_run "$LINENO"; then :
5556
5557else
5558 ac_cv_header_stdc=no
5559fi
5560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5561 conftest.$ac_objext conftest.beam conftest.$ac_ext
5562fi
5563
5564fi
5565fi
5566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5567$as_echo "$ac_cv_header_stdc" >&6; }
5568if test $ac_cv_header_stdc = yes; then
5569
5570$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5571
5572fi
5573
5574# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5575for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5576 inttypes.h stdint.h unistd.h
5577do :
5578 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5579ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5580"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005581if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005582 cat >>confdefs.h <<_ACEOF
5583#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5584_ACEOF
5585
5586fi
5587
5588done
5589
5590
5591
5592 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 +02005593if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005594 MINIX=yes
5595else
5596 MINIX=
5597fi
5598
5599
5600 if test "$MINIX" = yes; then
5601
5602$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5603
5604
5605$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5606
5607
5608$as_echo "#define _MINIX 1" >>confdefs.h
5609
5610 fi
5611
5612
5613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5614$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005615if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005616 $as_echo_n "(cached) " >&6
5617else
5618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5619/* end confdefs.h. */
5620
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005621# define __EXTENSIONS__ 1
5622 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005623int
5624main ()
5625{
5626
5627 ;
5628 return 0;
5629}
5630_ACEOF
5631if ac_fn_c_try_compile "$LINENO"; then :
5632 ac_cv_safe_to_define___extensions__=yes
5633else
5634 ac_cv_safe_to_define___extensions__=no
5635fi
5636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637fi
5638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5639$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5640 test $ac_cv_safe_to_define___extensions__ = yes &&
5641 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5642
5643 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5644
5645 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5646
5647 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5648
5649 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5650
5651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652
Xavier de Gaye95750b12016-07-09 11:05:42 +02005653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android API level" >&5
5654$as_echo_n "checking for the Android API level... " >&6; }
5655cat >> conftest.c <<EOF
5656#ifdef __ANDROID__
5657#include <android/api-level.h>
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005658android_api = __ANDROID_API__
5659arm_arch = __ARM_ARCH
Xavier de Gaye95750b12016-07-09 11:05:42 +02005660#else
5661#error not Android
5662#endif
5663EOF
5664
5665if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005666 ANDROID_API_LEVEL=`sed -n -e '/__ANDROID_API__/d' -e 's/^android_api = //p' conftest.out`
5667 _arm_arch=`sed -n -e '/__ARM_ARCH/d' -e 's/^arm_arch = //p' conftest.out`
Xavier de Gaye95750b12016-07-09 11:05:42 +02005668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ANDROID_API_LEVEL" >&5
5669$as_echo "$ANDROID_API_LEVEL" >&6; }
5670
5671cat >>confdefs.h <<_ACEOF
5672#define ANDROID_API_LEVEL $ANDROID_API_LEVEL
5673_ACEOF
5674
Xavier de Gaye2a352b62017-01-04 21:51:16 +01005675
5676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Android arm ABI" >&5
5677$as_echo_n "checking for the Android arm ABI... " >&6; }
5678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_arm_arch" >&5
5679$as_echo "$_arm_arch" >&6; }
5680 if test "$_arm_arch" = 7; then
5681 BASECFLAGS="${BASECFLAGS} -mfloat-abi=softfp -mfpu=vfpv3-d16"
5682 LDFLAGS="${LDFLAGS} -march=armv7-a -Wl,--fix-cortex-a8"
5683 fi
Xavier de Gaye95750b12016-07-09 11:05:42 +02005684else
5685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not Android" >&5
5686$as_echo "not Android" >&6; }
5687fi
5688rm -f conftest.c conftest.out
5689
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005690# Check for unsupported systems
5691case $ac_sys_system/$ac_sys_release in
5692atheos*|Linux*/1*)
5693 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5694 echo See README for details.
5695 exit 1;;
5696esac
5697
5698
Matthias Kloseb9621712010-04-24 17:59:49 +00005699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5700$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005701
5702# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005703if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005704 withval=$with_suffix;
5705 case $withval in
5706 no) EXEEXT=;;
5707 yes) EXEEXT=.exe;;
5708 *) EXEEXT=$withval;;
5709 esac
5710fi
5711
Matthias Kloseb9621712010-04-24 17:59:49 +00005712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5713$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005714
5715# Test whether we're running on a non-case-sensitive system, in which
5716# case we give a warning if no ext is given
5717
Matthias Kloseb9621712010-04-24 17:59:49 +00005718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5719$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720if test ! -d CaseSensitiveTestDir; then
5721mkdir CaseSensitiveTestDir
5722fi
5723
5724if test -d casesensitivetestdir
5725then
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5727$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005728 BUILDEXEEXT=.exe
5729else
Matthias Kloseb9621712010-04-24 17:59:49 +00005730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5731$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732 BUILDEXEEXT=$EXEEXT
5733fi
5734rmdir CaseSensitiveTestDir
5735
5736case $MACHDEP in
5737bsdos*)
5738 case $CC in
5739 gcc) CC="$CC -D_HAVE_BSDI";;
5740 esac;;
5741esac
5742
5743case $ac_sys_system in
5744hp*|HP*)
5745 case $CC in
5746 cc|*/cc) CC="$CC -Ae";;
5747 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005748esac
5749
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750
Matthias Kloseb9621712010-04-24 17:59:49 +00005751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5752$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753if test -z "$LIBRARY"
5754then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005755 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5758$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005759
5760# LDLIBRARY is the name of the library to link against (as opposed to the
5761# name of the library into which to insert object files). BLDLIBRARY is also
5762# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5763# is blank as the main program is not linked directly against LDLIBRARY.
5764# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5765# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5766# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5767# DLLLIBRARY is the shared (i.e., DLL) library.
5768#
5769# RUNSHARED is used to run shared python without installed libraries
5770#
5771# INSTSONAME is the name of the shared library that will be use to install
5772# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005773#
5774# LDVERSION is the shared library version number, normally the Python version
5775# with the ABI build flags appended.
5776
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005777
5778
5779
5780
5781
5782
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005783
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005784LDLIBRARY="$LIBRARY"
5785BLDLIBRARY='$(LDLIBRARY)'
5786INSTSONAME='$(LDLIBRARY)'
5787DLLLIBRARY=''
5788LDLIBRARYDIR=''
5789RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005790LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005791
5792# LINKCC is the command that links the python executable -- default is $(CC).
5793# If CXX is set, and if it is needed to link a main function that was
5794# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5795# python might then depend on the C++ runtime
5796# This is altered for AIX in order to build the export list before
5797# linking.
5798
Matthias Kloseb9621712010-04-24 17:59:49 +00005799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5800$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005801if test -z "$LINKCC"
5802then
5803 LINKCC='$(PURIFY) $(MAINCC)'
5804 case $ac_sys_system in
5805 AIX*)
5806 exp_extra="\"\""
5807 if test $ac_sys_release -ge 5 -o \
5808 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5809 exp_extra="."
5810 fi
5811 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812 QNX*)
5813 # qcc must be used because the other compilers do not
5814 # support -N.
5815 LINKCC=qcc;;
5816 esac
5817fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5819$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820
5821# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5822# make sure we default having it set to "no": this is used by
5823# distutils.unixccompiler to know if it should add --enable-new-dtags
5824# to linker command lines, and failing to detect GNU ld simply results
5825# in the same bahaviour as before.
5826
Matthias Kloseb9621712010-04-24 17:59:49 +00005827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5828$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829ac_prog=ld
5830if test "$GCC" = yes; then
5831 ac_prog=`$CC -print-prog-name=ld`
5832fi
5833case `"$ac_prog" -V 2>&1 < /dev/null` in
5834 *GNU*)
5835 GNULD=yes;;
5836 *)
5837 GNULD=no;;
5838esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5840$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005841
Matthias Kloseb9621712010-04-24 17:59:49 +00005842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5843$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005844# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005845if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005846 enableval=$enable_shared;
5847fi
5848
5849
5850if test -z "$enable_shared"
5851then
5852 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005853 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005854 enable_shared="yes";;
5855 *)
5856 enable_shared="no";;
5857 esac
5858fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5860$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005861
Matthias Kloseb9621712010-04-24 17:59:49 +00005862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5863$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005864# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005865if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005866 enableval=$enable_profiling;
5867fi
5868
5869if test "x$enable_profiling" = xyes; then
5870 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005871 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005873/* end confdefs.h. */
5874int main() { return 0; }
5875_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005876if ac_fn_c_try_link "$LINENO"; then :
5877
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005878else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005879 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005880fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005881rm -f core conftest.err conftest.$ac_objext \
5882 conftest$ac_exeext conftest.$ac_ext
5883 CC="$ac_save_cc"
5884else
5885 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005886fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5888$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889
doko@ubuntu.comba015832012-06-30 16:52:05 +02005890if test "x$enable_profiling" = xyes; then
5891 BASECFLAGS="-pg $BASECFLAGS"
5892 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005893fi
5894
Matthias Kloseb9621712010-04-24 17:59:49 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5896$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005897
5898# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5899# library that we build, but we do not want to link against it (we
5900# will find it with a -framework option). For this reason there is an
5901# extra variable BLDLIBRARY against which Python and the extension
5902# modules are linked, BLDLIBRARY. This is normally the same as
5903# LDLIBRARY, but empty for MacOSX framework builds.
5904if test "$enable_framework"
5905then
5906 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005907 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005908 BLDLIBRARY=''
5909else
5910 BLDLIBRARY='$(LDLIBRARY)'
5911fi
5912
5913# Other platforms follow
5914if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005915 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005916
Matthias Kloseb9621712010-04-24 17:59:49 +00005917$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005918
5919 case $ac_sys_system in
5920 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005921 LDLIBRARY='libpython$(LDVERSION).dll.a'
5922 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005923 ;;
5924 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005925 LDLIBRARY='libpython$(LDVERSION).so'
5926 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005927 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005928 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005929 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005930 then
5931 PY3LIBRARY=libpython3.so
5932 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005933 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005934 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005935 LDLIBRARY='libpython$(LDVERSION).so'
5936 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005937 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005938 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005939 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005940 then
5941 PY3LIBRARY=libpython3.so
5942 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005943 ;;
5944 hp*|HP*)
5945 case `uname -m` in
5946 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005947 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005948 ;;
5949 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005950 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005951 ;;
5952 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005953 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005954 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005955 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005956 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005957 LDLIBRARY='libpython$(LDVERSION).dylib'
5958 BLDLIBRARY='-L. -lpython$(LDVERSION)'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005959 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005960 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005961 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005962 LDLIBRARY='libpython$(LDVERSION).so'
doko@ubuntu.come5de66e2014-05-07 12:57:44 +02005963 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005964 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005965
5966 esac
5967else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005968 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969 case $ac_sys_system in
5970 CYGWIN*)
5971 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005972 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973 ;;
5974 esac
5975fi
5976
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005977if test "$cross_compiling" = yes; then
5978 RUNSHARED=
5979fi
5980
Matthias Kloseb9621712010-04-24 17:59:49 +00005981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5982$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005983
5984if test -n "$ac_tool_prefix"; then
5985 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5986set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5988$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005989if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005990 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005991else
5992 if test -n "$RANLIB"; then
5993 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5994else
5995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5996for as_dir in $PATH
5997do
5998 IFS=$as_save_IFS
5999 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006000 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006002 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006004 break 2
6005 fi
6006done
Matthias Kloseb9621712010-04-24 17:59:49 +00006007 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006008IFS=$as_save_IFS
6009
6010fi
6011fi
6012RANLIB=$ac_cv_prog_RANLIB
6013if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6015$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006016else
Matthias Kloseb9621712010-04-24 17:59:49 +00006017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6018$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006019fi
6020
6021
6022fi
6023if test -z "$ac_cv_prog_RANLIB"; then
6024 ac_ct_RANLIB=$RANLIB
6025 # Extract the first word of "ranlib", so it can be a program name with args.
6026set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6028$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006029if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006030 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006031else
6032 if test -n "$ac_ct_RANLIB"; then
6033 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6034else
6035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036for as_dir in $PATH
6037do
6038 IFS=$as_save_IFS
6039 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006040 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00006043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044 break 2
6045 fi
6046done
Matthias Kloseb9621712010-04-24 17:59:49 +00006047 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048IFS=$as_save_IFS
6049
6050fi
6051fi
6052ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6053if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6055$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056else
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6058$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006059fi
6060
6061 if test "x$ac_ct_RANLIB" = x; then
6062 RANLIB=":"
6063 else
6064 case $cross_compiling:$ac_tool_warned in
6065yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00006066{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6067$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006068ac_tool_warned=yes ;;
6069esac
6070 RANLIB=$ac_ct_RANLIB
6071 fi
6072else
6073 RANLIB="$ac_cv_prog_RANLIB"
6074fi
6075
6076
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006077if test -n "$ac_tool_prefix"; then
6078 for ac_prog in ar aal
6079 do
6080 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6081set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00006082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6083$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006084if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006085 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006086else
6087 if test -n "$AR"; then
6088 ac_cv_prog_AR="$AR" # Let the user override the test.
6089else
6090as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6091for as_dir in $PATH
6092do
6093 IFS=$as_save_IFS
6094 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006095 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006096 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006097 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00006098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099 break 2
6100 fi
6101done
Matthias Kloseb9621712010-04-24 17:59:49 +00006102 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006103IFS=$as_save_IFS
6104
6105fi
6106fi
6107AR=$ac_cv_prog_AR
6108if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6110$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006111else
Matthias Kloseb9621712010-04-24 17:59:49 +00006112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6113$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006114fi
6115
6116
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006117 test -n "$AR" && break
6118 done
6119fi
6120if test -z "$AR"; then
6121 ac_ct_AR=$AR
6122 for ac_prog in ar aal
6123do
6124 # Extract the first word of "$ac_prog", so it can be a program name with args.
6125set dummy $ac_prog; ac_word=$2
6126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6127$as_echo_n "checking for $ac_word... " >&6; }
6128if ${ac_cv_prog_ac_ct_AR+:} false; then :
6129 $as_echo_n "(cached) " >&6
6130else
6131 if test -n "$ac_ct_AR"; then
6132 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6133else
6134as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6135for as_dir in $PATH
6136do
6137 IFS=$as_save_IFS
6138 test -z "$as_dir" && as_dir=.
6139 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00006140 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006141 ac_cv_prog_ac_ct_AR="$ac_prog"
6142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6143 break 2
6144 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006145done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02006146 done
6147IFS=$as_save_IFS
6148
6149fi
6150fi
6151ac_ct_AR=$ac_cv_prog_ac_ct_AR
6152if test -n "$ac_ct_AR"; then
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6154$as_echo "$ac_ct_AR" >&6; }
6155else
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6157$as_echo "no" >&6; }
6158fi
6159
6160
6161 test -n "$ac_ct_AR" && break
6162done
6163
6164 if test "x$ac_ct_AR" = x; then
6165 AR="ar"
6166 else
6167 case $cross_compiling:$ac_tool_warned in
6168yes:)
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6170$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6171ac_tool_warned=yes ;;
6172esac
6173 AR=$ac_ct_AR
6174 fi
6175fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006176
6177
6178# tweak ARFLAGS only if the user didn't set it on the command line
6179
6180if test -z "$ARFLAGS"
6181then
6182 ARFLAGS="rc"
6183fi
6184
doko@ubuntu.com58844492012-06-30 18:25:32 +02006185if test -n "$ac_tool_prefix"; then
6186 for ac_prog in readelf
6187 do
6188 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6189set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6191$as_echo_n "checking for $ac_word... " >&6; }
6192if ${ac_cv_prog_READELF+:} false; then :
6193 $as_echo_n "(cached) " >&6
6194else
6195 if test -n "$READELF"; then
6196 ac_cv_prog_READELF="$READELF" # Let the user override the test.
6197else
6198as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6199for as_dir in $PATH
6200do
6201 IFS=$as_save_IFS
6202 test -z "$as_dir" && as_dir=.
6203 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006204 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006205 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
6206 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6207 break 2
6208 fi
6209done
6210 done
6211IFS=$as_save_IFS
6212
6213fi
6214fi
6215READELF=$ac_cv_prog_READELF
6216if test -n "$READELF"; then
6217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
6218$as_echo "$READELF" >&6; }
6219else
6220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221$as_echo "no" >&6; }
6222fi
6223
6224
6225 test -n "$READELF" && break
6226 done
6227fi
6228if test -z "$READELF"; then
6229 ac_ct_READELF=$READELF
6230 for ac_prog in readelf
6231do
6232 # Extract the first word of "$ac_prog", so it can be a program name with args.
6233set dummy $ac_prog; ac_word=$2
6234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6235$as_echo_n "checking for $ac_word... " >&6; }
6236if ${ac_cv_prog_ac_ct_READELF+:} false; then :
6237 $as_echo_n "(cached) " >&6
6238else
6239 if test -n "$ac_ct_READELF"; then
6240 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
6241else
6242as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6243for as_dir in $PATH
6244do
6245 IFS=$as_save_IFS
6246 test -z "$as_dir" && as_dir=.
6247 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006248 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02006249 ac_cv_prog_ac_ct_READELF="$ac_prog"
6250 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6251 break 2
6252 fi
6253done
6254 done
6255IFS=$as_save_IFS
6256
6257fi
6258fi
6259ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
6260if test -n "$ac_ct_READELF"; then
6261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
6262$as_echo "$ac_ct_READELF" >&6; }
6263else
6264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6265$as_echo "no" >&6; }
6266fi
6267
6268
6269 test -n "$ac_ct_READELF" && break
6270done
6271
6272 if test "x$ac_ct_READELF" = x; then
6273 READELF=":"
6274 else
6275 case $cross_compiling:$ac_tool_warned in
6276yes:)
6277{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6278$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6279ac_tool_warned=yes ;;
6280esac
6281 READELF=$ac_ct_READELF
6282 fi
6283fi
6284
6285if test "$cross_compiling" = yes; then
6286 case "$READELF" in
6287 readelf|:)
6288 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
6289 ;;
6290 esac
6291fi
6292
6293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295case $MACHDEP in
6296bsdos*|hp*|HP*)
6297 # install -d does not work on BSDI or HP-UX
6298 if test -z "$INSTALL"
6299 then
6300 INSTALL="${srcdir}/install-sh -c"
6301 fi
6302esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006303# Find a good install program. We prefer a C program (faster),
6304# so one script is as good as another. But avoid the broken or
6305# incompatible versions:
6306# SysV /etc/install, /usr/sbin/install
6307# SunOS /usr/etc/install
6308# IRIX /sbin/install
6309# AIX /bin/install
6310# AmigaOS /C/install, which installs bootblocks on floppy discs
6311# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6312# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6313# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6314# OS/2's system install, which has a completely different semantic
6315# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006316# Reject install programs that cannot install multiple files.
6317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6318$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006319if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006320if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006321 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322else
6323 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6324for as_dir in $PATH
6325do
6326 IFS=$as_save_IFS
6327 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006328 # Account for people who put trailing slashes in PATH elements.
6329case $as_dir/ in #((
6330 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006331 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006332 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333 /usr/ucb/* ) ;;
6334 *)
6335 # OSF1 and SCO ODT 3.0 have their own names for install.
6336 # Don't use installbsd from OSF since it installs stuff as root
6337 # by default.
6338 for ac_prog in ginstall scoinst install; do
6339 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006340 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341 if test $ac_prog = install &&
6342 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6343 # AIX install. It has an incompatible calling convention.
6344 :
6345 elif test $ac_prog = install &&
6346 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6347 # program-specific install script used by HP pwplus--don't use.
6348 :
6349 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006350 rm -rf conftest.one conftest.two conftest.dir
6351 echo one > conftest.one
6352 echo two > conftest.two
6353 mkdir conftest.dir
6354 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6355 test -s conftest.one && test -s conftest.two &&
6356 test -s conftest.dir/conftest.one &&
6357 test -s conftest.dir/conftest.two
6358 then
6359 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6360 break 3
6361 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006362 fi
6363 fi
6364 done
6365 done
6366 ;;
6367esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006368
6369 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006370IFS=$as_save_IFS
6371
Matthias Kloseb9621712010-04-24 17:59:49 +00006372rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006373
6374fi
6375 if test "${ac_cv_path_install+set}" = set; then
6376 INSTALL=$ac_cv_path_install
6377 else
6378 # As a last resort, use the slow shell script. Don't cache a
6379 # value for INSTALL within a source directory, because that will
6380 # break other packages using the cache if that directory is
6381 # removed, or if the value is a relative name.
6382 INSTALL=$ac_install_sh
6383 fi
6384fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006385{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6386$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006387
6388# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6389# It thinks the first close brace ends the variable substitution.
6390test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6391
6392test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6393
6394test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6395
Matthias Klose93a0ef12012-03-15 18:08:34 +01006396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6397$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6398if test -z "$MKDIR_P"; then
6399 if ${ac_cv_path_mkdir+:} false; then :
6400 $as_echo_n "(cached) " >&6
6401else
6402 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6403for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6404do
6405 IFS=$as_save_IFS
6406 test -z "$as_dir" && as_dir=.
6407 for ac_prog in mkdir gmkdir; do
6408 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006409 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006410 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6411 'mkdir (GNU coreutils) '* | \
6412 'mkdir (coreutils) '* | \
6413 'mkdir (fileutils) '4.1*)
6414 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6415 break 3;;
6416 esac
6417 done
6418 done
6419 done
6420IFS=$as_save_IFS
6421
6422fi
6423
6424 test -d ./--version && rmdir ./--version
6425 if test "${ac_cv_path_mkdir+set}" = set; then
6426 MKDIR_P="$ac_cv_path_mkdir -p"
6427 else
6428 # As a last resort, use the slow shell script. Don't cache a
6429 # value for MKDIR_P within a source directory, because that will
6430 # break other packages using the cache if that directory is
6431 # removed, or if the value is a relative name.
6432 MKDIR_P="$ac_install_sh -d"
6433 fi
6434fi
6435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6436$as_echo "$MKDIR_P" >&6; }
6437
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006438
6439# Not every filesystem supports hard links
6440
6441if test -z "$LN" ; then
6442 case $ac_sys_system in
6443 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006444 *) LN=ln;;
6445 esac
6446fi
6447
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006448# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006449
6450ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006451
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006452# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6454$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455
6456# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006457if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458 withval=$with_pydebug;
6459if test "$withval" != no
6460then
6461
Matthias Kloseb9621712010-04-24 17:59:49 +00006462$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006463
Matthias Kloseb9621712010-04-24 17:59:49 +00006464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6465$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006466 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006467 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006468else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6469$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006470fi
6471else
Matthias Kloseb9621712010-04-24 17:59:49 +00006472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006474fi
6475
6476
Brett Cannon63d98bc2016-09-06 17:12:40 -07006477# Enable optimization flags
6478
6479
6480Py_OPT='false'
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-optimizations" >&5
6482$as_echo_n "checking for --enable-optimizations... " >&6; }
6483# Check whether --enable-optimizations was given.
6484if test "${enable_optimizations+set}" = set; then :
6485 enableval=$enable_optimizations;
Alex Wang8cea5922017-03-28 08:50:51 -04006486if test "$enableval" != no
Brett Cannon63d98bc2016-09-06 17:12:40 -07006487then
6488 Py_OPT='true'
6489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6490$as_echo "yes" >&6; };
6491else
6492 Py_OPT='false'
6493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6494$as_echo "no" >&6; };
6495fi
6496else
6497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498$as_echo "no" >&6; }
6499fi
6500
6501if test "$Py_OPT" = 'true' ; then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006502 # Intentionally not forcing Py_LTO='true' here. Too many toolchains do not
6503 # compile working code using it and both test_distutils and test_gdb are
Brett Cannon1d8f7552016-11-03 16:20:00 -07006504 # broken when you do manage to get a toolchain that works with it. People
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)14c7f712016-09-08 22:38:46 +00006505 # who want LTO need to use --with-lto themselves.
Brett Cannon63d98bc2016-09-06 17:12:40 -07006506 DEF_MAKE_ALL_RULE="profile-opt"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006507 REQUIRE_PGO="yes"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006508 DEF_MAKE_RULE="build_all"
6509else
6510 DEF_MAKE_ALL_RULE="build_all"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006511 REQUIRE_PGO="no"
Brett Cannon63d98bc2016-09-06 17:12:40 -07006512 DEF_MAKE_RULE="all"
6513fi
6514
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006515# Enable LTO flags
6516
6517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6518$as_echo_n "checking for --with-lto... " >&6; }
6519
6520# Check whether --with-lto was given.
6521if test "${with_lto+set}" = set; then :
6522 withval=$with_lto;
6523if test "$withval" != no
6524then
6525 Py_LTO='true'
6526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6527$as_echo "yes" >&6; };
6528else
6529 Py_LTO='false'
6530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; };
6532fi
6533else
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6535$as_echo "no" >&6; }
6536fi
6537
6538if test "$Py_LTO" = 'true' ; then
6539 case $CC in
6540 *clang*)
Ned Deily8482ce42016-09-06 15:09:20 -07006541 case $ac_sys_system in
6542 Darwin*)
6543 # Any changes made here should be reflected in the GCC+Darwin case below
6544 LTOFLAGS="-flto -Wl,-export_dynamic"
6545 ;;
6546 *)
6547 LTOFLAGS="-flto"
6548 ;;
6549 esac
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006550 ;;
6551 *gcc*)
6552 case $ac_sys_system in
6553 Darwin*)
Ned Deily8482ce42016-09-06 15:09:20 -07006554 LTOFLAGS="-flto -Wl,-export_dynamic"
Gregory P. Smithd82da9f2016-04-15 16:57:04 -07006555 ;;
6556 *)
6557 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6558 ;;
6559 esac
6560 ;;
6561 esac
6562fi
6563
Brett Cannon7188a3e2015-09-18 15:13:44 -07006564# Enable PGO flags.
Zachary Ware5af85642015-12-21 12:09:17 -06006565
6566
6567
6568
6569
Gregory P. Smith799520c2016-09-07 16:10:00 -07006570# Make this work on systems where llvm tools are not installed with their
6571# normal names in the default $PATH (ie: Ubuntu). They exist under the
6572# non-suffixed name in their versioned llvm directory.
6573llvm_bin_dir=''
6574llvm_path="${PATH}"
6575if test "${CC}" = "clang"
6576then
6577 clang_bin=`which clang`
6578 # Some systems install clang elsewhere as a symlink to the real path
6579 # which is where the related llvm tools are located.
6580 if test -L "${clang_bin}"
6581 then
6582 clang_dir=`dirname "${clang_bin}"`
6583 clang_bin=`readlink "${clang_bin}"`
6584 llvm_bin_dir="${clang_dir}/"`dirname "${clang_bin}"`
6585 llvm_path="${llvm_path}${PATH_SEPARATOR}${llvm_bin_dir}"
6586 fi
6587fi
Zachary Ware5af85642015-12-21 12:09:17 -06006588
Gregory P. Smith799520c2016-09-07 16:10:00 -07006589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
6590$as_echo_n "checking target system type... " >&6; }
6591if ${ac_cv_target+:} false; then :
Brett Cannon7188a3e2015-09-18 15:13:44 -07006592 $as_echo_n "(cached) " >&6
6593else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006594 if test "x$target_alias" = x; then
6595 ac_cv_target=$ac_cv_host
Brett Cannon7188a3e2015-09-18 15:13:44 -07006596else
Gregory P. Smith799520c2016-09-07 16:10:00 -07006597 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
6598 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
6599fi
6600
6601fi
6602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
6603$as_echo "$ac_cv_target" >&6; }
6604case $ac_cv_target in
6605*-*-*) ;;
6606*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
6607esac
6608target=$ac_cv_target
6609ac_save_IFS=$IFS; IFS='-'
6610set x $ac_cv_target
6611shift
6612target_cpu=$1
6613target_vendor=$2
6614shift; shift
6615# Remember, the first character of IFS is used to create $*,
6616# except with old shells:
6617target_os=$*
6618IFS=$ac_save_IFS
6619case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
6620
6621
6622# The aliases save the names the user supplied, while $host etc.
6623# will get canonicalized.
6624test -n "$target_alias" &&
6625 test "$program_prefix$program_suffix$program_transform_name" = \
6626 NONENONEs,x,x, &&
6627 program_prefix=${target_alias}-
6628# Extract the first word of "$target_alias-llvm-profdata", so it can be a program name with args.
6629set dummy $target_alias-llvm-profdata; ac_word=$2
6630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6631$as_echo_n "checking for $ac_word... " >&6; }
6632if ${ac_cv_path_LLVM_PROFDATA+:} false; then :
6633 $as_echo_n "(cached) " >&6
6634else
6635 case $LLVM_PROFDATA in
6636 [\\/]* | ?:[\\/]*)
6637 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path.
6638 ;;
6639 *)
6640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6641for as_dir in ${llvm_path}
Brett Cannon7188a3e2015-09-18 15:13:44 -07006642do
6643 IFS=$as_save_IFS
6644 test -z "$as_dir" && as_dir=.
6645 for ac_exec_ext in '' $ac_executable_extensions; do
6646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Gregory P. Smith799520c2016-09-07 16:10:00 -07006647 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6649 break 2
6650 fi
6651done
6652 done
6653IFS=$as_save_IFS
6654
Gregory P. Smith799520c2016-09-07 16:10:00 -07006655 ;;
6656esac
Brett Cannon7188a3e2015-09-18 15:13:44 -07006657fi
Gregory P. Smith799520c2016-09-07 16:10:00 -07006658LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA
6659if test -n "$LLVM_PROFDATA"; then
6660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5
6661$as_echo "$LLVM_PROFDATA" >&6; }
Brett Cannon7188a3e2015-09-18 15:13:44 -07006662else
6663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6664$as_echo "no" >&6; }
6665fi
6666
6667
Gregory P. Smith799520c2016-09-07 16:10:00 -07006668if test -z "$ac_cv_path_LLVM_PROFDATA"; then
6669 if test "$build" = "$target"; then
6670 ac_pt_LLVM_PROFDATA=$LLVM_PROFDATA
6671 # Extract the first word of "llvm-profdata", so it can be a program name with args.
6672set dummy llvm-profdata; ac_word=$2
6673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6674$as_echo_n "checking for $ac_word... " >&6; }
6675if ${ac_cv_path_ac_pt_LLVM_PROFDATA+:} false; then :
6676 $as_echo_n "(cached) " >&6
6677else
6678 case $ac_pt_LLVM_PROFDATA in
6679 [\\/]* | ?:[\\/]*)
6680 ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path.
6681 ;;
6682 *)
6683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6684for as_dir in ${llvm_path}
6685do
6686 IFS=$as_save_IFS
6687 test -z "$as_dir" && as_dir=.
6688 for ac_exec_ext in '' $ac_executable_extensions; do
6689 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6690 ac_cv_path_ac_pt_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext"
6691 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6692 break 2
6693 fi
6694done
6695 done
6696IFS=$as_save_IFS
6697
6698 test -z "$ac_cv_path_ac_pt_LLVM_PROFDATA" && ac_cv_path_ac_pt_LLVM_PROFDATA="''"
6699 ;;
6700esac
6701fi
6702ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA
6703if test -n "$ac_pt_LLVM_PROFDATA"; then
6704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LLVM_PROFDATA" >&5
6705$as_echo "$ac_pt_LLVM_PROFDATA" >&6; }
6706else
6707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6708$as_echo "no" >&6; }
6709fi
6710
6711 LLVM_PROFDATA=$ac_pt_LLVM_PROFDATA
6712 else
6713 LLVM_PROFDATA="''"
6714 fi
6715else
6716 LLVM_PROFDATA="$ac_cv_path_LLVM_PROFDATA"
6717fi
6718
6719
6720if test -n "${LLVM_PROFDATA}" -a -x "${LLVM_PROFDATA}"
6721then
6722 LLVM_PROF_FOUND="found"
6723else
6724 LLVM_PROF_FOUND="not-found"
6725fi
6726if test "$ac_sys_system" = "Darwin" -a "${LLVM_PROF_FOUND}" = "not-found"
6727then
6728 found_llvm_profdata=`/usr/bin/xcrun -find llvm-profdata 2>/dev/null`
6729 if test -n "${found_llvm_profdata}"
6730 then
6731 # llvm-profdata isn't directly in $PATH in some cases.
6732 # https://apple.stackexchange.com/questions/197053/
6733 LLVM_PROFDATA='/usr/bin/xcrun llvm-profdata'
6734 LLVM_PROF_FOUND=found
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&5
6736$as_echo "$as_me: llvm-profdata found via xcrun: ${LLVM_PROFDATA}" >&6;}
6737 fi
6738fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006739LLVM_PROF_ERR=no
6740case $CC in
6741 *clang*)
6742 # Any changes made here should be reflected in the GCC+Darwin case below
6743 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6744 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006745 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006746 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6747 if test $LLVM_PROF_FOUND = not-found
6748 then
6749 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006750 if test "${REQUIRE_PGO}" = "yes"
6751 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006752 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006753 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006754 fi
6755 ;;
6756 *gcc*)
6757 case $ac_sys_system in
6758 Darwin*)
6759 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6760 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
Gregory P. Smith799520c2016-09-07 16:10:00 -07006761 LLVM_PROF_MERGER="${LLVM_PROFDATA} merge -output=code.profclangd *.profclangr"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006762 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
Gregory P. Smith799520c2016-09-07 16:10:00 -07006763 if test "${LLVM_PROF_FOUND}" = "not-found"
Brett Cannon7188a3e2015-09-18 15:13:44 -07006764 then
6765 LLVM_PROF_ERR=yes
Gregory P. Smith799520c2016-09-07 16:10:00 -07006766 if test "${REQUIRE_PGO}" = "yes"
6767 then
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +00006768 as_fn_error $? "llvm-profdata is required for a --enable-optimizations build but could not be found." "$LINENO" 5
Gregory P. Smith799520c2016-09-07 16:10:00 -07006769 fi
Brett Cannon7188a3e2015-09-18 15:13:44 -07006770 fi
6771 ;;
6772 *)
6773 PGO_PROF_GEN_FLAG="-fprofile-generate"
6774 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6775 LLVM_PROF_MERGER="true"
6776 LLVM_PROF_FILE=""
6777 ;;
6778 esac
6779 ;;
Zachary Ware5af85642015-12-21 12:09:17 -06006780 *icc*)
6781 PGO_PROF_GEN_FLAG="-prof-gen"
6782 PGO_PROF_USE_FLAG="-prof-use"
6783 LLVM_PROF_MERGER="true"
6784 LLVM_PROF_FILE=""
6785 ;;
Brett Cannon7188a3e2015-09-18 15:13:44 -07006786esac
6787
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6789# merged with this chunk of code?
6790
6791# Optimizer/debugger flags
6792# ------------------------
6793# (The following bit of code is complicated enough - please keep things
6794# indented properly. Just pretend you're editing Python code. ;-)
6795
6796# There are two parallel sets of case statements below, one that checks to
6797# see if OPT was set and one that does BASECFLAGS setting based upon
6798# compiler and platform. BASECFLAGS tweaks need to be made even if the
6799# user set OPT.
6800
6801# tweak OPT based on compiler and platform, only if the user didn't set
6802# it on the command line
6803
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006804if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006805then
6806 case $GCC in
6807 yes)
6808 if test "$CC" != 'g++' ; then
6809 STRICT_PROTO="-Wstrict-prototypes"
6810 fi
6811 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6812 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6813 WRAP="-fwrapv"
6814 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006815
Stefan Krahaf04ff22011-12-08 22:20:31 +01006816 case $CC in
Victor Stinner28205b22017-04-21 11:24:34 +02006817 *clang*)
Victor Stinner35f3d242017-04-21 12:35:24 +02006818 cc_is_clang=1
Victor Stinner28205b22017-04-21 11:24:34 +02006819 ;;
Victor Stinner35f3d242017-04-21 12:35:24 +02006820 *)
6821 if $CC --version 2>&1 | grep -q clang
6822 then
6823 cc_is_clang=1
6824 else
6825 cc_is_clang=
6826 fi
Stefan Krahaf04ff22011-12-08 22:20:31 +01006827 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006828
Victor Stinner35f3d242017-04-21 12:35:24 +02006829 if test -n "${cc_is_clang}"
6830 then
6831 # Clang also needs -fwrapv
6832 WRAP="-fwrapv"
Victor Stinner826f83f2017-04-28 15:07:10 +02006833 CFLAGS_ALIASING="-fno-strict-aliasing"
Victor Stinner35f3d242017-04-21 12:35:24 +02006834 fi
6835
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006836 case $ac_cv_prog_cc_g in
6837 yes)
6838 if test "$Py_DEBUG" = 'true' ; then
6839 # Optimization messes up debuggers, so turn it off for
6840 # debug builds.
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006841 if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
Victor Stinner28205b22017-04-21 11:24:34 +02006842 OPT="-g -Og -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006843 else
Victor Stinner28205b22017-04-21 11:24:34 +02006844 OPT="-g -O0 -Wall"
Antoine Pitrou3d6c7842015-02-11 19:39:16 +01006845 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846 else
Victor Stinner28205b22017-04-21 11:24:34 +02006847 OPT="-g $WRAP -O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006848 fi
6849 ;;
6850 *)
Victor Stinner28205b22017-04-21 11:24:34 +02006851 OPT="-O3 -Wall"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852 ;;
6853 esac
Victor Stinner28205b22017-04-21 11:24:34 +02006854
Victor Stinner826f83f2017-04-28 15:07:10 +02006855 OPT="$OPT $STRICT_PROTO"
Victor Stinner28205b22017-04-21 11:24:34 +02006856
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857 case $ac_sys_system in
6858 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6859 ;;
6860 esac
6861 ;;
6862
6863 *)
6864 OPT="-O"
6865 ;;
6866 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867fi
6868
6869
6870
Benjamin Petersonacb8c522014-08-09 20:01:49 -07006871
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872# The -arch flags for universal builds on OSX
6873UNIVERSAL_ARCH_FLAGS=
6874
6875
6876# tweak BASECFLAGS based on compiler and platform
6877case $GCC in
6878yes)
Benjamin Peterson050af5d2016-09-10 17:53:13 -07006879 CFLAGS_NODIST="$CFLAGS_NODIST -std=c99"
Benjamin Petersond1702562016-09-07 12:00:06 -07006880
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03006881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wextra" >&5
6882$as_echo_n "checking for -Wextra... " >&6; }
6883 ac_save_cc="$CC"
6884 CC="$CC -Wextra -Werror"
6885 if ${ac_cv_extra_warnings+:} 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_extra_warnings=yes
6904
6905else
6906
6907 ac_cv_extra_warnings=no
6908
6909fi
6910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6911fi
6912
6913 CC="$ac_save_cc"
6914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_extra_warnings" >&5
6915$as_echo "$ac_cv_extra_warnings" >&6; }
6916
6917 if test $ac_cv_extra_warnings = yes
6918 then
6919 CFLAGS_NODIST="$CFLAGS_NODIST -Wextra"
6920 fi
6921
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006922 # Python doesn't violate C99 aliasing rules, but older versions of
6923 # GCC produce warnings for legal Python code. Enable
6924 # -fno-strict-aliasing on versions of GCC that support but produce
6925 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6927$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928 ac_save_cc="$CC"
6929 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006930 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006931 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006932 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006933else
Matthias Kloseb9621712010-04-24 17:59:49 +00006934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006936
Matthias Kloseb159a552010-04-25 21:00:44 +00006937
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006938int
6939main ()
6940{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006941
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006942 ;
6943 return 0;
6944}
Matthias Kloseb159a552010-04-25 21:00:44 +00006945
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006947if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006948
6949 CC="$ac_save_cc -fstrict-aliasing"
6950 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006952/* end confdefs.h. */
6953
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006954 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006955int
6956main ()
6957{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006958double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006959 ;
6960 return 0;
6961}
Matthias Kloseb159a552010-04-25 21:00:44 +00006962
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006964if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006965
6966 ac_cv_no_strict_aliasing=no
6967
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006968else
Matthias Kloseb159a552010-04-25 21:00:44 +00006969
6970 ac_cv_no_strict_aliasing=yes
6971
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006972fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006974
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006975else
Matthias Kloseb159a552010-04-25 21:00:44 +00006976
6977 ac_cv_no_strict_aliasing=no
6978
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006979fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006981fi
6982
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006983 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006984 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6986$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006987 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006988 then
6989 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6990 fi
6991
Zachary Ware5af85642015-12-21 12:09:17 -06006992 # ICC doesn't recognize the option, but only emits a warning
6993 ## XXX does it emit an unused result warning and can it be disabled?
6994 case "$CC" in
6995 *icc*)
6996 ac_cv_disable_unused_result_warning=no
6997 ;;
6998 *)
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
7000$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
7001 ac_save_cc="$CC"
7002 CC="$CC -Wunused-result -Werror"
7003 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02007004 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007005 $as_echo_n "(cached) " >&6
7006else
7007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7008/* end confdefs.h. */
7009
7010
7011int
7012main ()
7013{
7014
7015 ;
7016 return 0;
7017}
7018
7019_ACEOF
7020if ac_fn_c_try_compile "$LINENO"; then :
7021
7022 ac_cv_disable_unused_result_warning=yes
7023
7024else
7025
7026 ac_cv_disable_unused_result_warning=no
7027
7028fi
7029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7030fi
7031
7032 CFLAGS="$save_CFLAGS"
7033 CC="$ac_save_cc"
7034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
7035$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
Zachary Ware5af85642015-12-21 12:09:17 -06007036 ;;
7037 esac
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007038
7039 if test $ac_cv_disable_unused_result_warning = yes
7040 then
7041 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
Serhiy Storchakaea80ffb2016-09-11 21:56:32 +03007042 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-result"
7043 fi
7044
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused parameter warning" >&5
7046$as_echo_n "checking if we can turn off $CC unused parameter warning... " >&6; }
7047 ac_save_cc="$CC"
7048 CC="$CC -Wunused-parameter -Werror"
7049 if ${ac_cv_disable_unused_parameter_warning+:} false; then :
7050 $as_echo_n "(cached) " >&6
7051else
7052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7053/* end confdefs.h. */
7054
7055
7056int
7057main ()
7058{
7059
7060 ;
7061 return 0;
7062}
7063
7064_ACEOF
7065if ac_fn_c_try_compile "$LINENO"; then :
7066
7067 ac_cv_disable_unused_parameter_warning=yes
7068
7069else
7070
7071 ac_cv_disable_unused_parameter_warning=no
7072
7073fi
7074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7075fi
7076
7077 CC="$ac_save_cc"
7078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5
7079$as_echo "$ac_cv_disable_unused_parameter_warning" >&6; }
7080
7081 if test $ac_cv_disable_unused_parameter_warning = yes
7082 then
7083 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-unused-parameter"
7084 fi
7085
7086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC missing field initializers warning" >&5
7087$as_echo_n "checking if we can turn off $CC missing field initializers warning... " >&6; }
7088 ac_save_cc="$CC"
7089 CC="$CC -Wmissing-field-initializers -Werror"
7090 if ${ac_cv_disable_missing_field_initializers+:} false; then :
7091 $as_echo_n "(cached) " >&6
7092else
7093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7094/* end confdefs.h. */
7095
7096
7097int
7098main ()
7099{
7100
7101 ;
7102 return 0;
7103}
7104
7105_ACEOF
7106if ac_fn_c_try_compile "$LINENO"; then :
7107
7108 ac_cv_disable_missing_field_initializers=yes
7109
7110else
7111
7112 ac_cv_disable_missing_field_initializers=no
7113
7114fi
7115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7116fi
7117
7118 CC="$ac_save_cc"
7119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers" >&5
7120$as_echo "$ac_cv_disable_missing_field_initializers" >&6; }
7121
7122 if test $ac_cv_disable_missing_field_initializers = yes
7123 then
7124 CFLAGS_NODIST="$CFLAGS_NODIST -Wno-missing-field-initializers"
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04007125 fi
7126
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC mixed sign comparison warning" >&5
7128$as_echo_n "checking if we can turn on $CC mixed sign comparison warning... " >&6; }
7129 ac_save_cc="$CC"
7130 CC="$CC -Wsign-compare"
7131 save_CFLAGS="$CFLAGS"
7132 if ${ac_cv_enable_sign_compare_warning+:} false; then :
7133 $as_echo_n "(cached) " >&6
7134else
7135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7136/* end confdefs.h. */
7137
7138
7139int
7140main ()
7141{
7142
7143 ;
7144 return 0;
7145}
7146
7147_ACEOF
7148if ac_fn_c_try_compile "$LINENO"; then :
7149
7150 ac_cv_enable_sign_compare_warning=yes
7151
7152else
7153
7154 ac_cv_enable_sign_compare_warning=no
7155
7156fi
7157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7158fi
7159
7160 CFLAGS="$save_CFLAGS"
7161 CC="$ac_save_cc"
7162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5
7163$as_echo "$ac_cv_enable_sign_compare_warning" >&6; }
7164
7165 if test $ac_cv_enable_sign_compare_warning = yes
7166 then
7167 BASECFLAGS="$BASECFLAGS -Wsign-compare"
7168 fi
7169
7170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn on $CC unreachable code warning" >&5
7171$as_echo_n "checking if we can turn on $CC unreachable code warning... " >&6; }
7172 ac_save_cc="$CC"
7173 CC="$CC -Wunreachable-code"
7174 save_CFLAGS="$CFLAGS"
7175 if ${ac_cv_enable_unreachable_code_warning+:} false; then :
7176 $as_echo_n "(cached) " >&6
7177else
7178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7179/* end confdefs.h. */
7180
7181
7182int
7183main ()
7184{
7185
7186 ;
7187 return 0;
7188}
7189
7190_ACEOF
7191if ac_fn_c_try_compile "$LINENO"; then :
7192
7193 ac_cv_enable_unreachable_code_warning=yes
7194
7195else
7196
7197 ac_cv_enable_unreachable_code_warning=no
7198
7199fi
7200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7201fi
7202
7203 CFLAGS="$save_CFLAGS"
7204 CC="$ac_save_cc"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007205
7206 # Don't enable unreachable code warning in debug mode, since it usually
7207 # results in non-standard code paths.
Ned Deilybec699e2016-03-08 00:28:37 -05007208 # Issue #24324: Unfortunately, the unreachable code warning does not work
7209 # correctly on gcc and has been silently removed from the compiler.
7210 # It is supported on clang but on OS X systems gcc may be an alias
7211 # for clang. Try to determine if the compiler is not really gcc and,
7212 # if so, only then enable the warning.
7213 if test $ac_cv_enable_unreachable_code_warning = yes && \
7214 test "$Py_DEBUG" != "true" && \
7215 test -z "`$CC --version 2>/dev/null | grep 'Free Software Foundation'`"
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007216 then
7217 BASECFLAGS="$BASECFLAGS -Wunreachable-code"
Ned Deilybec699e2016-03-08 00:28:37 -05007218 else
7219 ac_cv_enable_unreachable_code_warning=no
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007220 fi
Ned Deilybec699e2016-03-08 00:28:37 -05007221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5
7222$as_echo "$ac_cv_enable_unreachable_code_warning" >&6; }
Charles-François Natali7f9cc932014-08-01 21:57:49 +01007223
Victor Stinner193ee0a2017-02-06 14:24:00 +01007224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can make implicit function declaration an error in $CC" >&5
7225$as_echo_n "checking if we can make implicit function declaration an error in $CC... " >&6; }
7226 ac_save_cc="$CC"
7227 CC="$CC -Werror=implicit-function-declaration"
7228 if ${ac_cv_enable_implicit_function_declaration_error+:} false; then :
7229 $as_echo_n "(cached) " >&6
7230else
7231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7232/* end confdefs.h. */
7233
7234
7235int
7236main ()
7237{
7238
7239 ;
7240 return 0;
7241}
7242
7243_ACEOF
7244if ac_fn_c_try_compile "$LINENO"; then :
7245
7246 ac_cv_enable_implicit_function_declaration_error=yes
7247
7248else
7249
7250 ac_cv_enable_implicit_function_declaration_error=no
7251
7252fi
7253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7254fi
7255
7256 CC="$ac_save_cc"
7257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5
7258$as_echo "$ac_cv_enable_implicit_function_declaration_error" >&6; }
7259
7260 if test $ac_cv_enable_implicit_function_declaration_error = yes
7261 then
7262 CFLAGS_NODIST="$CFLAGS_NODIST -Werror=implicit-function-declaration"
7263 fi
7264
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007265 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
7266 # support. Without this, treatment of subnormals doesn't follow
7267 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01007268 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007269 alpha*)
7270 BASECFLAGS="$BASECFLAGS -mieee"
7271 ;;
7272 esac
7273
7274 case $ac_sys_system in
7275 SCO_SV*)
7276 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
7277 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07007278
7279 # is there any other compiler on Darwin besides gcc?
7280 Darwin*)
7281 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
7282 # used to be here, but non-Apple gcc doesn't accept them.
7283 if test "${CC}" = gcc
7284 then
7285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007286$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007287 case "${UNIVERSALSDK}" in
7288 */MacOSX10.4u.sdk)
7289 # Build using 10.4 SDK, force usage of gcc when the
7290 # compiler is gcc, otherwise the user will get very
7291 # confusing error messages when building on OSX 10.6
7292 CC=gcc-4.0
7293 CPP=cpp-4.0
7294 ;;
7295 esac
7296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00007297$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07007298 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007299
Ned Deily87adb6e2013-10-18 21:09:56 -07007300 if test "${enable_universalsdk}"
7301 then
7302 case "$UNIVERSAL_ARCHS" in
7303 32-bit)
7304 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
7305 LIPO_32BIT_FLAGS=""
7306 ARCH_RUN_32BIT=""
7307 ;;
7308 64-bit)
7309 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
7310 LIPO_32BIT_FLAGS=""
7311 ARCH_RUN_32BIT="true"
7312 ;;
7313 all)
7314 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
7315 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7316 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7317 ;;
7318 intel)
7319 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
7320 LIPO_32BIT_FLAGS="-extract i386"
7321 ARCH_RUN_32BIT="/usr/bin/arch -i386"
7322 ;;
7323 intel-32)
7324 UNIVERSAL_ARCH_FLAGS="-arch i386"
7325 LIPO_32BIT_FLAGS=""
7326 ARCH_RUN_32BIT=""
7327 ;;
7328 3-way)
7329 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
7330 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
7331 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
7332 ;;
7333 *)
7334 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
7335 ;;
7336 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007337
Ned Deily87adb6e2013-10-18 21:09:56 -07007338 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
7339 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
7340 if test "${UNIVERSALSDK}" != "/"
7341 then
7342 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
7343 fi
7344 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007345
Ned Deily87adb6e2013-10-18 21:09:56 -07007346 # Calculate an appropriate deployment target for this build:
7347 # The deployment target value is used explicitly to enable certain
7348 # features are enabled (such as builtin libedit support for readline)
Raymond Hettinger15f44ab2016-08-30 10:47:49 -07007349 # through the use of Apple's Availability Macros and is used as a
Ned Deily87adb6e2013-10-18 21:09:56 -07007350 # component of the string returned by distutils.get_platform().
7351 #
7352 # Use the value from:
7353 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
7354 # 2. the operating system version of the build machine if >= 10.6
7355 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
7356 # below to pick either 10.3, 10.4, or 10.5 as the target.
7357 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358
Ned Deily87adb6e2013-10-18 21:09:56 -07007359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
7360$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
Ned Deily36820b62014-06-25 13:44:22 -07007361 cur_target_major=`sw_vers -productVersion | \
7362 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
7363 cur_target_minor=`sw_vers -productVersion | \
7364 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
7365 cur_target="${cur_target_major}.${cur_target_minor}"
7366 if test ${cur_target_major} -eq 10 && \
7367 test ${cur_target_minor} -ge 3 && \
7368 test ${cur_target_minor} -le 5
Ned Deily87adb6e2013-10-18 21:09:56 -07007369 then
Ned Deily36820b62014-06-25 13:44:22 -07007370 # OS X 10.3 through 10.5
Ned Deily87adb6e2013-10-18 21:09:56 -07007371 cur_target=10.3
7372 if test ${enable_universalsdk}
7373 then
7374 case "$UNIVERSAL_ARCHS" in
7375 all|3-way|intel|64-bit)
7376 # These configurations were first supported in 10.5
7377 cur_target='10.5'
7378 ;;
7379 esac
7380 else
7381 if test `/usr/bin/arch` = "i386"
7382 then
7383 # 10.4 was the first release to support Intel archs
7384 cur_target="10.4"
7385 fi
7386 fi
7387 fi
7388 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007389
Ned Deily87adb6e2013-10-18 21:09:56 -07007390 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
7391 # environment with a value that is the same as what we'll use
7392 # in the Makefile to ensure that we'll get the same compiler
7393 # environment during configure and build time.
7394 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
7395 export MACOSX_DEPLOYMENT_TARGET
7396 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
7397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
7398$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00007399
Ned Deily87adb6e2013-10-18 21:09:56 -07007400 # end of Darwin* tests
7401 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007402 esac
7403 ;;
7404
7405*)
7406 case $ac_sys_system in
7407 OpenUNIX*|UnixWare*)
7408 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
7409 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007410 SCO_SV*)
7411 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
7412 ;;
7413 esac
7414 ;;
7415esac
7416
Zachary Ware5af85642015-12-21 12:09:17 -06007417# ICC needs -fp-model strict or floats behave badly
7418case "$CC" in
7419*icc*)
7420 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
7421 ;;
7422esac
7423
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007424if test "$Py_DEBUG" = 'true'; then
7425 :
7426else
7427 OPT="-DNDEBUG $OPT"
7428fi
7429
7430if test "$ac_arch_flags"
7431then
7432 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
7433fi
7434
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007435# On some compilers, pthreads are available without further options
7436# (e.g. MacOS X). On some of these systems, the compiler will not
7437# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
7438# So we have to see first whether pthreads are available without
7439# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00007440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
7441$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007442if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007443 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007444else
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007446 ac_cv_pthread_is_default=no
7447else
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007449/* end confdefs.h. */
7450
Stefan Krah7dba5942012-11-22 22:49:11 +01007451#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007452#include <pthread.h>
7453
7454void* routine(void* p){return NULL;}
7455
7456int main(){
7457 pthread_t p;
7458 if(pthread_create(&p,NULL,routine,NULL)!=0)
7459 return 1;
7460 (void)pthread_detach(p);
7461 return 0;
7462}
7463
7464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007465if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007466
7467 ac_cv_pthread_is_default=yes
7468 ac_cv_kthread=no
7469 ac_cv_pthread=no
7470
7471else
Matthias Kloseb9621712010-04-24 17:59:49 +00007472 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007473fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007474rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7475 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007476fi
7477
7478
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007479fi
7480
Matthias Kloseb9621712010-04-24 17:59:49 +00007481{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
7482$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007483
7484
7485if test $ac_cv_pthread_is_default = yes
7486then
7487 ac_cv_kpthread=no
7488else
7489# -Kpthread, if available, provides the right #defines
7490# and linker options to make pthread_create available
7491# Some compilers won't report that they do not support -Kpthread,
7492# so we need to run a program to see whether it really made the
7493# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
7495$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007496if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007497 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498else
7499 ac_save_cc="$CC"
7500CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007501if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007502 ac_cv_kpthread=no
7503else
Matthias Kloseb9621712010-04-24 17:59:49 +00007504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007505/* end confdefs.h. */
7506
Stefan Krah7dba5942012-11-22 22:49:11 +01007507#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007508#include <pthread.h>
7509
7510void* routine(void* p){return NULL;}
7511
7512int main(){
7513 pthread_t p;
7514 if(pthread_create(&p,NULL,routine,NULL)!=0)
7515 return 1;
7516 (void)pthread_detach(p);
7517 return 0;
7518}
7519
7520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007521if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007522 ac_cv_kpthread=yes
7523else
Matthias Kloseb9621712010-04-24 17:59:49 +00007524 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7527 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007528fi
7529
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007530CC="$ac_save_cc"
7531fi
7532
Matthias Kloseb9621712010-04-24 17:59:49 +00007533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
7534$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535fi
7536
7537if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
7538then
7539# -Kthread, if available, provides the right #defines
7540# and linker options to make pthread_create available
7541# Some compilers won't report that they do not support -Kthread,
7542# so we need to run a program to see whether it really made the
7543# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
7545$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007546if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007547 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007548else
7549 ac_save_cc="$CC"
7550CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007551if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007552 ac_cv_kthread=no
7553else
Matthias Kloseb9621712010-04-24 17:59:49 +00007554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007555/* end confdefs.h. */
7556
Stefan Krah7dba5942012-11-22 22:49:11 +01007557#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007558#include <pthread.h>
7559
7560void* routine(void* p){return NULL;}
7561
7562int main(){
7563 pthread_t p;
7564 if(pthread_create(&p,NULL,routine,NULL)!=0)
7565 return 1;
7566 (void)pthread_detach(p);
7567 return 0;
7568}
7569
7570_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007571if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007572 ac_cv_kthread=yes
7573else
Matthias Kloseb9621712010-04-24 17:59:49 +00007574 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007575fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007576rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7577 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007578fi
7579
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007580CC="$ac_save_cc"
7581fi
7582
Matthias Kloseb9621712010-04-24 17:59:49 +00007583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
7584$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007585fi
7586
7587if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
7588then
7589# -pthread, if available, provides the right #defines
7590# and linker options to make pthread_create available
7591# Some compilers won't report that they do not support -pthread,
7592# so we need to run a program to see whether it really made the
7593# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00007594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
7595$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01007596if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007597 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598else
7599 ac_save_cc="$CC"
7600CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00007601if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007602 ac_cv_pthread=no
7603else
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605/* end confdefs.h. */
7606
Stefan Krah7dba5942012-11-22 22:49:11 +01007607#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007608#include <pthread.h>
7609
7610void* routine(void* p){return NULL;}
7611
7612int main(){
7613 pthread_t p;
7614 if(pthread_create(&p,NULL,routine,NULL)!=0)
7615 return 1;
7616 (void)pthread_detach(p);
7617 return 0;
7618}
7619
7620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007621if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007622 ac_cv_pthread=yes
7623else
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007625fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007626rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7627 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007628fi
7629
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007630CC="$ac_save_cc"
7631fi
7632
Matthias Kloseb9621712010-04-24 17:59:49 +00007633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
7634$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007635fi
7636
7637# If we have set a CC compiler flag for thread support then
7638# check if it works for CXX, too.
7639ac_cv_cxx_thread=no
7640if test ! -z "$CXX"
7641then
Matthias Kloseb9621712010-04-24 17:59:49 +00007642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
7643$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007644ac_save_cxx="$CXX"
7645
7646if test "$ac_cv_kpthread" = "yes"
7647then
7648 CXX="$CXX -Kpthread"
7649 ac_cv_cxx_thread=yes
7650elif test "$ac_cv_kthread" = "yes"
7651then
7652 CXX="$CXX -Kthread"
7653 ac_cv_cxx_thread=yes
7654elif test "$ac_cv_pthread" = "yes"
7655then
7656 CXX="$CXX -pthread"
7657 ac_cv_cxx_thread=yes
7658fi
7659
7660if test $ac_cv_cxx_thread = yes
7661then
7662 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
7663 $CXX -c conftest.$ac_ext 2>&5
7664 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
7665 && test -s conftest$ac_exeext && ./conftest$ac_exeext
7666 then
7667 ac_cv_cxx_thread=yes
7668 else
7669 ac_cv_cxx_thread=no
7670 fi
7671 rm -fr conftest*
7672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
7674$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007675fi
7676CXX="$ac_save_cxx"
7677
7678
7679# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00007680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7681$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007682if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007683 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007684else
Matthias Kloseb9621712010-04-24 17:59:49 +00007685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007686/* end confdefs.h. */
7687#include <stdlib.h>
7688#include <stdarg.h>
7689#include <string.h>
7690#include <float.h>
7691
7692int
7693main ()
7694{
7695
7696 ;
7697 return 0;
7698}
7699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007700if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007701 ac_cv_header_stdc=yes
7702else
Matthias Kloseb9621712010-04-24 17:59:49 +00007703 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007704fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7706
7707if test $ac_cv_header_stdc = yes; then
7708 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007710/* end confdefs.h. */
7711#include <string.h>
7712
7713_ACEOF
7714if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 $EGREP "memchr" >/dev/null 2>&1; then :
7716
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007717else
7718 ac_cv_header_stdc=no
7719fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007720rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007721
7722fi
7723
7724if test $ac_cv_header_stdc = yes; then
7725 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007727/* end confdefs.h. */
7728#include <stdlib.h>
7729
7730_ACEOF
7731if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007732 $EGREP "free" >/dev/null 2>&1; then :
7733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007734else
7735 ac_cv_header_stdc=no
7736fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007737rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007738
7739fi
7740
7741if test $ac_cv_header_stdc = yes; then
7742 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007744 :
7745else
Matthias Kloseb9621712010-04-24 17:59:49 +00007746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007747/* end confdefs.h. */
7748#include <ctype.h>
7749#include <stdlib.h>
7750#if ((' ' & 0x0FF) == 0x020)
7751# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7752# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7753#else
7754# define ISLOWER(c) \
7755 (('a' <= (c) && (c) <= 'i') \
7756 || ('j' <= (c) && (c) <= 'r') \
7757 || ('s' <= (c) && (c) <= 'z'))
7758# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7759#endif
7760
7761#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7762int
7763main ()
7764{
7765 int i;
7766 for (i = 0; i < 256; i++)
7767 if (XOR (islower (i), ISLOWER (i))
7768 || toupper (i) != TOUPPER (i))
7769 return 2;
7770 return 0;
7771}
7772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007773if ac_fn_c_try_run "$LINENO"; then :
7774
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007775else
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007777fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007778rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7779 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007780fi
7781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007782fi
7783fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7785$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007786if test $ac_cv_header_stdc = yes; then
7787
Matthias Kloseb9621712010-04-24 17:59:49 +00007788$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007789
7790fi
7791
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007792for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00007793fcntl.h grp.h \
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +02007794ieeefp.h io.h langinfo.h libintl.h process.h pthread.h \
Benjamin Peterson4fe55102016-09-06 11:58:01 -07007795sched.h shadow.h signal.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00007796unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01007797poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01007798sys/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 +01007799sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Benjamin Petersonfb2ae152016-12-19 23:54:25 -08007800sys/param.h sys/random.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01007801sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00007802sys/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 -07007803libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07007804linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
Christian Heimes985ecdc2013-11-20 11:46:18 +01007805sys/endian.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007806do :
7807 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7808ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007809if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007810 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007811#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007812_ACEOF
7813
7814fi
7815
Guido van Rossum627b2d71993-12-24 10:39:16 +00007816done
7817
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007818ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007819for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7822$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007823if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00007825else
Matthias Kloseb9621712010-04-24 17:59:49 +00007826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007827/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007828#include <sys/types.h>
7829#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00007830
Martin v. Löwis11437992002-04-12 09:54:03 +00007831int
7832main ()
7833{
7834if ((DIR *) 0)
7835return 0;
7836 ;
7837 return 0;
7838}
7839_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007840if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007841 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00007842else
Matthias Kloseb9621712010-04-24 17:59:49 +00007843 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007844fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847eval ac_res=\$$as_ac_Header
7848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7849$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007850if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007851 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007852#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007853_ACEOF
7854
7855ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007856fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007857
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007858done
7859# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7860if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7862$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007863if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007864 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007865else
Martin v. Löwis11437992002-04-12 09:54:03 +00007866 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007868/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007870/* Override any GCC internal prototype to avoid an error.
7871 Use char because int might match the return type of a GCC
7872 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007873#ifdef __cplusplus
7874extern "C"
7875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007876char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007877int
7878main ()
7879{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007880return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 ;
7882 return 0;
7883}
7884_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007885for ac_lib in '' dir; do
7886 if test -z "$ac_lib"; then
7887 ac_res="none required"
7888 else
7889 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007890 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007892 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007893 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007894fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007895rm -f core conftest.err conftest.$ac_objext \
7896 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007897 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007898 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007899fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900done
Victor Stinnere0be4232011-10-25 13:06:09 +02007901if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007902
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903else
7904 ac_cv_search_opendir=no
7905fi
7906rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007907LIBS=$ac_func_search_save_LIBS
7908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7910$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007911ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007912if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007914
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007915fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007916
Michael W. Hudson54241132001-12-07 15:38:26 +00007917else
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7919$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007920if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007921 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007922else
7923 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007927/* Override any GCC internal prototype to avoid an error.
7928 Use char because int might match the return type of a GCC
7929 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007930#ifdef __cplusplus
7931extern "C"
7932#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007933char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007934int
7935main ()
7936{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007937return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007938 ;
7939 return 0;
7940}
7941_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007942for ac_lib in '' x; do
7943 if test -z "$ac_lib"; then
7944 ac_res="none required"
7945 else
7946 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007947 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007948 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007949 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007950 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007951fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007952rm -f core conftest.err conftest.$ac_objext \
7953 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007954 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007955 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007957done
Victor Stinnere0be4232011-10-25 13:06:09 +02007958if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007959
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007960else
7961 ac_cv_search_opendir=no
7962fi
7963rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007964LIBS=$ac_func_search_save_LIBS
7965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7967$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007968ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007969if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007970 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007971
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007972fi
7973
7974fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007975
Matthias Kloseb9621712010-04-24 17:59:49 +00007976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7977$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007978if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007980else
Matthias Kloseb9621712010-04-24 17:59:49 +00007981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007982/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007983#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007984int
7985main ()
7986{
7987return makedev(0, 0);
7988 ;
7989 return 0;
7990}
7991_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007992if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007993 ac_cv_header_sys_types_h_makedev=yes
7994else
Matthias Kloseb9621712010-04-24 17:59:49 +00007995 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007997rm -f core conftest.err conftest.$ac_objext \
7998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007999
8000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
8002$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008003
8004if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008005ac_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 +02008006if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008007
Matthias Kloseb9621712010-04-24 17:59:49 +00008008$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008009
8010fi
8011
8012
8013
8014 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008015 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 +02008016if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008017
Matthias Kloseb9621712010-04-24 17:59:49 +00008018$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00008019
8020fi
8021
8022
8023 fi
8024fi
8025
Michael W. Hudson54241132001-12-07 15:38:26 +00008026
Benjamin Peterson93b2dee2016-09-09 10:22:45 -07008027# bluetooth/bluetooth.h has been known to not compile with -std=c99.
8028# http://permalink.gmane.org/gmane.linux.bluez.kernel/22294
8029SAVE_CFLAGS=$CFLAGS
8030CFLAGS="-std=c99 $CFLAGS"
8031for ac_header in bluetooth/bluetooth.h
8032do :
8033 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8034if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8035 cat >>confdefs.h <<_ACEOF
8036#define HAVE_BLUETOOTH_BLUETOOTH_H 1
8037_ACEOF
8038
8039fi
8040
8041done
8042
8043CFLAGS=$SAVE_CFLAGS
8044
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008045# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
8046for ac_header in net/if.h
8047do :
8048 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
8049#ifdef STDC_HEADERS
8050# include <stdlib.h>
8051# include <stddef.h>
8052#else
8053# ifdef HAVE_STDLIB_H
8054# include <stdlib.h>
8055# endif
8056#endif
8057#ifdef HAVE_SYS_SOCKET_H
8058# include <sys/socket.h>
8059#endif
8060
8061"
Victor Stinnere0be4232011-10-25 13:06:09 +02008062if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07008063 cat >>confdefs.h <<_ACEOF
8064#define HAVE_NET_IF_H 1
8065_ACEOF
8066
8067fi
8068
8069done
8070
8071
Martin v. Löwis11017b12006-01-14 18:12:57 +00008072# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00008073for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00008074do :
8075 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 +00008076#ifdef HAVE_ASM_TYPES_H
8077#include <asm/types.h>
8078#endif
8079#ifdef HAVE_SYS_SOCKET_H
8080#include <sys/socket.h>
8081#endif
8082
Matthias Kloseb9621712010-04-24 17:59:49 +00008083"
Victor Stinnere0be4232011-10-25 13:06:09 +02008084if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00008085 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008086#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00008087_ACEOF
8088
8089fi
8090
8091done
8092
8093
Charles-François Natali47413c12011-10-06 19:47:44 +02008094# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01008095for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02008096do :
8097 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8098ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
8099#ifdef HAVE_SYS_SOCKET_H
8100#include <sys/socket.h>
8101#endif
8102
8103"
8104if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8105 cat >>confdefs.h <<_ACEOF
8106#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8107_ACEOF
8108
8109fi
8110
8111done
8112
8113
Guido van Rossum627b2d71993-12-24 10:39:16 +00008114# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00008115was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
8117$as_echo_n "checking for clock_t in time.h... " >&6; }
8118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008119/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008120#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008121
8122_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008124 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00008125 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00008126else
Martin v. Löwis11437992002-04-12 09:54:03 +00008127
8128
Matthias Kloseb9621712010-04-24 17:59:49 +00008129$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00008130
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008131
Guido van Rossum627b2d71993-12-24 10:39:16 +00008132fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008133rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008134
Matthias Kloseb9621712010-04-24 17:59:49 +00008135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
8136$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00008137
Matthias Kloseb9621712010-04-24 17:59:49 +00008138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
8139$as_echo_n "checking for makedev... " >&6; }
8140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008141/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008142
Jesus Cea740f53a2010-04-28 11:35:30 +00008143#if defined(MAJOR_IN_MKDEV)
8144#include <sys/mkdev.h>
8145#elif defined(MAJOR_IN_SYSMACROS)
8146#include <sys/sysmacros.h>
8147#else
8148#include <sys/types.h>
8149#endif
8150
Neal Norwitz11690112002-07-30 01:08:28 +00008151int
8152main ()
8153{
Jesus Cea740f53a2010-04-28 11:35:30 +00008154
8155 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00008156 ;
8157 return 0;
8158}
Matthias Kloseb159a552010-04-25 21:00:44 +00008159
Neal Norwitz11690112002-07-30 01:08:28 +00008160_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008161if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00008162 ac_cv_has_makedev=yes
8163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00008165fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008166rm -f core conftest.err conftest.$ac_objext \
8167 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
8169$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00008170if test "$ac_cv_has_makedev" = "yes"; then
8171
Matthias Kloseb9621712010-04-24 17:59:49 +00008172$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00008173
8174fi
8175
Christian Heimes985ecdc2013-11-20 11:46:18 +01008176# byte swapping
8177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for le64toh" >&5
8178$as_echo_n "checking for le64toh... " >&6; }
8179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8180/* end confdefs.h. */
8181
8182#ifdef HAVE_ENDIAN_H
8183#include <endian.h>
8184#elif defined(HAVE_SYS_ENDIAN_H)
8185#include <sys/endian.h>
8186#endif
8187
8188int
8189main ()
8190{
8191
8192 le64toh(1)
8193 ;
8194 return 0;
8195}
8196
8197_ACEOF
8198if ac_fn_c_try_link "$LINENO"; then :
8199 ac_cv_has_le64toh=yes
8200else
8201 ac_cv_has_le64toh=no
8202fi
8203rm -f core conftest.err conftest.$ac_objext \
8204 conftest$ac_exeext conftest.$ac_ext
8205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_le64toh" >&5
8206$as_echo "$ac_cv_has_le64toh" >&6; }
8207if test "$ac_cv_has_le64toh" = "yes"; then
8208
8209$as_echo "#define HAVE_HTOLE64 1" >>confdefs.h
8210
8211fi
8212
Martin v. Löwis399a6892002-10-04 10:22:02 +00008213# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
8214# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
8215# defined, but the compiler does not support pragma redefine_extname,
8216# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
8217# structures (such as rlimit64) without declaring them. As a
8218# work-around, disable LFS on such configurations
8219
8220use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00008221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
8222$as_echo_n "checking Solaris LFS bug... " >&6; }
8223cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008224/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00008225
8226#define _LARGEFILE_SOURCE 1
8227#define _FILE_OFFSET_BITS 64
8228#include <sys/resource.h>
8229
Martin v. Löwis399a6892002-10-04 10:22:02 +00008230int
8231main ()
8232{
8233struct rlimit foo;
8234 ;
8235 return 0;
8236}
8237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008238if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00008239 sol_lfs_bug=no
8240else
Matthias Kloseb9621712010-04-24 17:59:49 +00008241 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00008242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
8245$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00008246if test "$sol_lfs_bug" = "yes"; then
8247 use_lfs=no
8248fi
8249
doko@ubuntu.com006a56c2016-06-14 10:15:25 +02008250# Don't use largefile support for GNU/Hurd
8251case $ac_sys_system in GNU*)
8252 use_lfs=no
8253esac
8254
Martin v. Löwis399a6892002-10-04 10:22:02 +00008255if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00008256# Two defines needed to enable largefile support on various platforms
8257# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00008258case $ac_sys_system/$ac_sys_release in
8259AIX*)
8260
8261$as_echo "#define _LARGE_FILES 1" >>confdefs.h
8262
8263 ;;
8264esac
Guido van Rossum810cc512001-09-09 23:51:39 +00008265
Matthias Kloseb9621712010-04-24 17:59:49 +00008266$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008267
8268
Matthias Kloseb9621712010-04-24 17:59:49 +00008269$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00008270
Martin v. Löwis399a6892002-10-04 10:22:02 +00008271fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008272
Guido van Rossum84e7b241996-08-19 21:59:00 +00008273# Add some code to confdefs.h so that the test for off_t works on SCO
8274cat >> confdefs.h <<\EOF
8275#if defined(SCO_DS)
8276#undef _OFF_T
8277#endif
8278EOF
8279
Guido van Rossumef2255b2000-03-10 22:30:29 +00008280# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00008281ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008282if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008283
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008284else
Martin v. Löwis11437992002-04-12 09:54:03 +00008285
8286cat >>confdefs.h <<_ACEOF
8287#define mode_t int
8288_ACEOF
8289
8290fi
8291
Matthias Kloseb9621712010-04-24 17:59:49 +00008292ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008293if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008294
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008295else
Martin v. Löwis11437992002-04-12 09:54:03 +00008296
8297cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008298#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00008299_ACEOF
8300
8301fi
8302
Matthias Kloseb9621712010-04-24 17:59:49 +00008303ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008304if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008305
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008306else
Martin v. Löwis11437992002-04-12 09:54:03 +00008307
8308cat >>confdefs.h <<_ACEOF
8309#define pid_t int
8310_ACEOF
8311
8312fi
8313
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00008314
Martin v. Löwis11437992002-04-12 09:54:03 +00008315cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00008316#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00008317_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008318
Matthias Kloseb9621712010-04-24 17:59:49 +00008319ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008320if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00008321
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008322else
Martin v. Löwis11437992002-04-12 09:54:03 +00008323
8324cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008325#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00008326_ACEOF
8327
8328fi
8329
Matthias Kloseb9621712010-04-24 17:59:49 +00008330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8331$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008332if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008333 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008334else
Matthias Kloseb9621712010-04-24 17:59:49 +00008335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008336/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008337#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008338
8339_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008340if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00008341 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008342 ac_cv_type_uid_t=yes
8343else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008344 ac_cv_type_uid_t=no
8345fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00008346rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008347
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008348fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008349{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8350$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008351if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008352
Matthias Kloseb9621712010-04-24 17:59:49 +00008353$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008354
8355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008357
8358fi
8359
Mark Dickinson983bc162012-12-02 12:11:38 +00008360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02008362if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363
Matthias Kloseb9621712010-04-24 17:59:49 +00008364$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00008365
8366fi
8367
Stefan Krah1919b7e2012-03-21 18:25:23 +01008368ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
8369if test "x$ac_cv_type___uint128_t" = xyes; then :
8370
8371$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
8372
8373fi
8374
Jack Jansendd19cf82001-12-06 22:36:17 +00008375
Michael W. Hudson54241132001-12-07 15:38:26 +00008376# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008377# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008378# The cast to long int works around a bug in the HP C Compiler
8379# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8380# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8381# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
8383$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008384if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008386else
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008388
Martin v. Löwis11437992002-04-12 09:54:03 +00008389else
Matthias Kloseb9621712010-04-24 17:59:49 +00008390 if test "$ac_cv_type_int" = yes; then
8391 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008393as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02008394See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008395 else
8396 ac_cv_sizeof_int=0
8397 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008398fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008399
Martin v. Löwis11437992002-04-12 09:54:03 +00008400fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
8402$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403
8404
8405
Martin v. Löwis11437992002-04-12 09:54:03 +00008406cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008407#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008408_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008409
8410
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411# The cast to long int works around a bug in the HP C Compiler
8412# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8413# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8414# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
8416$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008417if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008418 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008419else
Matthias Kloseb9621712010-04-24 17:59:49 +00008420 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008421
Martin v. Löwis11437992002-04-12 09:54:03 +00008422else
Matthias Kloseb9621712010-04-24 17:59:49 +00008423 if test "$ac_cv_type_long" = yes; then
8424 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8425$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008426as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02008427See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428 else
8429 ac_cv_sizeof_long=0
8430 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008432
Martin v. Löwis11437992002-04-12 09:54:03 +00008433fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
8435$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008436
8437
8438
Martin v. Löwis11437992002-04-12 09:54:03 +00008439cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008440#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008441_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008442
8443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444# The cast to long int works around a bug in the HP C Compiler
8445# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8446# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8447# This bug is HP SR number 8606223364.
Benjamin Petersoned4aa832016-09-05 17:44:18 -07008448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
8449$as_echo_n "checking size of long long... " >&6; }
8450if ${ac_cv_sizeof_long_long+:} false; then :
8451 $as_echo_n "(cached) " >&6
8452else
8453 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
8454
8455else
8456 if test "$ac_cv_type_long_long" = yes; then
8457 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8459as_fn_error 77 "cannot compute sizeof (long long)
8460See \`config.log' for more details" "$LINENO" 5; }
8461 else
8462 ac_cv_sizeof_long_long=0
8463 fi
8464fi
8465
8466fi
8467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
8468$as_echo "$ac_cv_sizeof_long_long" >&6; }
8469
8470
8471
8472cat >>confdefs.h <<_ACEOF
8473#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
8474_ACEOF
8475
8476
8477# The cast to long int works around a bug in the HP C Compiler
8478# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8479# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8480# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
8482$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008483if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008484 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008485else
Matthias Kloseb9621712010-04-24 17:59:49 +00008486 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 +00008487
Martin v. Löwis11437992002-04-12 09:54:03 +00008488else
Matthias Kloseb9621712010-04-24 17:59:49 +00008489 if test "$ac_cv_type_void_p" = yes; then
8490 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008492as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02008493See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494 else
8495 ac_cv_sizeof_void_p=0
8496 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008497fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008498
Martin v. Löwis11437992002-04-12 09:54:03 +00008499fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
8501$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008502
8503
8504
Martin v. Löwis11437992002-04-12 09:54:03 +00008505cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008506#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008507_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008508
8509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008510# The cast to long int works around a bug in the HP C Compiler
8511# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8512# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8513# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
8515$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008516if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008517 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008518else
Matthias Kloseb9621712010-04-24 17:59:49 +00008519 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 +00008520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521else
Matthias Kloseb9621712010-04-24 17:59:49 +00008522 if test "$ac_cv_type_short" = yes; then
8523 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8524$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008525as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02008526See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008527 else
8528 ac_cv_sizeof_short=0
8529 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008531
Martin v. Löwis11437992002-04-12 09:54:03 +00008532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
8534$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008535
8536
8537
Martin v. Löwis11437992002-04-12 09:54:03 +00008538cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008539#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008540_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008541
8542
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543# The cast to long int works around a bug in the HP C Compiler
8544# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8545# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8546# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
8548$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008549if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008550 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008551else
Matthias Kloseb9621712010-04-24 17:59:49 +00008552 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 +00008553
Martin v. Löwis11437992002-04-12 09:54:03 +00008554else
Matthias Kloseb9621712010-04-24 17:59:49 +00008555 if test "$ac_cv_type_float" = yes; then
8556 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8557$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008558as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02008559See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560 else
8561 ac_cv_sizeof_float=0
8562 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008563fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008564
Martin v. Löwis11437992002-04-12 09:54:03 +00008565fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
8567$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008568
8569
8570
Martin v. Löwis11437992002-04-12 09:54:03 +00008571cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008572#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008573_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008574
8575
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008576# The cast to long int works around a bug in the HP C Compiler
8577# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8578# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8579# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
8581$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008582if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008583 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008584else
Matthias Kloseb9621712010-04-24 17:59:49 +00008585 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 +00008586
Martin v. Löwis11437992002-04-12 09:54:03 +00008587else
Matthias Kloseb9621712010-04-24 17:59:49 +00008588 if test "$ac_cv_type_double" = yes; then
8589 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008591as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008592See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008593 else
8594 ac_cv_sizeof_double=0
8595 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008596fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008597
Martin v. Löwis11437992002-04-12 09:54:03 +00008598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
8600$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008601
8602
8603
Martin v. Löwis11437992002-04-12 09:54:03 +00008604cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008605#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008606_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008607
8608
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609# The cast to long int works around a bug in the HP C Compiler
8610# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8611# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8612# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
8614$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008615if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008616 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008617else
Matthias Kloseb9621712010-04-24 17:59:49 +00008618 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 +00008619
Martin v. Löwis11437992002-04-12 09:54:03 +00008620else
Matthias Kloseb9621712010-04-24 17:59:49 +00008621 if test "$ac_cv_type_fpos_t" = yes; then
8622 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8623$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008624as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008625See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008626 else
8627 ac_cv_sizeof_fpos_t=0
8628 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008629fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008630
Martin v. Löwis11437992002-04-12 09:54:03 +00008631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
8633$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634
8635
8636
Martin v. Löwis11437992002-04-12 09:54:03 +00008637cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008638#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008639_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008640
Michael W. Hudson54241132001-12-07 15:38:26 +00008641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642# The cast to long int works around a bug in the HP C Compiler
8643# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8644# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8645# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
8647$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008648if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008649 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008650else
Matthias Kloseb9621712010-04-24 17:59:49 +00008651 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 +00008652
Martin v. Löwis18e16552006-02-15 17:27:45 +00008653else
Matthias Kloseb9621712010-04-24 17:59:49 +00008654 if test "$ac_cv_type_size_t" = yes; then
8655 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8656$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008657as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008658See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008659 else
8660 ac_cv_sizeof_size_t=0
8661 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00008662fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008663
Martin v. Löwis18e16552006-02-15 17:27:45 +00008664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
8666$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008667
8668
8669
Martin v. Löwis18e16552006-02-15 17:27:45 +00008670cat >>confdefs.h <<_ACEOF
8671#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
8672_ACEOF
8673
8674
Christian Heimes400adb02008-02-01 08:12:03 +00008675# The cast to long int works around a bug in the HP C Compiler
8676# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8677# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8678# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
8680$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008681if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008682 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00008683else
Matthias Kloseb9621712010-04-24 17:59:49 +00008684 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 +00008685
Christian Heimes400adb02008-02-01 08:12:03 +00008686else
Matthias Kloseb9621712010-04-24 17:59:49 +00008687 if test "$ac_cv_type_pid_t" = yes; then
8688 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8689$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008690as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008691See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00008692 else
8693 ac_cv_sizeof_pid_t=0
8694 fi
8695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008696
Christian Heimes400adb02008-02-01 08:12:03 +00008697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
8699$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00008700
8701
8702
8703cat >>confdefs.h <<_ACEOF
8704#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
8705_ACEOF
8706
8707
Benjamin Petersondf6ff7b2016-09-06 13:53:14 -07008708# The cast to long int works around a bug in the HP C Compiler
8709# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8710# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8711# This bug is HP SR number 8606223364.
8712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8713$as_echo_n "checking size of uintptr_t... " >&6; }
8714if ${ac_cv_sizeof_uintptr_t+:} false; then :
8715 $as_echo_n "(cached) " >&6
8716else
8717 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default"; then :
8718
8719else
8720 if test "$ac_cv_type_uintptr_t" = yes; then
8721 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8722$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8723as_fn_error 77 "cannot compute sizeof (uintptr_t)
8724See \`config.log' for more details" "$LINENO" 5; }
8725 else
8726 ac_cv_sizeof_uintptr_t=0
8727 fi
8728fi
8729
8730fi
8731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8732$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
8733
8734
8735
8736cat >>confdefs.h <<_ACEOF
8737#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
8738_ACEOF
8739
8740
Michael W. Hudson54241132001-12-07 15:38:26 +00008741
Matthias Kloseb9621712010-04-24 17:59:49 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
8743$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008744have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008746/* end confdefs.h. */
8747
8748int
8749main ()
8750{
8751long double x; x = (long double)0;
8752 ;
8753 return 0;
8754}
8755_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008756if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008757
8758
Matthias Kloseb9621712010-04-24 17:59:49 +00008759$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008760
8761 have_long_double=yes
8762
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008763fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
8766$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008767if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008768# The cast to long int works around a bug in the HP C Compiler
8769# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8770# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8771# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
8773$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008774if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008775 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008776else
Matthias Kloseb9621712010-04-24 17:59:49 +00008777 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 +00008778
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008779else
Matthias Kloseb9621712010-04-24 17:59:49 +00008780 if test "$ac_cv_type_long_double" = yes; then
8781 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8782$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008783as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02008784See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008785 else
8786 ac_cv_sizeof_long_double=0
8787 fi
8788fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008789
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008790fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
8792$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00008793
8794
8795
8796cat >>confdefs.h <<_ACEOF
8797#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
8798_ACEOF
8799
8800
8801fi
8802
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008803# The cast to long int works around a bug in the HP C Compiler
8804# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8805# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8806# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8808$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008809if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008810 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008811else
Matthias Kloseb9621712010-04-24 17:59:49 +00008812 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 +00008813
Thomas Woutersb2137042007-02-01 18:02:27 +00008814else
Matthias Kloseb9621712010-04-24 17:59:49 +00008815 if test "$ac_cv_type__Bool" = yes; then
8816 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8817$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008818as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008819See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820 else
8821 ac_cv_sizeof__Bool=0
8822 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008823fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008824
Thomas Woutersb2137042007-02-01 18:02:27 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8827$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828
8829
8830
Thomas Woutersb2137042007-02-01 18:02:27 +00008831cat >>confdefs.h <<_ACEOF
8832#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8833_ACEOF
8834
8835
Thomas Woutersb2137042007-02-01 18:02:27 +00008836
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008837# The cast to long int works around a bug in the HP C Compiler
8838# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8839# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8840# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8842$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008843if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008845else
Matthias Kloseb9621712010-04-24 17:59:49 +00008846 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008847#ifdef HAVE_SYS_TYPES_H
8848#include <sys/types.h>
8849#endif
8850
Matthias Kloseb9621712010-04-24 17:59:49 +00008851"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008852
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008853else
Matthias Kloseb9621712010-04-24 17:59:49 +00008854 if test "$ac_cv_type_off_t" = yes; then
8855 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8856$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008857as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008858See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008859 else
8860 ac_cv_sizeof_off_t=0
8861 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008863
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008864fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8866$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008867
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008868
8869
Martin v. Löwis11437992002-04-12 09:54:03 +00008870cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008871#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008872_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008873
Michael W. Hudson54241132001-12-07 15:38:26 +00008874
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008875
Matthias Kloseb9621712010-04-24 17:59:49 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8877$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008878if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008879 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008880
Matthias Kloseb9621712010-04-24 17:59:49 +00008881$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008882
Matthias Kloseb9621712010-04-24 17:59:49 +00008883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8884$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008885else
Matthias Kloseb9621712010-04-24 17:59:49 +00008886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8887$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008888fi
8889
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008890# The cast to long int works around a bug in the HP C Compiler
8891# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8892# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8893# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8895$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008896if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008897 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008898else
Matthias Kloseb9621712010-04-24 17:59:49 +00008899 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008900#ifdef HAVE_SYS_TYPES_H
8901#include <sys/types.h>
8902#endif
8903#ifdef HAVE_TIME_H
8904#include <time.h>
8905#endif
8906
Matthias Kloseb9621712010-04-24 17:59:49 +00008907"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008908
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008909else
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 if test "$ac_cv_type_time_t" = yes; then
8911 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8912$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008913as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008914See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008915 else
8916 ac_cv_sizeof_time_t=0
8917 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008918fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008919
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008920fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8922$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008923
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008924
8925
Martin v. Löwis11437992002-04-12 09:54:03 +00008926cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008927#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008928_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008929
Michael W. Hudson54241132001-12-07 15:38:26 +00008930
8931
Trent Mick635f6fb2000-08-23 21:33:05 +00008932# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008933ac_save_cc="$CC"
8934if test "$ac_cv_kpthread" = "yes"
8935then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008936elif test "$ac_cv_kthread" = "yes"
8937then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008938elif test "$ac_cv_pthread" = "yes"
8939then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008940fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008941
Matthias Kloseb9621712010-04-24 17:59:49 +00008942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8943$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008944have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008946/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008947
8948 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008949int
8950main ()
8951{
Guido van Rossum12580492000-09-24 16:47:19 +00008952pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 ;
8954 return 0;
8955}
Matthias Kloseb159a552010-04-25 21:00:44 +00008956
Martin v. Löwis11437992002-04-12 09:54:03 +00008957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008958if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008959 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8963$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008964if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008965 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008966# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8967# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8968# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8970$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008971if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008972 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008973else
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008975#ifdef HAVE_PTHREAD_H
8976#include <pthread.h>
8977#endif
8978
Matthias Kloseb9621712010-04-24 17:59:49 +00008979"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008980
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008981else
Matthias Kloseb9621712010-04-24 17:59:49 +00008982 if test "$ac_cv_type_pthread_t" = yes; then
8983 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008985as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008986See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008987 else
8988 ac_cv_sizeof_pthread_t=0
8989 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008991
Trent Mick635f6fb2000-08-23 21:33:05 +00008992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8994$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008995
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008996
8997
Martin v. Löwis11437992002-04-12 09:54:03 +00008998cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008999#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009000_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009001
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00009002
Trent Mick635f6fb2000-08-23 21:33:05 +00009003fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009004CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009005
Michael W. Hudson54241132001-12-07 15:38:26 +00009006
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009007case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009008 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009009 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
9010 ;;
9011 Darwin/*)
9012 OTHER_LIBTOOL_OPT=""
9013 ;;
9014esac
9015
9016
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009017
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009018case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009019 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00009020 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
9021 if test "${enable_universalsdk}"; then
9022 :
9023 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009024 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00009025 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00009026 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009027 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009028 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00009029 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00009030 if test ${gcc_version} '<' 4.0
9031 then
9032 LIBTOOL_CRUFT="-lcc_dynamic"
9033 else
9034 LIBTOOL_CRUFT=""
9035 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009036 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009037 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009038else
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009040/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009041
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009042 #include <unistd.h>
9043 int main(int argc, char*argv[])
9044 {
9045 if (sizeof(long) == 4) {
9046 return 0;
9047 } else {
9048 return 1;
9049 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00009050 }
9051
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009053if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009054 ac_osx_32bit=yes
9055else
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009057fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9059 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009060fi
9061
9062
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009063 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009064 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009065 i386)
9066 MACOSX_DEFAULT_ARCH="i386"
9067 ;;
9068 ppc)
9069 MACOSX_DEFAULT_ARCH="ppc"
9070 ;;
9071 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009072 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009073 ;;
9074 esac
9075 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00009076 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009077 i386)
9078 MACOSX_DEFAULT_ARCH="x86_64"
9079 ;;
9080 ppc)
9081 MACOSX_DEFAULT_ARCH="ppc64"
9082 ;;
9083 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009084 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009085 ;;
9086 esac
9087
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00009088 fi
9089
9090 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00009091 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009092 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009093esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
9095$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009096if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009097then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009098 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009099 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009100 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009101
Matthias Kloseb9621712010-04-24 17:59:49 +00009102$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009103
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9105$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00009106 if test $enable_shared = "yes"
9107 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009108 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 +00009109 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009110else
Matthias Kloseb9621712010-04-24 17:59:49 +00009111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9112$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009113fi
9114
Matthias Kloseb9621712010-04-24 17:59:49 +00009115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
9116$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009117case $ac_sys_system/$ac_sys_release in
9118 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009119
Matthias Kloseb9621712010-04-24 17:59:49 +00009120$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009121
Matthias Kloseb9621712010-04-24 17:59:49 +00009122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
9123$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009124 ;;
9125 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00009126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9127$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00009128 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009129esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009130
Guido van Rossum0a516c91994-09-12 10:58:40 +00009131# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009132
Michael W. Hudson54241132001-12-07 15:38:26 +00009133
9134
9135
9136
Benjamin Peterson99f03762010-04-11 22:15:28 +00009137
Thomas Wouters477c8d52006-05-27 19:21:47 +00009138
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07009139# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
9140# -- usually .so, .sl on HP-UX, .dll on Cygwin
9141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
9142$as_echo_n "checking the extension of shared libraries... " >&6; }
9143if test -z "$SHLIB_SUFFIX"; then
9144 case $ac_sys_system in
9145 hp*|HP*)
9146 case `uname -m` in
9147 ia64) SHLIB_SUFFIX=.so;;
9148 *) SHLIB_SUFFIX=.sl;;
9149 esac
9150 ;;
9151 CYGWIN*) SHLIB_SUFFIX=.dll;;
9152 *) SHLIB_SUFFIX=.so;;
9153 esac
9154fi
9155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
9156$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00009157
Guido van Rossum0a516c91994-09-12 10:58:40 +00009158# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009159# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009160# (Shared libraries in this instance are shared modules to be loaded into
9161# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00009162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
9163$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009164if test -z "$LDSHARED"
9165then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009166 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009167 AIX*)
Martin Panter395733d2016-11-20 07:56:37 +00009168 BLDSHARED="Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Martin Panter5de141f2016-08-27 04:00:19 +00009169 LDSHARED="\$(LIBPL)/ld_so_aix \$(CC) -bI:\$(LIBPL)/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009170 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009171 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009172 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009173 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009174 if test "$GCC" = "yes" ; then
9175 LDSHARED='$(CC) -shared'
9176 LDCXXSHARED='$(CXX) -shared'
9177 else
9178 LDSHARED='$(CC) -G'
9179 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00009180 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009181 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009182 if test "$GCC" = "yes" ; then
9183 LDSHARED='$(CC) -shared'
9184 LDCXXSHARED='$(CXX) -shared'
9185 else
9186 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00009187 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00009188 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009189 LDSHARED='$(CC) -bundle'
9190 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00009191 if test "$enable_framework" ; then
9192 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009193 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9194 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009195 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009196 else
9197 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009198 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00009199 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009200 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009201 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009202 LDSHARED='$(CC) -bundle'
9203 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00009204 if test "$enable_framework" ; then
9205 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009206 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9207 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009208 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009209 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009210 # No framework, use the Python app as bundle-loader
9211 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009212 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009213 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009214 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009215 Darwin/*)
9216 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9217 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00009218
Ned Deily36820b62014-06-25 13:44:22 -07009219 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9220 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
9221 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
9222 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
9223 if test ${dep_target_major} -eq 10 && \
9224 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00009225 then
Ned Deily36820b62014-06-25 13:44:22 -07009226 # building for OS X 10.0 through 10.2
Antoine Pitroud4958c22010-10-13 17:01:10 +00009227 LDSHARED='$(CC) -bundle'
9228 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00009229 if test "$enable_framework" ; then
9230 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00009231 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
9232 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009233 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009234 else
9235 # No framework, use the Python app as bundle-loader
9236 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9237 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00009238 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00009239 fi
Ned Deily36820b62014-06-25 13:44:22 -07009240 else
9241 # building for OS X 10.3 and later
9242 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
9243 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
9244 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00009245 fi
9246 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009247 Linux*|GNU*|QNX*)
9248 LDSHARED='$(CC) -shared'
9249 LDCXXSHARED='$(CXX) -shared';;
9250 BSD/OS*/4*)
9251 LDSHARED="gcc -shared"
9252 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009253 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009254 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009255 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009256 LDSHARED='$(CC) -shared'
9257 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00009258 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00009259 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00009260 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009261 OpenBSD*)
9262 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9263 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00009264 LDSHARED='$(CC) -shared $(CCSHARED)'
9265 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009266 else
9267 case `uname -r` in
9268 [01].* | 2.[0-7] | 2.[0-7].*)
9269 LDSHARED="ld -Bshareable ${LDFLAGS}"
9270 ;;
9271 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00009272 LDSHARED='$(CC) -shared $(CCSHARED)'
9273 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00009274 ;;
9275 esac
9276 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009277 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00009278 LDSHARED='$(CC) -shared'
9279 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009280 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00009281 if test "$GCC" = "yes" ; then
9282 LDSHARED='$(CC) -shared'
9283 LDCXXSHARED='$(CXX) -shared'
9284 else
9285 LDSHARED='$(CC) -G'
9286 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009287 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00009288 SCO_SV*)
9289 LDSHARED='$(CC) -Wl,-G,-Bexport'
9290 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
9291 CYGWIN*)
9292 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
9293 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009294 *) LDSHARED="ld";;
9295 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009296fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
9298$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00009299LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009300BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009301# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009302# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
9304$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009305if test -z "$CCSHARED"
9306then
Guido van Rossum07397971997-04-29 21:49:50 +00009307 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009308 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009309 then CCSHARED="-fPIC";
9310 elif test `uname -p` = sparc;
9311 then CCSHARED="-xcode=pic32";
9312 else CCSHARED="-Kpic";
9313 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009314 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009315 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009316 else CCSHARED="+z";
9317 fi;;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009318 Linux-android*) ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009319 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009320 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009321 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009322 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009323 if test "$GCC" = "yes"
9324 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009325 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009326 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009327 SCO_SV*)
9328 if test "$GCC" = "yes"
9329 then CCSHARED="-fPIC"
9330 else CCSHARED="-Kpic -belf"
9331 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009332 IRIX*/6*) case $CC in
9333 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009334 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009335 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009336 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009337fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
9339$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009340# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009341# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00009342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
9343$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009344if test -z "$LINKFORSHARED"
9345then
Guido van Rossum07397971997-04-29 21:49:50 +00009346 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009347 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009348 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009349 LINKFORSHARED="-Wl,-E -Wl,+s";;
9350# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009351 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Xavier de Gaye2a352b62017-01-04 21:51:16 +01009352 Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009353 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009354 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00009356 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02009357
9358 # Issue #18075: the default maximum stack size (8MBytes) is too
9359 # small for the default recursion limit. Increase the stack size
9360 # to ensure that tests don't crash
9361 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
9362
Jack Jansene578a632001-08-15 01:27:14 +00009363 if test "$enable_framework"
9364 then
Jack Jansenda49e192005-01-07 13:08:22 +00009365 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009366 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00009367 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009368 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009369 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009370 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00009371 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009372 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9373 then
9374 LINKFORSHARED="-Wl,--export-dynamic"
9375 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009376 SunOS/5*) case $CC in
9377 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009378 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009379 then
9380 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009381 fi;;
9382 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009383 CYGWIN*)
9384 if test $enable_shared = "no"
9385 then
9386 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9387 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00009388 QNX*)
9389 # -Wl,-E causes the symbols to be added to the dynamic
9390 # symbol table so that they can be found when a module
9391 # is loaded. -N 2048K causes the stack size to be set
9392 # to 2048 kilobytes so that the stack doesn't overflow
9393 # when running test_compile.py.
9394 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009395 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009396fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
9398$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00009399
Michael W. Hudson54241132001-12-07 15:38:26 +00009400
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00009401
Matthias Kloseb9621712010-04-24 17:59:49 +00009402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
9403$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009404if test ! "$LIBRARY" = "$LDLIBRARY"
9405then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009406 case $ac_sys_system in
9407 CYGWIN*)
9408 # Cygwin needs CCSHARED when building extension DLLs
9409 # but not when building the interpreter DLL.
9410 CFLAGSFORSHARED='';;
9411 *)
9412 CFLAGSFORSHARED='$(CCSHARED)'
9413 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009414fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
9416$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009417
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009418# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9419# library (with --enable-shared).
9420# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009421# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9422# if it is not required, since it creates a dependency of the shared library
9423# to LIBS. This, in turn, means that applications linking the shared libpython
9424# don't need to link LIBS explicitly. The default should be only changed
9425# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009426
Matthias Kloseb9621712010-04-24 17:59:49 +00009427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
9428$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009429case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009430 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009431 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009432esac
Matthias Kloseb9621712010-04-24 17:59:49 +00009433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
9434$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009435
9436
Guido van Rossum627b2d71993-12-24 10:39:16 +00009437# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00009438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
9439$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009440if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009441 $as_echo_n "(cached) " >&6
9442else
9443 ac_check_lib_save_LIBS=$LIBS
9444LIBS="-lsendfile $LIBS"
9445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9446/* end confdefs.h. */
9447
9448/* Override any GCC internal prototype to avoid an error.
9449 Use char because int might match the return type of a GCC
9450 builtin and then its argument prototype would still apply. */
9451#ifdef __cplusplus
9452extern "C"
9453#endif
9454char sendfile ();
9455int
9456main ()
9457{
9458return sendfile ();
9459 ;
9460 return 0;
9461}
9462_ACEOF
9463if ac_fn_c_try_link "$LINENO"; then :
9464 ac_cv_lib_sendfile_sendfile=yes
9465else
9466 ac_cv_lib_sendfile_sendfile=no
9467fi
9468rm -f core conftest.err conftest.$ac_objext \
9469 conftest$ac_exeext conftest.$ac_ext
9470LIBS=$ac_check_lib_save_LIBS
9471fi
9472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
9473$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009474if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00009475 cat >>confdefs.h <<_ACEOF
9476#define HAVE_LIBSENDFILE 1
9477_ACEOF
9478
9479 LIBS="-lsendfile $LIBS"
9480
9481fi
9482
Matthias Kloseb9621712010-04-24 17:59:49 +00009483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
9484$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009485if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009486 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009487else
Martin v. Löwis11437992002-04-12 09:54:03 +00009488 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009489LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009491/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009492
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009493/* Override any GCC internal prototype to avoid an error.
9494 Use char because int might match the return type of a GCC
9495 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009496#ifdef __cplusplus
9497extern "C"
9498#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009499char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009500int
9501main ()
9502{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009503return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 ;
9505 return 0;
9506}
9507_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009508if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009510else
Matthias Kloseb9621712010-04-24 17:59:49 +00009511 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009512fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009513rm -f core conftest.err conftest.$ac_objext \
9514 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009515LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009516fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
9518$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009519if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 cat >>confdefs.h <<_ACEOF
9521#define HAVE_LIBDL 1
9522_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009523
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009524 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009525
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009526fi
9527 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00009528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
9529$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009530if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009531 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009532else
Martin v. Löwis11437992002-04-12 09:54:03 +00009533 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009534LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009537
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009538/* Override any GCC internal prototype to avoid an error.
9539 Use char because int might match the return type of a GCC
9540 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009541#ifdef __cplusplus
9542extern "C"
9543#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009544char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009545int
9546main ()
9547{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 ;
9550 return 0;
9551}
9552_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009553if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009554 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009555else
Matthias Kloseb9621712010-04-24 17:59:49 +00009556 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009558rm -f core conftest.err conftest.$ac_objext \
9559 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009560LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009561fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
9563$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009564if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 cat >>confdefs.h <<_ACEOF
9566#define HAVE_LIBDLD 1
9567_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009568
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009569 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009570
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009571fi
9572 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009573
Georg Brandlb1441c72009-01-03 22:33:39 +00009574# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00009575if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
9577$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009578if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009579 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009580else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009581 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00009582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009584
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585/* Override any GCC internal prototype to avoid an error.
9586 Use char because int might match the return type of a GCC
9587 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009588#ifdef __cplusplus
9589extern "C"
9590#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009591char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009592int
9593main ()
9594{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009595return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 ;
9597 return 0;
9598}
9599_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600for ac_lib in '' pthread rt posix4; do
9601 if test -z "$ac_lib"; then
9602 ac_res="none required"
9603 else
9604 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009605 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009607 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00009609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009610rm -f core conftest.err conftest.$ac_objext \
9611 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02009612 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009615done
Victor Stinnere0be4232011-10-25 13:06:09 +02009616if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618else
9619 ac_cv_search_sem_init=no
9620fi
9621rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009622LIBS=$ac_func_search_save_LIBS
9623fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
9625$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009626ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00009627if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009629
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009630fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009631 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009632 # posix4 on Solaris 2.6
9633 # pthread (first!) on Linux
9634fi
9635
Martin v. Löwis19d17342003-06-14 21:03:05 +00009636# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00009637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
9638$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009639if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009640 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00009641else
9642 ac_check_lib_save_LIBS=$LIBS
9643LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009645/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009646
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009647/* Override any GCC internal prototype to avoid an error.
9648 Use char because int might match the return type of a GCC
9649 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009650#ifdef __cplusplus
9651extern "C"
9652#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00009653char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009654int
9655main ()
9656{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009658 ;
9659 return 0;
9660}
9661_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009662if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009663 ac_cv_lib_intl_textdomain=yes
9664else
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00009666fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009667rm -f core conftest.err conftest.$ac_objext \
9668 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009669LIBS=$ac_check_lib_save_LIBS
9670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
9672$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009673if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00009674
Matthias Kloseb9621712010-04-24 17:59:49 +00009675$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00009676
Brett Cannonc6d936e2009-06-07 20:09:53 +00009677 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00009678fi
9679
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009680
9681# checks for system dependent C++ extensions support
9682case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
9684$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
9685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009686/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009687
Georg Brandl59e87bd2011-02-15 19:48:59 +00009688 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009689int
9690main ()
9691{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009692loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 ;
9694 return 0;
9695}
Matthias Kloseb159a552010-04-25 21:00:44 +00009696
Martin v. Löwis11437992002-04-12 09:54:03 +00009697_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009698if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009699
Matthias Kloseb159a552010-04-25 21:00:44 +00009700
Matthias Kloseb9621712010-04-24 17:59:49 +00009701$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009702
Matthias Kloseb159a552010-04-25 21:00:44 +00009703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009704$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009705
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009706else
Matthias Kloseb159a552010-04-25 21:00:44 +00009707
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009709$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009710
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009711fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009712rm -f core conftest.err conftest.$ac_objext \
9713 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009714 *) ;;
9715esac
9716
Christian Heimes985ecdc2013-11-20 11:46:18 +01009717# check for systems that require aligned memory access
9718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking aligned memory access is required" >&5
9719$as_echo_n "checking aligned memory access is required... " >&6; }
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009720if ${ac_cv_aligned_required+:} false; then :
9721 $as_echo_n "(cached) " >&6
9722else
9723 if test "$cross_compiling" = yes; then :
9724 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009725else
9726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9727/* end confdefs.h. */
9728
9729int main()
9730{
9731 char s[16];
9732 int i, *p1, *p2;
9733 for (i=0; i < 16; i++)
9734 s[i] = i;
9735 p1 = (int*)(s+1);
9736 p2 = (int*)(s+2);
9737 if (*p1 == *p2)
9738 return 1;
9739 return 0;
9740}
Christian Heimes985ecdc2013-11-20 11:46:18 +01009741_ACEOF
9742if ac_fn_c_try_run "$LINENO"; then :
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009743 ac_cv_aligned_required=no
Christian Heimes985ecdc2013-11-20 11:46:18 +01009744else
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009745 ac_cv_aligned_required=yes
Christian Heimes985ecdc2013-11-20 11:46:18 +01009746fi
9747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9748 conftest.$ac_objext conftest.beam conftest.$ac_ext
9749fi
9750
9751
Benjamin Petersone4f961b2017-04-14 09:36:45 -07009752fi
9753
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5
9755$as_echo "$ac_cv_aligned_required" >&6; }
9756if test "$ac_cv_aligned_required" = yes ; then
Christian Heimes985ecdc2013-11-20 11:46:18 +01009757
9758$as_echo "#define HAVE_ALIGNED_REQUIRED 1" >>confdefs.h
9759
9760fi
Christian Heimes985ecdc2013-11-20 11:46:18 +01009761
9762# str, bytes and memoryview hash algorithm
9763
9764
9765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-hash-algorithm" >&5
9766$as_echo_n "checking for --with-hash-algorithm... " >&6; }
9767
9768# Check whether --with-hash_algorithm was given.
9769if test "${with_hash_algorithm+set}" = set; then :
9770 withval=$with_hash_algorithm;
9771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9772$as_echo "$withval" >&6; }
9773case "$withval" in
9774 siphash24)
9775 $as_echo "#define Py_HASH_ALGORITHM 1" >>confdefs.h
9776
9777 ;;
9778 fnv)
9779 $as_echo "#define Py_HASH_ALGORITHM 2" >>confdefs.h
9780
9781 ;;
9782 *)
9783 as_fn_error $? "unknown hash algorithm '$withval'" "$LINENO" 5
9784 ;;
9785esac
9786
9787else
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
9789$as_echo "default" >&6; }
9790fi
9791
9792
Charles-François Natalid30b0222014-05-08 23:08:51 +01009793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-address-sanitizer" >&5
9794$as_echo_n "checking for --with-address-sanitizer... " >&6; }
9795
9796# Check whether --with-address_sanitizer was given.
9797if test "${with_address_sanitizer+set}" = set; then :
9798 withval=$with_address_sanitizer;
9799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9800$as_echo "$withval" >&6; }
9801BASECFLAGS="-fsanitize=address -fno-omit-frame-pointer $BASECFLAGS"
9802LDFLAGS="-fsanitize=address $LDFLAGS"
9803
9804else
9805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9806$as_echo "no" >&6; }
9807fi
9808
9809
Guido van Rossum70c7f481998-03-26 18:44:10 +00009810# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00009811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
9812$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009813if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009814 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009815else
Martin v. Löwis11437992002-04-12 09:54:03 +00009816 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009817LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009821/* Override any GCC internal prototype to avoid an error.
9822 Use char because int might match the return type of a GCC
9823 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009824#ifdef __cplusplus
9825extern "C"
9826#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009827char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009828int
9829main ()
9830{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009831return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 ;
9833 return 0;
9834}
9835_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009836if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009837 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009838else
Matthias Kloseb9621712010-04-24 17:59:49 +00009839 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009841rm -f core conftest.err conftest.$ac_objext \
9842 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009843LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009844fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9846$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009847if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009848 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009849fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009850 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9852$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009853if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009854 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009855else
Martin v. Löwis11437992002-04-12 09:54:03 +00009856 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009857LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009859/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009860
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861/* Override any GCC internal prototype to avoid an error.
9862 Use char because int might match the return type of a GCC
9863 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009864#ifdef __cplusplus
9865extern "C"
9866#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009867char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009868int
9869main ()
9870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009872 ;
9873 return 0;
9874}
9875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009878else
Matthias Kloseb9621712010-04-24 17:59:49 +00009879 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009880fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009881rm -f core conftest.err conftest.$ac_objext \
9882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009883LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009884fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9886$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009887if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009888 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009889fi
9890 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009891
Matthias Kloseb9621712010-04-24 17:59:49 +00009892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9893$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009895# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009896if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9899$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009900LIBS="$withval $LIBS"
9901
9902else
Matthias Kloseb9621712010-04-24 17:59:49 +00009903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9904$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905fi
9906
Guido van Rossum7f43da71994-08-01 12:15:30 +00009907
Victor Stinner8291b5e2015-03-20 16:03:14 +01009908
9909
9910
9911
9912
9913
9914
9915if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9916 if test -n "$ac_tool_prefix"; then
9917 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9918set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9920$as_echo_n "checking for $ac_word... " >&6; }
9921if ${ac_cv_path_PKG_CONFIG+:} false; then :
9922 $as_echo_n "(cached) " >&6
9923else
9924 case $PKG_CONFIG in
9925 [\\/]* | ?:[\\/]*)
9926 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9927 ;;
9928 *)
9929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9930for as_dir in $PATH
9931do
9932 IFS=$as_save_IFS
9933 test -z "$as_dir" && as_dir=.
9934 for ac_exec_ext in '' $ac_executable_extensions; do
9935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9936 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9938 break 2
9939 fi
9940done
9941 done
9942IFS=$as_save_IFS
9943
9944 ;;
9945esac
9946fi
9947PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9948if test -n "$PKG_CONFIG"; then
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9950$as_echo "$PKG_CONFIG" >&6; }
9951else
9952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9953$as_echo "no" >&6; }
9954fi
9955
9956
9957fi
9958if test -z "$ac_cv_path_PKG_CONFIG"; then
9959 ac_pt_PKG_CONFIG=$PKG_CONFIG
9960 # Extract the first word of "pkg-config", so it can be a program name with args.
9961set dummy pkg-config; ac_word=$2
9962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9963$as_echo_n "checking for $ac_word... " >&6; }
9964if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
9965 $as_echo_n "(cached) " >&6
9966else
9967 case $ac_pt_PKG_CONFIG in
9968 [\\/]* | ?:[\\/]*)
9969 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9970 ;;
9971 *)
9972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9973for as_dir in $PATH
9974do
9975 IFS=$as_save_IFS
9976 test -z "$as_dir" && as_dir=.
9977 for ac_exec_ext in '' $ac_executable_extensions; do
9978 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9979 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
9980 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9981 break 2
9982 fi
9983done
9984 done
9985IFS=$as_save_IFS
9986
9987 ;;
9988esac
9989fi
9990ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9991if test -n "$ac_pt_PKG_CONFIG"; then
9992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9993$as_echo "$ac_pt_PKG_CONFIG" >&6; }
9994else
9995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9996$as_echo "no" >&6; }
9997fi
9998
9999 if test "x$ac_pt_PKG_CONFIG" = x; then
10000 PKG_CONFIG=""
10001 else
10002 case $cross_compiling:$ac_tool_warned in
10003yes:)
10004{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10005$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10006ac_tool_warned=yes ;;
10007esac
10008 PKG_CONFIG=$ac_pt_PKG_CONFIG
10009 fi
10010else
10011 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10012fi
10013
10014fi
10015if test -n "$PKG_CONFIG"; then
10016 _pkg_min_version=0.9.0
10017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
10018$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
10019 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10021$as_echo "yes" >&6; }
10022 else
10023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10024$as_echo "no" >&6; }
10025 PKG_CONFIG=""
10026 fi
10027fi
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010028
10029# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +000010030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
10031$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010032
10033# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010034if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010035 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +000010036else
10037 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010038fi
10039
10040
Matthias Kloseb9621712010-04-24 17:59:49 +000010041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
10042$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010043
10044# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +000010045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
10046$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010047
10048# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010049if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010050 withval=$with_system_ffi;
10051fi
10052
10053
Zachary Waref40d4dd2016-09-17 01:25:24 -050010054if test "$ac_sys_system" = "Darwin"
10055then
10056 case "$with_system_ffi" in
10057 "")
10058 with_system_ffi="no"
10059 ;;
10060 yes|no)
10061 ;;
10062 *)
10063 as_fn_error $? "--with-system-ffi accepts no arguments" "$LINENO" 5
10064 ;;
10065 esac
10066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
10067$as_echo "$with_system_ffi" >&6; }
10068else
10069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10070$as_echo "yes" >&6; }
10071 if test "$with_system_ffi" != ""
10072 then
10073 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with(out)-system-ffi is ignored on this platform" >&5
10074$as_echo "$as_me: WARNING: --with(out)-system-ffi is ignored on this platform" >&2;}
10075 fi
10076 with_system_ffi="yes"
10077fi
Zachary Ware935043d2016-09-09 17:01:21 -070010078
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +000010079if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +000010080 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
10081else
10082 LIBFFI_INCLUDEDIR=""
10083fi
10084
10085
Stefan Krah60187b52012-03-23 19:06:27 +010010086# Check for use of the system libmpdec library
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
10088$as_echo_n "checking for --with-system-libmpdec... " >&6; }
10089
10090# Check whether --with-system_libmpdec was given.
10091if test "${with_system_libmpdec+set}" = set; then :
10092 withval=$with_system_libmpdec;
10093else
10094 with_system_libmpdec="no"
10095fi
10096
10097
10098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
10099$as_echo "$with_system_libmpdec" >&6; }
10100
Benjamin Peterson076ed002010-10-31 17:11:02 +000010101# Check for support for loadable sqlite extensions
10102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
10103$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
10104# Check whether --enable-loadable-sqlite-extensions was given.
10105if test "${enable_loadable_sqlite_extensions+set}" = set; then :
10106 enableval=$enable_loadable_sqlite_extensions;
10107else
10108 enable_loadable_sqlite_extensions="no"
10109fi
10110
10111
10112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
10113$as_echo "$enable_loadable_sqlite_extensions" >&6; }
10114
Ned Deilyd819b932013-09-06 01:07:05 -070010115# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
10116
10117
10118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
10119$as_echo_n "checking for --with-tcltk-includes... " >&6; }
10120
10121# Check whether --with-tcltk-includes was given.
10122if test "${with_tcltk_includes+set}" = set; then :
10123 withval=$with_tcltk_includes;
10124else
10125 with_tcltk_includes="default"
10126fi
10127
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
10129$as_echo "$with_tcltk_includes" >&6; }
10130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
10131$as_echo_n "checking for --with-tcltk-libs... " >&6; }
10132
10133# Check whether --with-tcltk-libs was given.
10134if test "${with_tcltk_libs+set}" = set; then :
10135 withval=$with_tcltk_libs;
10136else
10137 with_tcltk_libs="default"
10138fi
10139
10140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
10141$as_echo "$with_tcltk_libs" >&6; }
10142if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
10143then
10144 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
10145 then
10146 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
10147 fi
10148 TCLTK_INCLUDES=""
10149 TCLTK_LIBS=""
10150else
10151 TCLTK_INCLUDES="$with_tcltk_includes"
10152 TCLTK_LIBS="$with_tcltk_libs"
10153fi
10154
Matthias Klose55708cc2009-04-30 08:06:49 +000010155# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +000010156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
10157$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010158
10159# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010160if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +000010161 withval=$with_dbmliborder;
10162if test x$with_dbmliborder = xyes
10163then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010164as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010165else
10166 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
10167 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
10168 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010169 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +000010170 fi
10171 done
10172fi
10173fi
10174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
10176$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000010177
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010178# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010179
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010180USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010181
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182
Martin v. Löwis11437992002-04-12 09:54:03 +000010183
10184# Templates for things AC_DEFINEd more than once.
10185# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010186
10187
Martin v. Löwis11437992002-04-12 09:54:03 +000010188
Matthias Kloseb9621712010-04-24 17:59:49 +000010189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
10190$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010192# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010193if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010194 withval=$with_threads;
10195fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010196
10197
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010198# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010199
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010201if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010202 withval=$with_thread; with_threads=$with_thread
10203fi
10204
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010205
10206if test -z "$with_threads"
10207then with_threads="yes"
10208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
10210$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010211
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010212
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010213if test "$with_threads" = "no"
10214then
10215 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010216elif test "$ac_cv_pthread_is_default" = yes
10217then
Matthias Kloseb9621712010-04-24 17:59:49 +000010218 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010219
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010220 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +000010221 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010222
10223 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010224 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010225elif test "$ac_cv_kpthread" = "yes"
10226then
10227 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010228 if test "$ac_cv_cxx_thread" = "yes"; then
10229 CXX="$CXX -Kpthread"
10230 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010231 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010233 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010234 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010235elif test "$ac_cv_kthread" = "yes"
10236then
10237 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010238 if test "$ac_cv_cxx_thread" = "yes"; then
10239 CXX="$CXX -Kthread"
10240 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010241 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010242
10243 posix_threads=yes
10244 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010245elif test "$ac_cv_pthread" = "yes"
10246then
10247 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010248 if test "$ac_cv_cxx_thread" = "yes"; then
10249 CXX="$CXX -pthread"
10250 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010251 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010252
10253 posix_threads=yes
10254 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010255else
10256 if test ! -z "$with_threads" -a -d "$with_threads"
10257 then LDFLAGS="$LDFLAGS -L$with_threads"
10258 fi
10259 if test ! -z "$withval" -a -d "$withval"
10260 then LDFLAGS="$LDFLAGS -L$withval"
10261 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010262
10263 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000010264 # define _POSIX_THREADS in unistd.h. Some apparently don't
10265 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +000010266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
10267$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
10268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010269/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010270
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010271#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010272#ifdef _POSIX_THREADS
10273yes
10274#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010275
10276_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010278 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010279 unistd_defines_pthreads=yes
10280else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010281 unistd_defines_pthreads=no
10282fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010283rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010284
Matthias Kloseb9621712010-04-24 17:59:49 +000010285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
10286$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010287
Matthias Kloseb9621712010-04-24 17:59:49 +000010288 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010289
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010290 # Just looking for pthread_create in libpthread is not enough:
10291 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10292 # So we really have to include pthread.h, and then link.
10293 _libs=$LIBS
10294 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
10296$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
10297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010298/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010299
10300#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010301#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010302
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010303void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010304int
10305main ()
10306{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010307
10308pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010309 ;
10310 return 0;
10311}
10312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010313if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010314
Matthias Kloseb9621712010-04-24 17:59:49 +000010315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10316$as_echo "yes" >&6; }
10317 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +000010318
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010319 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010320 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010321else
Martin v. Löwis11437992002-04-12 09:54:03 +000010322
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010323 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +000010324 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +020010325if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010326 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +000010327
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010328 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010329 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010330else
Guido van Rossumad678af1998-10-02 14:42:15 +000010331
Matthias Kloseb9621712010-04-24 17:59:49 +000010332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
10333$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010334if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010335 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010336else
Martin v. Löwis11437992002-04-12 09:54:03 +000010337 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010338LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010339cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010342/* Override any GCC internal prototype to avoid an error.
10343 Use char because int might match the return type of a GCC
10344 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010345#ifdef __cplusplus
10346extern "C"
10347#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010348char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010349int
10350main ()
10351{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010352return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010353 ;
10354 return 0;
10355}
10356_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010357if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000010359else
Matthias Kloseb9621712010-04-24 17:59:49 +000010360 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000010361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010362rm -f core conftest.err conftest.$ac_objext \
10363 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010364LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010365fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
10367$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010368if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010369 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +000010370
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010371 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010372 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010373 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000010374else
Greg Steinadf63d62000-07-05 10:38:09 +000010375
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
10377$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010378if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010379 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000010380else
Martin v. Löwis11437992002-04-12 09:54:03 +000010381 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000010382LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010386/* Override any GCC internal prototype to avoid an error.
10387 Use char because int might match the return type of a GCC
10388 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010389#ifdef __cplusplus
10390extern "C"
10391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010392char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010393int
10394main ()
10395{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010397 ;
10398 return 0;
10399}
10400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010401if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010402 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000010403else
Matthias Kloseb9621712010-04-24 17:59:49 +000010404 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000010405fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010406rm -f core conftest.err conftest.$ac_objext \
10407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010408LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000010409fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
10411$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010412if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010413 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +000010414
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010415 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010416 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010417 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010418else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000010419
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
10421$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010422if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010423 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010424else
Martin v. Löwis11437992002-04-12 09:54:03 +000010425 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010426LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430/* Override any GCC internal prototype to avoid an error.
10431 Use char because int might match the return type of a GCC
10432 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010433#ifdef __cplusplus
10434extern "C"
10435#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010436char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010437int
10438main ()
10439{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 ;
10442 return 0;
10443}
10444_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010445if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010446 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010447else
Matthias Kloseb9621712010-04-24 17:59:49 +000010448 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010449fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010450rm -f core conftest.err conftest.$ac_objext \
10451 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010452LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010453fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
10455$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010456if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010457 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010458
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010459 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010460 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010461 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010462else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000010463
Matthias Kloseb9621712010-04-24 17:59:49 +000010464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
10465$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010466if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000010468else
Martin v. Löwis11437992002-04-12 09:54:03 +000010469 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010470LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474/* Override any GCC internal prototype to avoid an error.
10475 Use char because int might match the return type of a GCC
10476 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010477#ifdef __cplusplus
10478extern "C"
10479#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010480char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010481int
10482main ()
10483{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010484return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010485 ;
10486 return 0;
10487}
10488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010490 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000010491else
Matthias Kloseb9621712010-04-24 17:59:49 +000010492 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000010493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010494rm -f core conftest.err conftest.$ac_objext \
10495 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010496LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000010497fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
10499$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010500if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +000010502
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010503 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000010504 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010505 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000010506else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000010507
Martin v. Löwis130fb172001-07-19 11:00:41 +000010508 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000010509fi
10510
Guido van Rossum627b2d71993-12-24 10:39:16 +000010511
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010512fi
10513
Guido van Rossum0be3e491997-05-22 20:33:33 +000010514fi
10515
Guido van Rossum49545951997-12-02 19:28:29 +000010516fi
10517
Guido van Rossumb93a8621998-05-07 13:27:32 +000010518fi
10519
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010520fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010521rm -f core conftest.err conftest.$ac_objext \
10522 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000010523
Matthias Kloseb9621712010-04-24 17:59:49 +000010524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
10525$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010526if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010527 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010528else
Martin v. Löwis11437992002-04-12 09:54:03 +000010529 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010530LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010534/* Override any GCC internal prototype to avoid an error.
10535 Use char because int might match the return type of a GCC
10536 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010537#ifdef __cplusplus
10538extern "C"
10539#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010540char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010541int
10542main ()
10543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 ;
10546 return 0;
10547}
10548_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010549if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010550 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010551else
Matthias Kloseb9621712010-04-24 17:59:49 +000010552 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010553fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010554rm -f core conftest.err conftest.$ac_objext \
10555 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010556LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010557fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
10559$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010560if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010561 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010562
Martin v. Löwis130fb172001-07-19 11:00:41 +000010563 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010564 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010565 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010566fi
10567
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010568
Neal Norwitza978ab02002-11-02 16:58:05 +000010569 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
10571$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010572if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010573 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010574else
Martin v. Löwis11437992002-04-12 09:54:03 +000010575 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010576LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010580/* Override any GCC internal prototype to avoid an error.
10581 Use char because int might match the return type of a GCC
10582 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010583#ifdef __cplusplus
10584extern "C"
10585#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010586char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010587int
10588main ()
10589{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010590return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010591 ;
10592 return 0;
10593}
10594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010595if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010596 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010597else
Matthias Kloseb9621712010-04-24 17:59:49 +000010598 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010599fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010600rm -f core conftest.err conftest.$ac_objext \
10601 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010602LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010603fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
10605$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010606if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010607 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000010608
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010609 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010610 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010611 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000010612fi
10613
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000010614 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010615fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010616
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010617if test "$posix_threads" = "yes"; then
10618 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010619
Matthias Kloseb9621712010-04-24 17:59:49 +000010620$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010621
10622 fi
10623
10624 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
10625 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +020010626 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +000010627$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010628
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010629 ;;
10630 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +000010631$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010632
10633 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +020010634 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +000010635$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000010636
10637 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010638 esac
10639
Matthias Kloseb9621712010-04-24 17:59:49 +000010640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
10641$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010642 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010643 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010644else
Matthias Kloseb9621712010-04-24 17:59:49 +000010645 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010646 ac_cv_pthread_system_supported=no
10647else
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010649/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +010010650
10651 #include <stdio.h>
10652 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010653 void *foo(void *parm) {
10654 return NULL;
10655 }
10656 main() {
10657 pthread_attr_t attr;
10658 pthread_t id;
10659 if (pthread_attr_init(&attr)) exit(-1);
10660 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
10661 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
10662 exit(0);
10663 }
10664_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010665if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010666 ac_cv_pthread_system_supported=yes
10667else
Matthias Kloseb9621712010-04-24 17:59:49 +000010668 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010669fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010670rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10671 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010672fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000010673
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674
Guido van Rossum627b2d71993-12-24 10:39:16 +000010675fi
10676
Matthias Kloseb9621712010-04-24 17:59:49 +000010677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
10678$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010679 if test "$ac_cv_pthread_system_supported" = "yes"; then
10680
Matthias Kloseb9621712010-04-24 17:59:49 +000010681$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682
10683 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010684 for ac_func in pthread_sigmask
10685do :
10686 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +020010687if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010688 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010689#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010690_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000010691 case $ac_sys_system in
10692 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010693
Matthias Kloseb9621712010-04-24 17:59:49 +000010694$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +000010695
10696 ;;
10697 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010698fi
10699done
10700
Christian Heimesf77b4b22013-08-21 13:26:05 +020010701 for ac_func in pthread_atfork
10702do :
10703 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
10704if test "x$ac_cv_func_pthread_atfork" = xyes; then :
10705 cat >>confdefs.h <<_ACEOF
10706#define HAVE_PTHREAD_ATFORK 1
10707_ACEOF
10708
10709fi
10710done
10711
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010712fi
10713
10714
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010715# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000010716
Matthias Kloseb9621712010-04-24 17:59:49 +000010717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
10718$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010720if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010722 no)
Matthias Kloseb9621712010-04-24 17:59:49 +000010723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10724$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010725 ipv6=no
10726 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000010727 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10728$as_echo "yes" >&6; }
10729 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010730
10731 ipv6=yes
10732 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010734else
Martin v. Löwis11437992002-04-12 09:54:03 +000010735
Matthias Kloseb9621712010-04-24 17:59:49 +000010736 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010737/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010738 /* AF_INET6 available check */
10739#include <sys/types.h>
10740#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010741int
10742main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010743{
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010744int domain = AF_INET6;
10745 ;
10746 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010747}
Martin v. Löwis11437992002-04-12 09:54:03 +000010748_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010749if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010750
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10752$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010753 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +000010754
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010755else
Matthias Kloseb159a552010-04-25 21:00:44 +000010756
Matthias Kloseb9621712010-04-24 17:59:49 +000010757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10758$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010759 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +000010760
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010761fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +010010762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010763
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010764if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10766$as_echo_n "checking if RFC2553 API is available... " >&6; }
10767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010768/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010769
10770 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010771#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010772int
10773main ()
10774{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010775struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +000010776 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 ;
10778 return 0;
10779}
Matthias Kloseb159a552010-04-25 21:00:44 +000010780
Martin v. Löwis11437992002-04-12 09:54:03 +000010781_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010782if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +000010783
10784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010785$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010786 ipv6=yes
10787
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010788else
Matthias Kloseb159a552010-04-25 21:00:44 +000010789
10790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010791$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010792 ipv6=no
10793
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010796fi
10797
10798if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010799 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010800
10801fi
10802
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010803fi
10804
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010805
10806ipv6type=unknown
10807ipv6lib=none
10808ipv6trylibc=no
10809
10810if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10812$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010813 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10814 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010815 case $i in
10816 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010818/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010819
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010820#include <netinet/in.h>
10821#ifdef IPV6_INRIA_VERSION
10822yes
10823#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010824_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010825if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010826 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010827 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010828fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010829rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010830
10831 ;;
10832 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +000010833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010835
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010836#include <netinet/in.h>
10837#ifdef __KAME__
10838yes
10839#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010840_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010842 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010843 ipv6type=$i;
10844 ipv6lib=inet6
10845 ipv6libdir=/usr/local/v6/lib
10846 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010847fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010848rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010849
10850 ;;
10851 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010853/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010854
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010855#include <features.h>
10856#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10857yes
10858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010859_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010862 ipv6type=$i;
10863 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010864fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010865rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010866
10867 ;;
10868 linux-inet6)
10869 if test -d /usr/inet6; then
10870 ipv6type=$i
10871 ipv6lib=inet6
10872 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010873 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010874 fi
10875 ;;
10876 solaris)
10877 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010878 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010879 ipv6type=$i
10880 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010881 fi
10882 fi
10883 ;;
10884 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010886/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010887
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010888#include <sys/param.h>
10889#ifdef _TOSHIBA_INET6
10890yes
10891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010892_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010893if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010895 ipv6type=$i;
10896 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010897 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010898fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010899rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010900
10901 ;;
10902 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010904/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010905
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010906#include </usr/local/v6/include/sys/v6config.h>
10907#ifdef __V6D__
10908yes
10909#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010910_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010911if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010912 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010913 ipv6type=$i;
10914 ipv6lib=v6;
10915 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010916 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010917fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010918rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010919
10920 ;;
10921 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010923/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010925#include <sys/param.h>
10926#ifdef _ZETA_MINAMI_INET6
10927yes
10928#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010929_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010930if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010931 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010932 ipv6type=$i;
10933 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010934 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010935fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010936rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010937
10938 ;;
10939 esac
10940 if test "$ipv6type" != "unknown"; then
10941 break
10942 fi
10943 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10945$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010946fi
10947
10948if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10949 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10950 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10951 echo "using lib$ipv6lib"
10952 else
10953 if test $ipv6trylibc = "yes"; then
10954 echo "using libc"
10955 else
10956 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10957 echo "You need to fetch lib$ipv6lib.a from appropriate"
10958 echo 'ipv6 kit and compile beforehand.'
10959 exit 1
10960 fi
10961 fi
10962fi
10963
Larry Hastingsa6cc5512015-04-13 17:48:40 -040010964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAN_RAW_FD_FRAMES" >&5
10965$as_echo_n "checking for CAN_RAW_FD_FRAMES... " >&6; }
10966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10967/* end confdefs.h. */
10968 /* CAN_RAW_FD_FRAMES available check */
10969#include <linux/can/raw.h>
10970int
10971main ()
10972{
10973int can_raw_fd_frames = CAN_RAW_FD_FRAMES;
10974 ;
10975 return 0;
10976}
10977_ACEOF
10978if ac_fn_c_try_compile "$LINENO"; then :
10979
10980
10981$as_echo "#define HAVE_LINUX_CAN_RAW_FD_FRAMES 1" >>confdefs.h
10982
10983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10984$as_echo "yes" >&6; }
10985
10986else
10987
10988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10989$as_echo "no" >&6; }
10990
10991fi
10992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10993
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010994# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10996$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010997
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010998# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010999if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011000 withval=$with_doc_strings;
11001fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011002
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011003
11004if test -z "$with_doc_strings"
11005then with_doc_strings="yes"
11006fi
11007if test "$with_doc_strings" != "no"
11008then
11009
Matthias Kloseb9621712010-04-24 17:59:49 +000011010$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011011
11012fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
11014$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000011015
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000011016# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000011017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
11018$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011020# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011021if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022 withval=$with_pymalloc;
11023fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011024
Neil Schemenauera35c6882001-02-27 04:45:05 +000011025
Neil Schemenauer16c22972002-03-22 15:34:49 +000011026if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000011027then
11028 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011029fi
11030if test "$with_pymalloc" != "no"
11031then
Martin v. Löwis11437992002-04-12 09:54:03 +000011032
Matthias Kloseb9621712010-04-24 17:59:49 +000011033$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000011034
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011035 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000011036fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
11038$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000011039
Benjamin Peterson05159c42009-12-03 03:01:27 +000011040# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000011041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
11042$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011043
11044# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000011045if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011046 withval=$with_valgrind;
11047else
11048 with_valgrind=no
11049fi
11050
Matthias Kloseb9621712010-04-24 17:59:49 +000011051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
11052$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000011053if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011054 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 +020011055if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000011056
Matthias Kloseb9621712010-04-24 17:59:49 +000011057$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000011058
11059else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011060 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000011061
11062fi
11063
11064
Jeffrey Yasskin39370832010-05-03 19:29:34 +000011065 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000011066fi
11067
Łukasz Langaa785c872016-09-09 17:37:37 -070011068# Check for DTrace support
11069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
11070$as_echo_n "checking for --with-dtrace... " >&6; }
11071
11072# Check whether --with-dtrace was given.
11073if test "${with_dtrace+set}" = set; then :
11074 withval=$with_dtrace;
11075else
11076 with_dtrace=no
11077fi
11078
11079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
11080$as_echo "$with_dtrace" >&6; }
11081
11082
11083
11084
11085
11086DTRACE=
11087DFLAGS=
11088DTRACE_HEADERS=
11089DTRACE_OBJS=
11090
11091if test "$with_dtrace" = "yes"
11092then
11093 # Extract the first word of "dtrace", so it can be a program name with args.
11094set dummy dtrace; ac_word=$2
11095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11096$as_echo_n "checking for $ac_word... " >&6; }
11097if ${ac_cv_path_DTRACE+:} false; then :
11098 $as_echo_n "(cached) " >&6
11099else
11100 case $DTRACE in
11101 [\\/]* | ?:[\\/]*)
11102 ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
11103 ;;
11104 *)
11105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11106for as_dir in $PATH
11107do
11108 IFS=$as_save_IFS
11109 test -z "$as_dir" && as_dir=.
11110 for ac_exec_ext in '' $ac_executable_extensions; do
11111 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11112 ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
11113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11114 break 2
11115 fi
11116done
11117 done
11118IFS=$as_save_IFS
11119
11120 test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found"
11121 ;;
11122esac
11123fi
11124DTRACE=$ac_cv_path_DTRACE
11125if test -n "$DTRACE"; then
11126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
11127$as_echo "$DTRACE" >&6; }
11128else
11129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11130$as_echo "no" >&6; }
11131fi
11132
11133
11134 if test "$DTRACE" = "not found"; then
11135 as_fn_error $? "dtrace command not found on \$PATH" "$LINENO" 5
11136 fi
11137
11138$as_echo "#define WITH_DTRACE 1" >>confdefs.h
11139
11140 DTRACE_HEADERS="Include/pydtrace_probes.h"
11141
11142 # On OS X, DTrace providers do not need to be explicitly compiled and
11143 # linked into the binary. Correspondingly, dtrace(1) is missing the ELF
11144 # generation flag '-G'. We check for presence of this flag, rather than
11145 # hardcoding support by OS, in the interest of robustness.
11146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether DTrace probes require linking" >&5
11147$as_echo_n "checking whether DTrace probes require linking... " >&6; }
11148if ${ac_cv_dtrace_link+:} false; then :
11149 $as_echo_n "(cached) " >&6
11150else
11151 ac_cv_dtrace_link=no
11152 echo 'BEGIN' > conftest.d
11153 "$DTRACE" -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \
11154 ac_cv_dtrace_link=yes
11155
11156fi
11157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5
11158$as_echo "$ac_cv_dtrace_link" >&6; }
11159 if test "$ac_cv_dtrace_link" = "yes"; then
11160 DTRACE_OBJS="Python/pydtrace.o"
11161 fi
11162fi
11163
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011164# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000011165
Guido van Rossum98935bf2001-09-05 19:13:16 +000011166DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000011167
Guido van Rossume97ee181999-12-20 21:27:22 +000011168# the dlopen() function means we might want to use dynload_shlib.o. some
11169# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000011170for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000011171do :
11172 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020011173if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011174 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011175#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011176_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000011177
Guido van Rossume97ee181999-12-20 21:27:22 +000011178fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011179done
Guido van Rossume97ee181999-12-20 21:27:22 +000011180
Michael W. Hudson54241132001-12-07 15:38:26 +000011181
Guido van Rossume97ee181999-12-20 21:27:22 +000011182# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
11183# loading of modules.
11184
Matthias Kloseb9621712010-04-24 17:59:49 +000011185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
11186$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011187if test -z "$DYNLOADFILE"
11188then
11189 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000011190 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
11191 if test "$ac_cv_func_dlopen" = yes
11192 then DYNLOADFILE="dynload_shlib.o"
11193 else DYNLOADFILE="dynload_aix.o"
11194 fi
11195 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000011196 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011197 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
11198 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000011199 *)
11200 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
11201 # out any dynamic loading
11202 if test "$ac_cv_func_dlopen" = yes
11203 then DYNLOADFILE="dynload_shlib.o"
11204 else DYNLOADFILE="dynload_stub.o"
11205 fi
11206 ;;
11207 esac
11208fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011209{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
11210$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000011211if test "$DYNLOADFILE" != "dynload_stub.o"
11212then
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
Matthias Kloseb9621712010-04-24 17:59:49 +000011214$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000011215
11216fi
11217
Neil Schemenauer4e425612001-06-19 15:44:15 +000011218# MACHDEP_OBJS can be set to platform-specific object files needed by Python
11219
Michael W. Hudson54241132001-12-07 15:38:26 +000011220
Matthias Kloseb9621712010-04-24 17:59:49 +000011221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
11222$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000011223if test -z "$MACHDEP_OBJS"
11224then
Jack Jansene578a632001-08-15 01:27:14 +000011225 MACHDEP_OBJS=$extra_machdep_objs
11226else
11227 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000011228fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011229if test -z "$MACHDEP_OBJS"; then
11230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
11231$as_echo "none" >&6; }
11232else
11233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
11234$as_echo "$MACHDEP_OBJS" >&6; }
11235fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000011236
Guido van Rossum627b2d71993-12-24 10:39:16 +000011237# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000011238for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020011239 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011240 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Victor Stinner4d6a3d62014-12-21 01:16:38 +010011241 futimens futimes gai_strerror getentropy \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011242 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000011243 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010011244 initgroups kill killpg lchmod lchown linkat lstat lutimes mmap \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010011245 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020011246 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011247 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020011248 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000011249 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000011250 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000011251 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020011252 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
11253 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020011254 sigaction sigaltstack siginterrupt sigpending sigrelse \
11255 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000011256 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020011257 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020011258 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011259do :
11260 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11261ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011262if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011263 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011264#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011265_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011266
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011267fi
11268done
11269
Michael W. Hudson54241132001-12-07 15:38:26 +000011270
Gregory P. Smithdf300d52012-01-21 18:20:15 -080011271ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
11272 #include <dirent.h>
11273"
11274if test "x$ac_cv_have_decl_dirfd" = xyes; then :
11275
11276$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
11277
11278fi
11279
11280
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011281# For some functions, having a definition is not sufficient, since
11282# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
11284$as_echo_n "checking for chroot... " >&6; }
11285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011286/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011287#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011288int
11289main ()
11290{
11291void *x=chroot
11292 ;
11293 return 0;
11294}
11295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011297
Matthias Kloseb9621712010-04-24 17:59:49 +000011298$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011299
Matthias Kloseb159a552010-04-25 21:00:44 +000011300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011301$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011302else
Matthias Kloseb9621712010-04-24 17:59:49 +000011303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11304$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011305
11306fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
11309$as_echo_n "checking for link... " >&6; }
11310cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011311/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011312#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011313int
11314main ()
11315{
11316void *x=link
11317 ;
11318 return 0;
11319}
11320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011321if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011322
Matthias Kloseb9621712010-04-24 17:59:49 +000011323$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011324
Matthias Kloseb159a552010-04-25 21:00:44 +000011325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011326$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011327else
Matthias Kloseb9621712010-04-24 17:59:49 +000011328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11329$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011330
11331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
11334$as_echo_n "checking for symlink... " >&6; }
11335cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011336/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011337#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011338int
11339main ()
11340{
11341void *x=symlink
11342 ;
11343 return 0;
11344}
11345_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011346if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011347
Matthias Kloseb9621712010-04-24 17:59:49 +000011348$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011349
Matthias Kloseb159a552010-04-25 21:00:44 +000011350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011351$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011352else
Matthias Kloseb9621712010-04-24 17:59:49 +000011353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11354$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011355
11356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
11359$as_echo_n "checking for fchdir... " >&6; }
11360cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011361/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011362#include <unistd.h>
11363int
11364main ()
11365{
11366void *x=fchdir
11367 ;
11368 return 0;
11369}
11370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011371if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011372
Matthias Kloseb9621712010-04-24 17:59:49 +000011373$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011374
Matthias Kloseb159a552010-04-25 21:00:44 +000011375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011376$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011377else
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011380
11381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
11384$as_echo_n "checking for fsync... " >&6; }
11385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011386/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011387#include <unistd.h>
11388int
11389main ()
11390{
11391void *x=fsync
11392 ;
11393 return 0;
11394}
11395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011396if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011397
Matthias Kloseb9621712010-04-24 17:59:49 +000011398$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011399
Matthias Kloseb159a552010-04-25 21:00:44 +000011400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011401$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011402else
Matthias Kloseb9621712010-04-24 17:59:49 +000011403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11404$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011405
11406fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
11409$as_echo_n "checking for fdatasync... " >&6; }
11410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011411/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011412#include <unistd.h>
11413int
11414main ()
11415{
11416void *x=fdatasync
11417 ;
11418 return 0;
11419}
11420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011421if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011422
Matthias Kloseb9621712010-04-24 17:59:49 +000011423$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011424
Matthias Kloseb159a552010-04-25 21:00:44 +000011425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011426$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011427else
Matthias Kloseb9621712010-04-24 17:59:49 +000011428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11429$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000011430
11431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
11434$as_echo_n "checking for epoll... " >&6; }
11435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011436/* end confdefs.h. */
11437#include <sys/epoll.h>
11438int
11439main ()
11440{
11441void *x=epoll_create
11442 ;
11443 return 0;
11444}
11445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011446if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000011447
Matthias Kloseb9621712010-04-24 17:59:49 +000011448$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011449
Matthias Kloseb159a552010-04-25 21:00:44 +000011450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011451$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011452else
Matthias Kloseb9621712010-04-24 17:59:49 +000011453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11454$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011455
11456fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011457rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060011458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
11459$as_echo_n "checking for epoll_create1... " >&6; }
11460cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11461/* end confdefs.h. */
11462#include <sys/epoll.h>
11463int
11464main ()
11465{
11466void *x=epoll_create1
11467 ;
11468 return 0;
11469}
11470_ACEOF
11471if ac_fn_c_try_compile "$LINENO"; then :
11472
11473$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
11474
11475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11476$as_echo "yes" >&6; }
11477else
11478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11479$as_echo "no" >&6; }
11480
11481fi
11482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000011483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
11484$as_echo_n "checking for kqueue... " >&6; }
11485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011486/* end confdefs.h. */
11487
11488#include <sys/types.h>
11489#include <sys/event.h>
11490
11491int
11492main ()
11493{
11494int x=kqueue()
11495 ;
11496 return 0;
11497}
11498_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011499if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011500
Matthias Kloseb9621712010-04-24 17:59:49 +000011501$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011502
Matthias Kloseb159a552010-04-25 21:00:44 +000011503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011504$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011505else
Matthias Kloseb9621712010-04-24 17:59:49 +000011506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11507$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011508
11509fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000011510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Christian Heimesb7bd5df2013-10-22 11:21:54 +020011511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prlimit" >&5
11512$as_echo_n "checking for prlimit... " >&6; }
11513cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514/* end confdefs.h. */
11515
11516#include <sys/time.h>
11517#include <sys/resource.h>
11518
11519int
11520main ()
11521{
11522void *x=prlimit
11523 ;
11524 return 0;
11525}
11526_ACEOF
11527if ac_fn_c_try_compile "$LINENO"; then :
11528
11529$as_echo "#define HAVE_PRLIMIT 1" >>confdefs.h
11530
11531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11532$as_echo "yes" >&6; }
11533else
11534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11535$as_echo "no" >&6; }
11536
11537fi
11538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11539
Martin v. Löwisd5843682002-11-21 20:41:28 +000011540# On some systems (eg. FreeBSD 5), we would find a definition of the
11541# functions ctermid_r, setgroups in the library, but no prototype
11542# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
11543# address to avoid compiler warnings and potential miscompilations
11544# because of the missing prototypes.
11545
Matthias Kloseb9621712010-04-24 17:59:49 +000011546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
11547$as_echo_n "checking for ctermid_r... " >&6; }
11548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011549/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011550
Martin v. Löwisd5843682002-11-21 20:41:28 +000011551#include <stdio.h>
11552
Martin v. Löwisd5843682002-11-21 20:41:28 +000011553int
11554main ()
11555{
11556void* p = ctermid_r
11557 ;
11558 return 0;
11559}
11560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011561if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011562
Matthias Kloseb9621712010-04-24 17:59:49 +000011563$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011564
Matthias Kloseb159a552010-04-25 21:00:44 +000011565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011566$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011567else
Matthias Kloseb9621712010-04-24 17:59:49 +000011568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11569$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011570
11571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11573
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
11575$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011576if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011577 $as_echo_n "(cached) " >&6
11578else
11579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011580/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011581#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011582int
11583main ()
11584{
11585void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011586
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011587 ;
11588 return 0;
11589}
11590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011591if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011592 ac_cv_flock_decl=yes
11593else
11594 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011595
11596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000011598
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011599fi
11600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
11601$as_echo "$ac_cv_flock_decl" >&6; }
11602if test "x${ac_cv_flock_decl}" = xyes; then
11603 for ac_func in flock
11604do :
11605 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020011606if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011607 cat >>confdefs.h <<_ACEOF
11608#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000011609_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011610
Antoine Pitroua3000072010-09-07 14:52:42 +000011611else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000011613$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011614if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000011615 $as_echo_n "(cached) " >&6
11616else
11617 ac_check_lib_save_LIBS=$LIBS
11618LIBS="-lbsd $LIBS"
11619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11620/* end confdefs.h. */
11621
11622/* Override any GCC internal prototype to avoid an error.
11623 Use char because int might match the return type of a GCC
11624 builtin and then its argument prototype would still apply. */
11625#ifdef __cplusplus
11626extern "C"
11627#endif
11628char flock ();
11629int
11630main ()
11631{
11632return flock ();
11633 ;
11634 return 0;
11635}
11636_ACEOF
11637if ac_fn_c_try_link "$LINENO"; then :
11638 ac_cv_lib_bsd_flock=yes
11639else
11640 ac_cv_lib_bsd_flock=no
11641fi
11642rm -f core conftest.err conftest.$ac_objext \
11643 conftest$ac_exeext conftest.$ac_ext
11644LIBS=$ac_check_lib_save_LIBS
11645fi
11646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
11647$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011648if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011649 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000011650
11651
11652$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
11653
11654
11655fi
11656
11657
11658fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000011659done
11660
Antoine Pitroua3000072010-09-07 14:52:42 +000011661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011662
Matthias Kloseb9621712010-04-24 17:59:49 +000011663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
11664$as_echo_n "checking for getpagesize... " >&6; }
11665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011666/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011667
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011668#include <unistd.h>
11669
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011670int
11671main ()
11672{
11673void* p = getpagesize
11674 ;
11675 return 0;
11676}
11677_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011678if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011679
Matthias Kloseb9621712010-04-24 17:59:49 +000011680$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011681
Matthias Kloseb159a552010-04-25 21:00:44 +000011682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011683$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011684else
Matthias Kloseb9621712010-04-24 17:59:49 +000011685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11686$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011687
11688fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000011690
Victor Stinner984890f2011-11-24 13:53:38 +010011691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
11692$as_echo_n "checking for broken unsetenv... " >&6; }
11693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11694/* end confdefs.h. */
11695
11696#include <stdlib.h>
11697
11698int
11699main ()
11700{
11701int res = unsetenv("DUMMY")
11702 ;
11703 return 0;
11704}
11705_ACEOF
11706if ac_fn_c_try_compile "$LINENO"; then :
11707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11708$as_echo "no" >&6; }
11709else
11710
11711$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
11712
11713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11714$as_echo "yes" >&6; }
11715
11716fi
11717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11718
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011719for ac_prog in true
11720do
11721 # Extract the first word of "$ac_prog", so it can be a program name with args.
11722set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000011723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11724$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011725if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011726 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011727else
11728 if test -n "$TRUE"; then
11729 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
11730else
11731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11732for as_dir in $PATH
11733do
11734 IFS=$as_save_IFS
11735 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000011736 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000011737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011738 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000011739 $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 +000011740 break 2
11741 fi
11742done
Matthias Kloseb9621712010-04-24 17:59:49 +000011743 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011745
11746fi
11747fi
11748TRUE=$ac_cv_prog_TRUE
11749if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
11751$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011752else
Matthias Kloseb9621712010-04-24 17:59:49 +000011753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11754$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011755fi
11756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011757
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011758 test -n "$TRUE" && break
11759done
11760test -n "$TRUE" || TRUE="/bin/true"
11761
11762
Matthias Kloseb9621712010-04-24 17:59:49 +000011763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
11764$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011765if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011766 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011767else
11768 ac_check_lib_save_LIBS=$LIBS
11769LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011770cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011771/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011773/* Override any GCC internal prototype to avoid an error.
11774 Use char because int might match the return type of a GCC
11775 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011776#ifdef __cplusplus
11777extern "C"
11778#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011779char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011780int
11781main ()
11782{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011783return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011784 ;
11785 return 0;
11786}
11787_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011788if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011789 ac_cv_lib_c_inet_aton=yes
11790else
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011792fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011793rm -f core conftest.err conftest.$ac_objext \
11794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011795LIBS=$ac_check_lib_save_LIBS
11796fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011797{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
11798$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011799if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011800 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011801else
Matthias Kloseb9621712010-04-24 17:59:49 +000011802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
11803$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011804if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011805 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011806else
11807 ac_check_lib_save_LIBS=$LIBS
11808LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011810/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011812/* Override any GCC internal prototype to avoid an error.
11813 Use char because int might match the return type of a GCC
11814 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011815#ifdef __cplusplus
11816extern "C"
11817#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011818char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011819int
11820main ()
11821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011822return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011823 ;
11824 return 0;
11825}
11826_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011827if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011828 ac_cv_lib_resolv_inet_aton=yes
11829else
Matthias Kloseb9621712010-04-24 17:59:49 +000011830 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011831fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011832rm -f core conftest.err conftest.$ac_objext \
11833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011834LIBS=$ac_check_lib_save_LIBS
11835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
11837$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011838if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011839 cat >>confdefs.h <<_ACEOF
11840#define HAVE_LIBRESOLV 1
11841_ACEOF
11842
11843 LIBS="-lresolv $LIBS"
11844
11845fi
11846
11847
11848fi
11849
11850
Christian Heimesd0764e22007-12-04 15:00:33 +000011851# On Tru64, chflags seems to be present, but calling it will
11852# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000011853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
11854$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011855if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011856 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011857else
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011859 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011860else
Matthias Kloseb9621712010-04-24 17:59:49 +000011861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011862/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011863
Christian Heimesd0764e22007-12-04 15:00:33 +000011864#include <sys/stat.h>
11865#include <unistd.h>
11866int main(int argc, char*argv[])
11867{
11868 if(chflags(argv[0], 0) != 0)
11869 return 1;
11870 return 0;
11871}
Ned Deily3eb67d52011-06-28 00:00:28 -070011872
Christian Heimesd0764e22007-12-04 15:00:33 +000011873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011874if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011875 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011876else
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011878fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011879rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11880 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011881fi
11882
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011883
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011884fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11886$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011887if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011888 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011889if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011890 ac_cv_have_chflags="yes"
11891else
11892 ac_cv_have_chflags="no"
11893fi
11894
11895fi
11896if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011897
Matthias Kloseb9621712010-04-24 17:59:49 +000011898$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011899
11900fi
11901
Matthias Kloseb9621712010-04-24 17:59:49 +000011902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11903$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011904if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011908 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000011909else
Matthias Kloseb9621712010-04-24 17:59:49 +000011910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000011911/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070011912
Christian Heimesd0764e22007-12-04 15:00:33 +000011913#include <sys/stat.h>
11914#include <unistd.h>
11915int main(int argc, char*argv[])
11916{
11917 if(lchflags(argv[0], 0) != 0)
11918 return 1;
11919 return 0;
11920}
Ned Deily3eb67d52011-06-28 00:00:28 -070011921
Christian Heimesd0764e22007-12-04 15:00:33 +000011922_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011923if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011924 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011925else
Matthias Kloseb9621712010-04-24 17:59:49 +000011926 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000011927fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11929 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000011930fi
11931
11932
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011933fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11935$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011936if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011937 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011938if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011939 ac_cv_have_lchflags="yes"
11940else
11941 ac_cv_have_lchflags="no"
11942fi
11943
11944fi
11945if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011946
Matthias Kloseb9621712010-04-24 17:59:49 +000011947$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011948
11949fi
11950
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011951case $ac_sys_system/$ac_sys_release in
11952Darwin/*)
11953 _CUR_CFLAGS="${CFLAGS}"
11954 _CUR_LDFLAGS="${LDFLAGS}"
11955 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11956 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11957 ;;
11958esac
11959
Matthias Kloseb9621712010-04-24 17:59:49 +000011960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11961$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011962if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011963 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011964else
11965 ac_check_lib_save_LIBS=$LIBS
11966LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011967cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011968/* end confdefs.h. */
11969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011970/* Override any GCC internal prototype to avoid an error.
11971 Use char because int might match the return type of a GCC
11972 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011973#ifdef __cplusplus
11974extern "C"
11975#endif
11976char inflateCopy ();
11977int
11978main ()
11979{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011980return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011981 ;
11982 return 0;
11983}
11984_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011985if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011986 ac_cv_lib_z_inflateCopy=yes
11987else
Matthias Kloseb9621712010-04-24 17:59:49 +000011988 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011990rm -f core conftest.err conftest.$ac_objext \
11991 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011992LIBS=$ac_check_lib_save_LIBS
11993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11995$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011996if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011997
Matthias Kloseb9621712010-04-24 17:59:49 +000011998$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011999
12000fi
12001
12002
12003case $ac_sys_system/$ac_sys_release in
12004Darwin/*)
12005 CFLAGS="${_CUR_CFLAGS}"
12006 LDFLAGS="${_CUR_LDFLAGS}"
12007 ;;
12008esac
12009
Matthias Kloseb9621712010-04-24 17:59:49 +000012010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
12011$as_echo_n "checking for hstrerror... " >&6; }
12012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012013/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012014
Martin v. Löwise9416172003-05-03 10:12:45 +000012015#include <netdb.h>
12016
Martin v. Löwise9416172003-05-03 10:12:45 +000012017int
12018main ()
12019{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012020void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012021 ;
12022 return 0;
12023}
12024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012025if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012026
Matthias Kloseb9621712010-04-24 17:59:49 +000012027$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012028
Matthias Kloseb159a552010-04-25 21:00:44 +000012029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012030$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012031else
Matthias Kloseb9621712010-04-24 17:59:49 +000012032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12033$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012034
12035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012036rm -f core conftest.err conftest.$ac_objext \
12037 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012038
Matthias Kloseb9621712010-04-24 17:59:49 +000012039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
12040$as_echo_n "checking for inet_aton... " >&6; }
12041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012042/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012043
Martin v. Löwis86d66262006-02-17 08:40:11 +000012044#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012045#include <sys/socket.h>
12046#include <netinet/in.h>
12047#include <arpa/inet.h>
12048
Martin v. Löwise9416172003-05-03 10:12:45 +000012049int
12050main ()
12051{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012052void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000012053 ;
12054 return 0;
12055}
12056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012057if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012058
Matthias Kloseb9621712010-04-24 17:59:49 +000012059$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012060
Matthias Kloseb159a552010-04-25 21:00:44 +000012061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012062$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012063else
Matthias Kloseb9621712010-04-24 17:59:49 +000012064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12065$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012066
12067fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012068rm -f core conftest.err conftest.$ac_objext \
12069 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012070
Matthias Kloseb9621712010-04-24 17:59:49 +000012071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
12072$as_echo_n "checking for inet_pton... " >&6; }
12073cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012074/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000012075
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012076#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000012077#include <sys/socket.h>
12078#include <netinet/in.h>
12079#include <arpa/inet.h>
12080
Martin v. Löwise9416172003-05-03 10:12:45 +000012081int
12082main ()
12083{
12084void* p = inet_pton
12085 ;
12086 return 0;
12087}
12088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012089if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000012090
Matthias Kloseb9621712010-04-24 17:59:49 +000012091$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000012092
Matthias Kloseb159a552010-04-25 21:00:44 +000012093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012094$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012095else
Matthias Kloseb9621712010-04-24 17:59:49 +000012096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12097$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000012098
12099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000012101
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012102# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000012103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
12104$as_echo_n "checking for setgroups... " >&6; }
12105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012106/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012107
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000012108#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000012109#ifdef HAVE_GRP_H
12110#include <grp.h>
12111#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000012112
Martin v. Löwisd5843682002-11-21 20:41:28 +000012113int
12114main ()
12115{
12116void* p = setgroups
12117 ;
12118 return 0;
12119}
12120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012121if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000012122
Matthias Kloseb9621712010-04-24 17:59:49 +000012123$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000012124
Matthias Kloseb159a552010-04-25 21:00:44 +000012125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012126$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012127else
Matthias Kloseb9621712010-04-24 17:59:49 +000012128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12129$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000012130
12131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012133
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012134# check for openpty and forkpty
12135
12136for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012137do :
12138 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012139if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012140 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012141#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012142_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012143
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012144else
Matthias Kloseb9621712010-04-24 17:59:49 +000012145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
12146$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012147if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012149else
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012151LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012152cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012153/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012154
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012155/* Override any GCC internal prototype to avoid an error.
12156 Use char because int might match the return type of a GCC
12157 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012158#ifdef __cplusplus
12159extern "C"
12160#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012161char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012162int
12163main ()
12164{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012165return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012166 ;
12167 return 0;
12168}
12169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012170if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012172else
Matthias Kloseb9621712010-04-24 17:59:49 +000012173 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012175rm -f core conftest.err conftest.$ac_objext \
12176 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012177LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012178fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
12180$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012181if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012182 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012183 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012184else
Matthias Kloseb9621712010-04-24 17:59:49 +000012185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
12186$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012187if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012188 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012189else
12190 ac_check_lib_save_LIBS=$LIBS
12191LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012193/* end confdefs.h. */
12194
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012195/* Override any GCC internal prototype to avoid an error.
12196 Use char because int might match the return type of a GCC
12197 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012198#ifdef __cplusplus
12199extern "C"
12200#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012201char openpty ();
12202int
12203main ()
12204{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012205return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012206 ;
12207 return 0;
12208}
12209_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012210if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012211 ac_cv_lib_bsd_openpty=yes
12212else
Matthias Kloseb9621712010-04-24 17:59:49 +000012213 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012214fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012215rm -f core conftest.err conftest.$ac_objext \
12216 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012217LIBS=$ac_check_lib_save_LIBS
12218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
12220$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012221if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012222 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012223 LIBS="$LIBS -lbsd"
12224fi
12225
12226
12227fi
12228
Fred Drake8cef4cf2000-06-28 16:40:38 +000012229
12230fi
12231done
12232
12233for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000012234do :
12235 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020012236if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012237 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012238#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012239_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012240
Fred Drake8cef4cf2000-06-28 16:40:38 +000012241else
Matthias Kloseb9621712010-04-24 17:59:49 +000012242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
12243$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012244if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000012246else
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012248LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012250/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012251
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252/* Override any GCC internal prototype to avoid an error.
12253 Use char because int might match the return type of a GCC
12254 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012255#ifdef __cplusplus
12256extern "C"
12257#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012258char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012259int
12260main ()
12261{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012262return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 ;
12264 return 0;
12265}
12266_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012267if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000012269else
Matthias Kloseb9621712010-04-24 17:59:49 +000012270 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012271fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012272rm -f core conftest.err conftest.$ac_objext \
12273 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012274LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000012275fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
12277$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012278if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012279 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000012280 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012281else
Matthias Kloseb9621712010-04-24 17:59:49 +000012282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
12283$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012284if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012285 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012286else
12287 ac_check_lib_save_LIBS=$LIBS
12288LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012290/* end confdefs.h. */
12291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012292/* Override any GCC internal prototype to avoid an error.
12293 Use char because int might match the return type of a GCC
12294 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012295#ifdef __cplusplus
12296extern "C"
12297#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012298char forkpty ();
12299int
12300main ()
12301{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012302return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012303 ;
12304 return 0;
12305}
12306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012307if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012308 ac_cv_lib_bsd_forkpty=yes
12309else
Matthias Kloseb9621712010-04-24 17:59:49 +000012310 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000012311fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012312rm -f core conftest.err conftest.$ac_objext \
12313 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012314LIBS=$ac_check_lib_save_LIBS
12315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
12317$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012318if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012319 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000012320 LIBS="$LIBS -lbsd"
12321fi
12322
12323
12324fi
12325
Fred Drake8cef4cf2000-06-28 16:40:38 +000012326
12327fi
12328done
12329
Jack Jansendd19cf82001-12-06 22:36:17 +000012330
Christian Heimesb186d002008-03-18 15:15:01 +000012331# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000012332for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000012333do :
12334 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020012335if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000012336 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012337#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000012338_ACEOF
12339
12340fi
12341done
12342
12343
Michael W. Hudson54241132001-12-07 15:38:26 +000012344# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000012345for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000012346do :
12347 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12348ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012349if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012350 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012351#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012352_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000012353
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012354fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000012355done
12356
Michael W. Hudson54241132001-12-07 15:38:26 +000012357
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012358ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020012359if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012360 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000012361
Martin v. Löwis1142de32002-03-29 16:28:31 +000012362else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012363 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012364 *" dup2.$ac_objext "* ) ;;
12365 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012366 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012367esac
12368
Martin v. Löwis1142de32002-03-29 16:28:31 +000012369fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012370
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012371ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020012372if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012373 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
12374
12375else
12376 case " $LIBOBJS " in
12377 *" strdup.$ac_objext "* ) ;;
12378 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
12379 ;;
12380esac
12381
12382fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000012383
12384
12385for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012386do :
12387 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012388if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012389 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012390#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012393/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012394#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012395int
12396main ()
12397{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012398getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012399 ;
12400 return 0;
12401}
12402_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012403if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012404
Matthias Kloseb9621712010-04-24 17:59:49 +000012405$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012406
Guido van Rossum627b2d71993-12-24 10:39:16 +000012407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012409
Guido van Rossum627b2d71993-12-24 10:39:16 +000012410fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012411done
Guido van Rossum627b2d71993-12-24 10:39:16 +000012412
Jack Jansen150753c2003-03-29 22:07:47 +000012413for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000012414do :
12415 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020012416if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000012417 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012418#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000012419_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012421/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000012422#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000012423int
12424main ()
12425{
12426setpgrp(0,0);
12427 ;
12428 return 0;
12429}
12430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012431if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012432
Matthias Kloseb9621712010-04-24 17:59:49 +000012433$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000012434
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012435fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000012437
12438fi
12439done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000012440
Thomas Wouters3a584202000-08-05 23:28:51 +000012441for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000012442do :
12443 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020012444if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012445 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012446#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012449/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012450#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012451int
12452main ()
12453{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012454gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012455 ;
12456 return 0;
12457}
12458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012459if ac_fn_c_try_compile "$LINENO"; then :
12460
Guido van Rossum627b2d71993-12-24 10:39:16 +000012461else
Skip Montanaro6dead952003-09-25 14:50:04 +000012462
Matthias Kloseb9621712010-04-24 17:59:49 +000012463$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012464
Martin v. Löwis11437992002-04-12 09:54:03 +000012465
Guido van Rossum627b2d71993-12-24 10:39:16 +000012466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012468
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012469fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012470done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012471
Michael W. Hudson54241132001-12-07 15:38:26 +000012472
Victor Stinnere0be4232011-10-25 13:06:09 +020012473for ac_func in clock_gettime
12474do :
12475 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
12476if test "x$ac_cv_func_clock_gettime" = xyes; then :
12477 cat >>confdefs.h <<_ACEOF
12478#define HAVE_CLOCK_GETTIME 1
12479_ACEOF
12480
12481else
12482
12483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
12484$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
12485if ${ac_cv_lib_rt_clock_gettime+:} false; then :
12486 $as_echo_n "(cached) " >&6
12487else
12488 ac_check_lib_save_LIBS=$LIBS
12489LIBS="-lrt $LIBS"
12490cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12491/* end confdefs.h. */
12492
12493/* Override any GCC internal prototype to avoid an error.
12494 Use char because int might match the return type of a GCC
12495 builtin and then its argument prototype would still apply. */
12496#ifdef __cplusplus
12497extern "C"
12498#endif
12499char clock_gettime ();
12500int
12501main ()
12502{
12503return clock_gettime ();
12504 ;
12505 return 0;
12506}
12507_ACEOF
12508if ac_fn_c_try_link "$LINENO"; then :
12509 ac_cv_lib_rt_clock_gettime=yes
12510else
12511 ac_cv_lib_rt_clock_gettime=no
12512fi
12513rm -f core conftest.err conftest.$ac_objext \
12514 conftest$ac_exeext conftest.$ac_ext
12515LIBS=$ac_check_lib_save_LIBS
12516fi
12517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
12518$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
12519if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
12520
Victor Stinner7efb8332014-08-29 15:41:08 +020012521 LIBS="$LIBS -lrt"
Victor Stinnere0be4232011-10-25 13:06:09 +020012522 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
12523
12524
12525$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
12526
12527
12528fi
12529
12530
12531fi
12532done
12533
12534
12535for ac_func in clock_getres
12536do :
12537 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
12538if test "x$ac_cv_func_clock_getres" = xyes; then :
12539 cat >>confdefs.h <<_ACEOF
12540#define HAVE_CLOCK_GETRES 1
12541_ACEOF
12542
12543else
12544
12545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
12546$as_echo_n "checking for clock_getres in -lrt... " >&6; }
12547if ${ac_cv_lib_rt_clock_getres+:} false; then :
12548 $as_echo_n "(cached) " >&6
12549else
12550 ac_check_lib_save_LIBS=$LIBS
12551LIBS="-lrt $LIBS"
12552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12553/* end confdefs.h. */
12554
12555/* Override any GCC internal prototype to avoid an error.
12556 Use char because int might match the return type of a GCC
12557 builtin and then its argument prototype would still apply. */
12558#ifdef __cplusplus
12559extern "C"
12560#endif
12561char clock_getres ();
12562int
12563main ()
12564{
12565return clock_getres ();
12566 ;
12567 return 0;
12568}
12569_ACEOF
12570if ac_fn_c_try_link "$LINENO"; then :
12571 ac_cv_lib_rt_clock_getres=yes
12572else
12573 ac_cv_lib_rt_clock_getres=no
12574fi
12575rm -f core conftest.err conftest.$ac_objext \
12576 conftest$ac_exeext conftest.$ac_ext
12577LIBS=$ac_check_lib_save_LIBS
12578fi
12579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
12580$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
12581if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
12582
12583 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
12584
12585
12586fi
12587
12588
12589fi
12590done
12591
12592
Benjamin Peterson37098cd2016-09-13 22:55:09 -070012593for ac_func in clock_settime
12594do :
12595 ac_fn_c_check_func "$LINENO" "clock_settime" "ac_cv_func_clock_settime"
12596if test "x$ac_cv_func_clock_settime" = xyes; then :
12597 cat >>confdefs.h <<_ACEOF
12598#define HAVE_CLOCK_SETTIME 1
12599_ACEOF
12600
12601else
12602
12603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5
12604$as_echo_n "checking for clock_settime in -lrt... " >&6; }
12605if ${ac_cv_lib_rt_clock_settime+:} false; then :
12606 $as_echo_n "(cached) " >&6
12607else
12608 ac_check_lib_save_LIBS=$LIBS
12609LIBS="-lrt $LIBS"
12610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12611/* end confdefs.h. */
12612
12613/* Override any GCC internal prototype to avoid an error.
12614 Use char because int might match the return type of a GCC
12615 builtin and then its argument prototype would still apply. */
12616#ifdef __cplusplus
12617extern "C"
12618#endif
12619char clock_settime ();
12620int
12621main ()
12622{
12623return clock_settime ();
12624 ;
12625 return 0;
12626}
12627_ACEOF
12628if ac_fn_c_try_link "$LINENO"; then :
12629 ac_cv_lib_rt_clock_settime=yes
12630else
12631 ac_cv_lib_rt_clock_settime=no
12632fi
12633rm -f core conftest.err conftest.$ac_objext \
12634 conftest$ac_exeext conftest.$ac_ext
12635LIBS=$ac_check_lib_save_LIBS
12636fi
12637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5
12638$as_echo "$ac_cv_lib_rt_clock_settime" >&6; }
12639if test "x$ac_cv_lib_rt_clock_settime" = xyes; then :
12640
12641 $as_echo "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h
12642
12643
12644fi
12645
12646
12647fi
12648done
12649
12650
Matthias Kloseb9621712010-04-24 17:59:49 +000012651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
12652$as_echo_n "checking for major... " >&6; }
12653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012654/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012655
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012656#if defined(MAJOR_IN_MKDEV)
12657#include <sys/mkdev.h>
12658#elif defined(MAJOR_IN_SYSMACROS)
12659#include <sys/sysmacros.h>
12660#else
12661#include <sys/types.h>
12662#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012663
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012664int
12665main ()
12666{
12667
12668 makedev(major(0),minor(0));
12669
12670 ;
12671 return 0;
12672}
12673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012675
12676
Matthias Kloseb9621712010-04-24 17:59:49 +000012677$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012678
Matthias Kloseb9621712010-04-24 17:59:49 +000012679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12680$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012681
12682else
Skip Montanaro6dead952003-09-25 14:50:04 +000012683
Matthias Kloseb9621712010-04-24 17:59:49 +000012684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12685$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000012686
12687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012688rm -f core conftest.err conftest.$ac_objext \
12689 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012690
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012691# On Android API level 24 with android-ndk-r13, if_nameindex() is available,
12692# but the if_nameindex structure is not defined.
Xavier de Gaye70878422016-12-21 12:46:36 +010012693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for if_nameindex" >&5
12694$as_echo_n "checking for if_nameindex... " >&6; }
12695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12696/* end confdefs.h. */
12697
Xavier de Gaye40e320b2016-12-21 17:29:59 +010012698#include <stdio.h>
12699#ifdef STDC_HEADERS
12700# include <stdlib.h>
12701# include <stddef.h>
12702#else
12703# ifdef HAVE_STDLIB_H
12704# include <stdlib.h>
12705# endif
12706#endif
12707#ifdef HAVE_SYS_SOCKET_H
12708# include <sys/socket.h>
12709#endif
Xavier de Gaye70878422016-12-21 12:46:36 +010012710#ifdef HAVE_NET_IF_H
12711# include <net/if.h>
12712#endif
12713
12714int
12715main ()
12716{
12717struct if_nameindex *ni = if_nameindex(); int x = ni[0].if_index;
12718 ;
12719 return 0;
12720}
12721_ACEOF
12722if ac_fn_c_try_link "$LINENO"; then :
12723
12724$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h
12725
12726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12727$as_echo "yes" >&6; }
12728else
12729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12730$as_echo "no" >&6; }
12731
12732fi
12733rm -f core conftest.err conftest.$ac_objext \
12734 conftest$ac_exeext conftest.$ac_ext
12735
Xavier de Gayebdf0d0f2016-12-22 10:38:59 +010012736# Issue #28762: lockf() is available on Android API level 24, but the F_LOCK
12737# macro is not defined in android-ndk-r13.
12738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lockf" >&5
12739$as_echo_n "checking for lockf... " >&6; }
12740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12741/* end confdefs.h. */
12742#include <unistd.h>
12743int
12744main ()
12745{
12746lockf(0, F_LOCK, 0);
12747 ;
12748 return 0;
12749}
12750_ACEOF
12751if ac_fn_c_try_link "$LINENO"; then :
12752
12753$as_echo "#define HAVE_LOCKF 1" >>confdefs.h
12754
12755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12756$as_echo "yes" >&6; }
12757else
12758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12759$as_echo "no" >&6; }
12760
12761fi
12762rm -f core conftest.err conftest.$ac_objext \
12763 conftest$ac_exeext conftest.$ac_ext
12764
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012765# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000012766# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
12768$as_echo_n "checking for getaddrinfo... " >&6; }
12769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012770/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012771
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012772#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012773#include <sys/socket.h>
12774#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000012775#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012776
Martin v. Löwis11437992002-04-12 09:54:03 +000012777int
12778main ()
12779{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012780getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000012781 ;
12782 return 0;
12783}
12784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012785if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012786 have_getaddrinfo=yes
12787else
Matthias Kloseb9621712010-04-24 17:59:49 +000012788 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012789fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012790rm -f core conftest.err conftest.$ac_objext \
12791 conftest$ac_exeext conftest.$ac_ext
12792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
12793$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012794if test $have_getaddrinfo = yes
12795then
Matthias Kloseb9621712010-04-24 17:59:49 +000012796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
12797$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012798 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012800else
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010012802
12803if test "${enable_ipv6+set}" = set; then
12804 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
12805else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012806 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010012807fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012808else
Matthias Kloseb9621712010-04-24 17:59:49 +000012809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012810/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012811
Stefan Krah19c21392012-11-22 23:47:32 +010012812#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012813#include <sys/types.h>
12814#include <netdb.h>
12815#include <string.h>
12816#include <sys/socket.h>
12817#include <netinet/in.h>
12818
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012819int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012820{
12821 int passive, gaierr, inet4 = 0, inet6 = 0;
12822 struct addrinfo hints, *ai, *aitop;
12823 char straddr[INET6_ADDRSTRLEN], strport[16];
12824
12825 for (passive = 0; passive <= 1; passive++) {
12826 memset(&hints, 0, sizeof(hints));
12827 hints.ai_family = AF_UNSPEC;
12828 hints.ai_flags = passive ? AI_PASSIVE : 0;
12829 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000012830 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012831 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
12832 (void)gai_strerror(gaierr);
12833 goto bad;
12834 }
12835 for (ai = aitop; ai; ai = ai->ai_next) {
12836 if (ai->ai_addr == NULL ||
12837 ai->ai_addrlen == 0 ||
12838 getnameinfo(ai->ai_addr, ai->ai_addrlen,
12839 straddr, sizeof(straddr), strport, sizeof(strport),
12840 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
12841 goto bad;
12842 }
12843 switch (ai->ai_family) {
12844 case AF_INET:
12845 if (strcmp(strport, "54321") != 0) {
12846 goto bad;
12847 }
12848 if (passive) {
12849 if (strcmp(straddr, "0.0.0.0") != 0) {
12850 goto bad;
12851 }
12852 } else {
12853 if (strcmp(straddr, "127.0.0.1") != 0) {
12854 goto bad;
12855 }
12856 }
12857 inet4++;
12858 break;
12859 case AF_INET6:
12860 if (strcmp(strport, "54321") != 0) {
12861 goto bad;
12862 }
12863 if (passive) {
12864 if (strcmp(straddr, "::") != 0) {
12865 goto bad;
12866 }
12867 } else {
12868 if (strcmp(straddr, "::1") != 0) {
12869 goto bad;
12870 }
12871 }
12872 inet6++;
12873 break;
12874 case AF_UNSPEC:
12875 goto bad;
12876 break;
12877 default:
12878 /* another family support? */
12879 break;
12880 }
12881 }
Benjamin Peterson01c340d2016-09-06 15:54:24 -070012882 freeaddrinfo(aitop);
12883 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012884 }
12885
12886 if (!(inet4 == 0 || inet4 == 2))
12887 goto bad;
12888 if (!(inet6 == 0 || inet6 == 2))
12889 goto bad;
12890
12891 if (aitop)
12892 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012893 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012894
12895 bad:
12896 if (aitop)
12897 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012898 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012899}
12900
Martin v. Löwis11437992002-04-12 09:54:03 +000012901_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012902if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012903 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012904else
Matthias Kloseb9621712010-04-24 17:59:49 +000012905 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012906fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012907rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12908 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012910
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012911fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012912
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
12916$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
12917
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020012918if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000012919then
12920 if test $ipv6 = yes
12921 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012922 echo 'Fatal: You must get working getaddrinfo() function.'
12923 echo ' or you can specify "--disable-ipv6"'.
12924 exit 1
12925 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012926else
Martin v. Löwis11437992002-04-12 09:54:03 +000012927
Matthias Kloseb9621712010-04-24 17:59:49 +000012928$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000012929
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012930fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000012931
Jack Jansen9a66b6d2001-08-08 13:56:14 +000012932for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000012933do :
12934 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020012935if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012936 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012937#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012938_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012939
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012940fi
12941done
12942
Michael W. Hudson54241132001-12-07 15:38:26 +000012943
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012944# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
12946$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012947if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012948 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012949else
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012951/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012952#include <sys/types.h>
12953#include <sys/time.h>
12954#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012955
Martin v. Löwis11437992002-04-12 09:54:03 +000012956int
12957main ()
12958{
12959if ((struct tm *) 0)
12960return 0;
12961 ;
12962 return 0;
12963}
12964_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012965if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012966 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012967else
Matthias Kloseb9621712010-04-24 17:59:49 +000012968 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
12973$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012974if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012975
Matthias Kloseb9621712010-04-24 17:59:49 +000012976$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012977
12978fi
12979
Matthias Kloseb9621712010-04-24 17:59:49 +000012980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
12981$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012982if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012983 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012984else
Matthias Kloseb9621712010-04-24 17:59:49 +000012985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012986/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012987#include <sys/types.h>
12988#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012989
Martin v. Löwis11437992002-04-12 09:54:03 +000012990int
12991main ()
12992{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993struct tm tm;
12994 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000012995 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000012996 ;
12997 return 0;
12998}
12999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013000if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013001 ac_cv_struct_tm=time.h
13002else
Matthias Kloseb9621712010-04-24 17:59:49 +000013003 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013006fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013007{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
13008$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013009if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013010
Matthias Kloseb9621712010-04-24 17:59:49 +000013011$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013012
13013fi
13014
Matthias Kloseb9621712010-04-24 17:59:49 +000013015ac_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 +000013016#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000013017
Matthias Kloseb9621712010-04-24 17:59:49 +000013018"
Victor Stinnere0be4232011-10-25 13:06:09 +020013019if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013020
13021cat >>confdefs.h <<_ACEOF
13022#define HAVE_STRUCT_TM_TM_ZONE 1
13023_ACEOF
13024
13025
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013026fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013027
Martin v. Löwis11437992002-04-12 09:54:03 +000013028if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
13029
Matthias Kloseb9621712010-04-24 17:59:49 +000013030$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013031
13032else
Matthias Kloseb9621712010-04-24 17:59:49 +000013033 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
13034"
Victor Stinnere0be4232011-10-25 13:06:09 +020013035if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037else
Matthias Kloseb9621712010-04-24 17:59:49 +000013038 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013039fi
13040
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013041cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013042#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013043_ACEOF
13044
Matthias Kloseb9621712010-04-24 17:59:49 +000013045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
13046$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013047if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013048 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013049else
Matthias Kloseb9621712010-04-24 17:59:49 +000013050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013051/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013052#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013053#if !HAVE_DECL_TZNAME
13054extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000013055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013056
Martin v. Löwis11437992002-04-12 09:54:03 +000013057int
13058main ()
13059{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013060return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013061 ;
13062 return 0;
13063}
13064_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013065if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013066 ac_cv_var_tzname=yes
13067else
Matthias Kloseb9621712010-04-24 17:59:49 +000013068 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013069fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013070rm -f core conftest.err conftest.$ac_objext \
13071 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000013072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
13074$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013075 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013076
Matthias Kloseb9621712010-04-24 17:59:49 +000013077$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013078
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013079 fi
13080fi
13081
Matthias Kloseb9621712010-04-24 17:59:49 +000013082ac_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 +020013083if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013084
13085cat >>confdefs.h <<_ACEOF
13086#define HAVE_STRUCT_STAT_ST_RDEV 1
13087_ACEOF
13088
13089
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013090fi
13091
Matthias Kloseb9621712010-04-24 17:59:49 +000013092ac_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 +020013093if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013094
Martin v. Löwis11437992002-04-12 09:54:03 +000013095cat >>confdefs.h <<_ACEOF
13096#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13097_ACEOF
13098
13099
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013100fi
13101
Matthias Kloseb9621712010-04-24 17:59:49 +000013102ac_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 +020013103if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000013104
13105cat >>confdefs.h <<_ACEOF
13106#define HAVE_STRUCT_STAT_ST_FLAGS 1
13107_ACEOF
13108
13109
13110fi
13111
Matthias Kloseb9621712010-04-24 17:59:49 +000013112ac_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 +020013113if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013114
13115cat >>confdefs.h <<_ACEOF
13116#define HAVE_STRUCT_STAT_ST_GEN 1
13117_ACEOF
13118
13119
13120fi
13121
Matthias Kloseb9621712010-04-24 17:59:49 +000013122ac_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 +020013123if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000013124
13125cat >>confdefs.h <<_ACEOF
13126#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
13127_ACEOF
13128
13129
13130fi
13131
Matthias Kloseb9621712010-04-24 17:59:49 +000013132ac_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 +020013133if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000013134
Martin v. Löwis11437992002-04-12 09:54:03 +000013135cat >>confdefs.h <<_ACEOF
13136#define HAVE_STRUCT_STAT_ST_BLOCKS 1
13137_ACEOF
13138
13139
Guido van Rossum98bf58f2001-10-18 20:34:25 +000013140fi
13141
Stefan Krah267b6392016-04-26 01:09:18 +020013142ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
13143 #include <sys/types.h>
13144 #include <pwd.h>
13145
13146"
13147if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
13148
13149cat >>confdefs.h <<_ACEOF
13150#define HAVE_STRUCT_PASSWD_PW_GECOS 1
13151_ACEOF
13152
13153
13154fi
13155ac_fn_c_check_member "$LINENO" "struct passwd" "pw_passwd" "ac_cv_member_struct_passwd_pw_passwd" "
13156 #include <sys/types.h>
13157 #include <pwd.h>
13158
13159"
13160if test "x$ac_cv_member_struct_passwd_pw_passwd" = xyes; then :
13161
13162cat >>confdefs.h <<_ACEOF
13163#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
13164_ACEOF
13165
13166
13167fi
13168
Zachary Ware6a6967e2016-10-01 00:47:27 -050013169# Issue #21085: In Cygwin, siginfo_t does not have si_band field.
13170ac_fn_c_check_member "$LINENO" "siginfo_t" "si_band" "ac_cv_member_siginfo_t_si_band" "#include <signal.h>
13171"
13172if test "x$ac_cv_member_siginfo_t_si_band" = xyes; then :
13173
13174cat >>confdefs.h <<_ACEOF
13175#define HAVE_SIGINFO_T_SI_BAND 1
13176_ACEOF
13177
13178
13179fi
13180
Michael W. Hudson54241132001-12-07 15:38:26 +000013181
Matthias Kloseb9621712010-04-24 17:59:49 +000013182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
13183$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013184if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013185 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013186else
Matthias Kloseb159a552010-04-25 21:00:44 +000013187
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013189/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013190#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013191int
13192main ()
13193{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013194return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000013195 ;
13196 return 0;
13197}
13198_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013199if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013200 ac_cv_header_time_altzone=yes
13201else
Matthias Kloseb9621712010-04-24 17:59:49 +000013202 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000013203fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000013205
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013206fi
13207
Matthias Kloseb9621712010-04-24 17:59:49 +000013208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
13209$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013210if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013211
Matthias Kloseb9621712010-04-24 17:59:49 +000013212$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013213
13214fi
13215
Guido van Rossumda88dad1995-01-26 00:46:29 +000013216was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
13218$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
13219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013220/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013221
13222#include <sys/types.h>
13223#include <sys/select.h>
13224#include <sys/time.h>
13225
Martin v. Löwis11437992002-04-12 09:54:03 +000013226int
13227main ()
13228{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013229;
Martin v. Löwis11437992002-04-12 09:54:03 +000013230 ;
13231 return 0;
13232}
13233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013234if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013235
13236
Matthias Kloseb9621712010-04-24 17:59:49 +000013237$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013238
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013239 was_it_defined=yes
13240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
13244$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013245
Matthias Kloseb9621712010-04-24 17:59:49 +000013246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
13247$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013248if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013250else
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013252/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000013253#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013254int
13255main ()
13256{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013257struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000013258 ;
13259 return 0;
13260}
13261_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013262if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013263 ac_cv_struct_addrinfo=yes
13264else
Matthias Kloseb9621712010-04-24 17:59:49 +000013265 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13268fi
13269
Matthias Kloseb9621712010-04-24 17:59:49 +000013270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
13271$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013272if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Matthias Kloseb9621712010-04-24 17:59:49 +000013274$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013275
13276fi
13277
Matthias Kloseb9621712010-04-24 17:59:49 +000013278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
13279$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013280if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013281 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013282else
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013284/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013285
13286# include <sys/types.h>
13287# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013288int
13289main ()
13290{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013291struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000013292 ;
13293 return 0;
13294}
13295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013296if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013297 ac_cv_struct_sockaddr_storage=yes
13298else
Matthias Kloseb9621712010-04-24 17:59:49 +000013299 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13302fi
13303
Matthias Kloseb9621712010-04-24 17:59:49 +000013304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
13305$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013306if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013307
Matthias Kloseb9621712010-04-24 17:59:49 +000013308$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013309
13310fi
13311
Christian Heimesdffa3942016-09-05 23:54:41 +020013312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_alg" >&5
13313$as_echo_n "checking for sockaddr_alg... " >&6; }
13314if ${ac_cv_struct_sockaddr_alg+:} false; then :
13315 $as_echo_n "(cached) " >&6
13316else
13317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13318/* end confdefs.h. */
13319
13320# include <sys/types.h>
13321# include <sys/socket.h>
13322# include <linux/if_alg.h>
13323int
13324main ()
13325{
13326struct sockaddr_alg s
13327 ;
13328 return 0;
13329}
13330_ACEOF
13331if ac_fn_c_try_compile "$LINENO"; then :
13332 ac_cv_struct_sockaddr_alg=yes
13333else
13334 ac_cv_struct_sockaddr_alg=no
13335fi
13336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13337fi
13338
13339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5
13340$as_echo "$ac_cv_struct_sockaddr_alg" >&6; }
13341if test $ac_cv_struct_sockaddr_alg = yes; then
13342
13343$as_echo "#define HAVE_SOCKADDR_ALG 1" >>confdefs.h
13344
13345fi
13346
Guido van Rossum627b2d71993-12-24 10:39:16 +000013347# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000013348
Matthias Kloseb9621712010-04-24 17:59:49 +000013349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
13350$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013351if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013352 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000013353else
Matthias Kloseb9621712010-04-24 17:59:49 +000013354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013355/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013356$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013357int
13358main ()
13359{
13360static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013361test_array [0] = 0;
13362return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000013363
13364 ;
13365 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000013366}
Martin v. Löwis11437992002-04-12 09:54:03 +000013367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013368if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013369 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013370else
Matthias Kloseb9621712010-04-24 17:59:49 +000013371 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
13376$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013377if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013378 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013379
13380fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000013381
Matthias Kloseb9621712010-04-24 17:59:49 +000013382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
13383$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013384if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013385 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013386else
Matthias Kloseb9621712010-04-24 17:59:49 +000013387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013388/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013389
Martin v. Löwis11437992002-04-12 09:54:03 +000013390int
13391main ()
13392{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013393
Martin v. Löwis11437992002-04-12 09:54:03 +000013394#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013395 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013396 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013397 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000013398 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013399 char const *const *pcpcc;
13400 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000013401 /* NEC SVR4.0.2 mips cc rejects this. */
13402 struct point {int x, y;};
13403 static struct point const zero = {0,0};
13404 /* AIX XL C 1.02.0.0 rejects this.
13405 It does not let you subtract one const X* pointer from another in
13406 an arm of an if-expression whose if-part is not a constant
13407 expression */
13408 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013409 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013411 ++pcpcc;
13412 ppc = (char**) pcpcc;
13413 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013414 { /* SCO 3.2v4 cc rejects this sort of thing. */
13415 char tx;
13416 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000013417 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013418
Martin v. Löwis11437992002-04-12 09:54:03 +000013419 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013420 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 }
13422 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
13423 int x[] = {25, 17};
13424 const int *foo = &x[0];
13425 ++foo;
13426 }
13427 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13428 typedef const int *iptr;
13429 iptr p = 0;
13430 ++p;
13431 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013432 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000013434 struct s { int j; const int *ap[3]; } bx;
13435 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000013436 }
13437 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13438 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013439 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013440 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013441 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000013442#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000013443
Martin v. Löwis11437992002-04-12 09:54:03 +000013444 ;
13445 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000013446}
Martin v. Löwis11437992002-04-12 09:54:03 +000013447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013448if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013449 ac_cv_c_const=yes
13450else
Matthias Kloseb9621712010-04-24 17:59:49 +000013451 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013454fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
13456$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013457if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013458
Matthias Kloseb9621712010-04-24 17:59:49 +000013459$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013460
13461fi
13462
Michael W. Hudson54241132001-12-07 15:38:26 +000013463
Guido van Rossumda88dad1995-01-26 00:46:29 +000013464works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
13466$as_echo_n "checking for working volatile... " >&6; }
13467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013468/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000013469
Martin v. Löwis11437992002-04-12 09:54:03 +000013470int
13471main ()
13472{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013473volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013474 ;
13475 return 0;
13476}
13477_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013478if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013479 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013480else
Skip Montanaro6dead952003-09-25 14:50:04 +000013481
Matthias Kloseb9621712010-04-24 17:59:49 +000013482$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000013483
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013484
Guido van Rossum627b2d71993-12-24 10:39:16 +000013485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13488$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013489
Guido van Rossumda88dad1995-01-26 00:46:29 +000013490works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
13492$as_echo_n "checking for working signed char... " >&6; }
13493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013494/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013495
Martin v. Löwis11437992002-04-12 09:54:03 +000013496int
13497main ()
13498{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013499signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000013500 ;
13501 return 0;
13502}
13503_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013504if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000013505 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000013506else
Skip Montanaro6dead952003-09-25 14:50:04 +000013507
Matthias Kloseb9621712010-04-24 17:59:49 +000013508$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000013509
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013510
Guido van Rossum7f43da71994-08-01 12:15:30 +000013511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13514$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000013515
Guido van Rossumda88dad1995-01-26 00:46:29 +000013516have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
13518$as_echo_n "checking for prototypes... " >&6; }
13519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013520/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013521int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013522int
13523main ()
13524{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013525return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013530if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013531
Matthias Kloseb9621712010-04-24 17:59:49 +000013532$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013533
Matthias Kloseb159a552010-04-25 21:00:44 +000013534 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
13538$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013539
Guido van Rossumda88dad1995-01-26 00:46:29 +000013540works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
13542$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
13543cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013544/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000013545
13546#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000013547int foo(int x, ...) {
13548 va_list va;
13549 va_start(va, x);
13550 va_arg(va, int);
13551 va_arg(va, char *);
13552 va_arg(va, double);
13553 return 0;
13554}
Guido van Rossum7f43da71994-08-01 12:15:30 +000013555
Martin v. Löwis11437992002-04-12 09:54:03 +000013556int
13557main ()
13558{
Guido van Rossum90eea071996-08-30 20:58:57 +000013559return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000013560 ;
13561 return 0;
13562}
13563_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013565
13566
Matthias Kloseb9621712010-04-24 17:59:49 +000013567$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013568
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013569 works=yes
13570
Guido van Rossum627b2d71993-12-24 10:39:16 +000013571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013573{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
13574$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013575
Martin v. Löwisd6320502004-08-12 13:45:08 +000013576# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000013577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
13578$as_echo_n "checking for socketpair... " >&6; }
13579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013580/* end confdefs.h. */
13581
13582#include <sys/types.h>
13583#include <sys/socket.h>
13584
13585int
13586main ()
13587{
13588void *x=socketpair
13589 ;
13590 return 0;
13591}
13592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000013594
Matthias Kloseb9621712010-04-24 17:59:49 +000013595$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000013596
Matthias Kloseb159a552010-04-25 21:00:44 +000013597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000013598$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013599else
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13601$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000013602
13603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000013605
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013606# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000013607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
13608$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
13609cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013610/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013611#include <sys/types.h>
13612#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013613int
13614main ()
13615{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013616struct sockaddr x;
13617x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 ;
13619 return 0;
13620}
13621_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013622if ac_fn_c_try_compile "$LINENO"; then :
13623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13624$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013625
Matthias Kloseb9621712010-04-24 17:59:49 +000013626$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013627
13628else
Matthias Kloseb9621712010-04-24 17:59:49 +000013629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13630$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013631
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013632fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000013634
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013635# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000013636
13637
Matthias Kloseb9621712010-04-24 17:59:49 +000013638ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020013639if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013640
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013642
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
13644$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013645 OLD_CFLAGS=$CFLAGS
13646 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013648/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013649
13650# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013651
Martin v. Löwis11437992002-04-12 09:54:03 +000013652int
13653main ()
13654{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013655
13656 char *name;
13657 struct hostent *he, *res;
13658 char buffer[2048];
13659 int buflen = 2048;
13660 int h_errnop;
13661
13662 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
13664 ;
13665 return 0;
13666}
13667_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013668if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013669
Matthias Kloseb9621712010-04-24 17:59:49 +000013670 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013671
Martin v. Löwis11437992002-04-12 09:54:03 +000013672
Matthias Kloseb9621712010-04-24 17:59:49 +000013673$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013674
Matthias Kloseb9621712010-04-24 17:59:49 +000013675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13676$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013678else
Skip Montanaro6dead952003-09-25 14:50:04 +000013679
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13681$as_echo "no" >&6; }
13682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
13683$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
13684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013685/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013686
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013687# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013688
Martin v. Löwis11437992002-04-12 09:54:03 +000013689int
13690main ()
13691{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013692
13693 char *name;
13694 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000013695 char buffer[2048];
13696 int buflen = 2048;
13697 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013698
Matthias Kloseb159a552010-04-25 21:00:44 +000013699 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000013700
13701 ;
13702 return 0;
13703}
13704_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013705if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013706
Matthias Kloseb9621712010-04-24 17:59:49 +000013707 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000013708
Martin v. Löwis11437992002-04-12 09:54:03 +000013709
Matthias Kloseb159a552010-04-25 21:00:44 +000013710$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013711
Matthias Kloseb9621712010-04-24 17:59:49 +000013712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13713$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013714
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013715else
Skip Montanaro6dead952003-09-25 14:50:04 +000013716
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13718$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000013719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
13720$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
13721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13722/* end confdefs.h. */
13723
13724# include <netdb.h>
13725
13726int
13727main ()
13728{
13729
13730 char *name;
13731 struct hostent *he;
13732 struct hostent_data data;
13733
13734 (void) gethostbyname_r(name, he, &data);
13735
13736 ;
13737 return 0;
13738}
13739_ACEOF
13740if ac_fn_c_try_compile "$LINENO"; then :
13741
13742 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
13743
13744
13745$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
13746
13747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13748$as_echo "yes" >&6; }
13749
13750else
13751
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13753$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013754
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013757
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013760
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013761fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013763 CFLAGS=$OLD_CFLAGS
13764
13765else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013766
Matthias Kloseb9621712010-04-24 17:59:49 +000013767 for ac_func in gethostbyname
13768do :
13769 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020013770if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013772#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013773_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013774
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013775fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013776done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013777
Michael W. Hudson54241132001-12-07 15:38:26 +000013778
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000013779fi
13780
Michael W. Hudson54241132001-12-07 15:38:26 +000013781
13782
13783
13784
13785
13786
Guido van Rossum627b2d71993-12-24 10:39:16 +000013787# checks for system services
13788# (none yet)
13789
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013790# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000013791ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020013792if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013793
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013794else
Matthias Kloseb9621712010-04-24 17:59:49 +000013795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
13796$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013797if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013798 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799else
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013801LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013803/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013805/* Override any GCC internal prototype to avoid an error.
13806 Use char because int might match the return type of a GCC
13807 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013808#ifdef __cplusplus
13809extern "C"
13810#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013811char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013812int
13813main ()
13814{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013815return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 ;
13817 return 0;
13818}
13819_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000013822else
Matthias Kloseb9621712010-04-24 17:59:49 +000013823 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013824fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013825rm -f core conftest.err conftest.$ac_objext \
13826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013827LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
13830$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013831if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013832 cat >>confdefs.h <<_ACEOF
13833#define HAVE_LIBIEEE 1
13834_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013835
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013836 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013837
Guido van Rossum627b2d71993-12-24 10:39:16 +000013838fi
13839
Michael W. Hudson54241132001-12-07 15:38:26 +000013840
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000013841fi
13842
Michael W. Hudson54241132001-12-07 15:38:26 +000013843
Guido van Rossum7f253911997-05-09 02:42:48 +000013844# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000013845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
13846$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013847
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013848# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013849if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013850 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000013851if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013852then
13853
Matthias Kloseb9621712010-04-24 17:59:49 +000013854$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13857$as_echo "yes" >&6; }
13858else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13859$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013860fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013861else
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13863$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013864fi
13865
Guido van Rossum7f253911997-05-09 02:42:48 +000013866
Guido van Rossum7f43da71994-08-01 12:15:30 +000013867# check for --with-libm=...
13868
Guido van Rossum563e7081996-09-10 18:20:48 +000013869case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000013870Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013871*) LIBM=-lm
13872esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
13874$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013876# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013877if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013878 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000013879if test "$withval" = no
13880then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000013881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
13882$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013883elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013884then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
13886$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013887else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013888fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013889else
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
13891$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892fi
13893
Guido van Rossum7f43da71994-08-01 12:15:30 +000013894
13895# check for --with-libc=...
13896
Matthias Kloseb9621712010-04-24 17:59:49 +000013897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
13898$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013900# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013901if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013902 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000013903if test "$withval" = no
13904then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000013905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
13906$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000013907elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000013908then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
13910$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013911else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000013912fi
Guido van Rossum7f253911997-05-09 02:42:48 +000013913else
Matthias Kloseb9621712010-04-24 17:59:49 +000013914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
13915$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013916fi
13917
Guido van Rossum7f43da71994-08-01 12:15:30 +000013918
Stefan Krah1919b7e2012-03-21 18:25:23 +010013919# **************************************
13920# * Check for gcc x64 inline assembler *
13921# **************************************
13922
13923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
13924$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
13925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13926/* end confdefs.h. */
13927
13928int
13929main ()
13930{
13931
13932 __asm__ __volatile__ ("movq %rcx, %rax");
13933
13934 ;
13935 return 0;
13936}
13937_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020013938if ac_fn_c_try_link "$LINENO"; then :
Stefan Krah1919b7e2012-03-21 18:25:23 +010013939 have_gcc_asm_for_x64=yes
13940else
13941 have_gcc_asm_for_x64=no
13942fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020013943rm -f core conftest.err conftest.$ac_objext \
13944 conftest$ac_exeext conftest.$ac_ext
Stefan Krah1919b7e2012-03-21 18:25:23 +010013945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
13946$as_echo "$have_gcc_asm_for_x64" >&6; }
13947if test "$have_gcc_asm_for_x64" = yes
13948then
13949
13950$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
13951
13952fi
13953
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013954# **************************************************
13955# * Check for various properties of floating point *
13956# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
13959$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013960if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013961 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013962else
13963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013965 ac_cv_little_endian_double=no
13966else
Matthias Kloseb9621712010-04-24 17:59:49 +000013967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013968/* end confdefs.h. */
13969
13970#include <string.h>
13971int main() {
13972 double x = 9006104071832581.0;
13973 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
13974 return 0;
13975 else
13976 return 1;
13977}
13978
13979_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013980if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013981 ac_cv_little_endian_double=yes
13982else
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013984fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13986 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013987fi
13988
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013989fi
13990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
13992$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013993if test "$ac_cv_little_endian_double" = yes
13994then
13995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013997
13998fi
13999
Matthias Kloseb9621712010-04-24 17:59:49 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
14001$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014002if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014004else
14005
Matthias Kloseb9621712010-04-24 17:59:49 +000014006if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014007 ac_cv_big_endian_double=no
14008else
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014010/* end confdefs.h. */
14011
14012#include <string.h>
14013int main() {
14014 double x = 9006104071832581.0;
14015 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
14016 return 0;
14017 else
14018 return 1;
14019}
14020
14021_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014022if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014023 ac_cv_big_endian_double=yes
14024else
Matthias Kloseb9621712010-04-24 17:59:49 +000014025 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014026fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14028 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014029fi
14030
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014031fi
14032
Matthias Kloseb9621712010-04-24 17:59:49 +000014033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
14034$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014035if test "$ac_cv_big_endian_double" = yes
14036then
14037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014039
14040fi
14041
14042# Some ARM platforms use a mixed-endian representation for doubles.
14043# While Python doesn't currently have full support for these platforms
14044# (see e.g., issue 1762561), we can at least make sure that float <-> string
14045# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000014046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
14047$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014048if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014049 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014050else
14051
Matthias Kloseb9621712010-04-24 17:59:49 +000014052if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014053 ac_cv_mixed_endian_double=no
14054else
Matthias Kloseb9621712010-04-24 17:59:49 +000014055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014056/* end confdefs.h. */
14057
14058#include <string.h>
14059int main() {
14060 double x = 9006104071832581.0;
14061 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
14062 return 0;
14063 else
14064 return 1;
14065}
14066
14067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014068if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014069 ac_cv_mixed_endian_double=yes
14070else
Matthias Kloseb9621712010-04-24 17:59:49 +000014071 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014072fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014073rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14074 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014075fi
14076
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014077fi
14078
Matthias Kloseb9621712010-04-24 17:59:49 +000014079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
14080$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014081if test "$ac_cv_mixed_endian_double" = yes
14082then
14083
Matthias Kloseb9621712010-04-24 17:59:49 +000014084$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014085
14086fi
14087
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014088# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000014089# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000014090# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000014091# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014092# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000014093# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014094
14095# This inline assembler syntax may also work for suncc and icc,
14096# so we try it on all platforms.
14097
Matthias Kloseb9621712010-04-24 17:59:49 +000014098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
14099$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
14100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014101/* end confdefs.h. */
14102
14103int
14104main ()
14105{
14106
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014107 unsigned short cw;
14108 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
14109 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014110
14111 ;
14112 return 0;
14113}
14114_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014115if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014116 have_gcc_asm_for_x87=yes
14117else
Matthias Kloseb9621712010-04-24 17:59:49 +000014118 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014119fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014120rm -f core conftest.err conftest.$ac_objext \
14121 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
14123$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000014124if test "$have_gcc_asm_for_x87" = yes
14125then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014126
Matthias Kloseb9621712010-04-24 17:59:49 +000014127$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014128
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014129fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014130
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set mc68881 fpcr" >&5
14132$as_echo_n "checking whether we can use gcc inline assembler to get and set mc68881 fpcr... " >&6; }
14133cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14134/* end confdefs.h. */
14135
14136int
14137main ()
14138{
14139
14140 unsigned int fpcr;
14141 __asm__ __volatile__ ("fmove.l %%fpcr,%0" : "=g" (fpcr));
14142 __asm__ __volatile__ ("fmove.l %0,%%fpcr" : : "g" (fpcr));
14143
14144 ;
14145 return 0;
14146}
14147_ACEOF
Stefan Krahe31db2a2015-07-02 20:27:56 +020014148if ac_fn_c_try_link "$LINENO"; then :
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014149 have_gcc_asm_for_mc68881=yes
14150else
14151 have_gcc_asm_for_mc68881=no
14152fi
Stefan Krahe31db2a2015-07-02 20:27:56 +020014153rm -f core conftest.err conftest.$ac_objext \
14154 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8bdeb162014-04-17 00:00:31 -040014155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_mc68881" >&5
14156$as_echo "$have_gcc_asm_for_mc68881" >&6; }
14157if test "$have_gcc_asm_for_mc68881" = yes
14158then
14159
14160$as_echo "#define HAVE_GCC_ASM_FOR_MC68881 1" >>confdefs.h
14161
14162fi
14163
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014164# Detect whether system arithmetic is subject to x87-style double
14165# rounding issues. The result of this test has little meaning on non
14166# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
14167# mode is round-to-nearest and double rounding issues are present, and
14168# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000014169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
14170$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014171# $BASECFLAGS may affect the result
14172ac_save_cc="$CC"
14173CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014174if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014175 ac_cv_x87_double_rounding=no
14176else
Matthias Kloseb9621712010-04-24 17:59:49 +000014177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014178/* end confdefs.h. */
14179
14180#include <stdlib.h>
14181#include <math.h>
14182int main() {
14183 volatile double x, y, z;
14184 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
14185 x = 0.99999999999999989; /* 1-2**-53 */
14186 y = 1./x;
14187 if (y != 1.)
14188 exit(0);
14189 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
14190 x = 1e16;
14191 y = 2.99999;
14192 z = x + y;
14193 if (z != 1e16+4.)
14194 exit(0);
14195 /* both tests show evidence of double rounding */
14196 exit(1);
14197}
14198
14199_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014200if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014201 ac_cv_x87_double_rounding=no
14202else
Matthias Kloseb9621712010-04-24 17:59:49 +000014203 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14206 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014207fi
14208
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014209CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000014210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
14211$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014212if test "$ac_cv_x87_double_rounding" = yes
14213then
14214
Matthias Kloseb9621712010-04-24 17:59:49 +000014215$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014216
14217fi
14218
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000014219# ************************************
14220# * Check for mathematical functions *
14221# ************************************
14222
14223LIBS_SAVE=$LIBS
14224LIBS="$LIBS $LIBM"
14225
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014226for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
14227do :
14228 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14229ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014230if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014231 cat >>confdefs.h <<_ACEOF
14232#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14233_ACEOF
14234
14235fi
14236done
14237
Victor Stinner8f9f8d62011-05-09 12:45:41 +020014238for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014239do :
14240 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14241ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014242if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014243 cat >>confdefs.h <<_ACEOF
14244#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14245_ACEOF
14246
14247fi
14248done
14249
14250ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
14251"
Victor Stinnere0be4232011-10-25 13:06:09 +020014252if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014253 ac_have_decl=1
14254else
14255 ac_have_decl=0
14256fi
14257
14258cat >>confdefs.h <<_ACEOF
14259#define HAVE_DECL_ISINF $ac_have_decl
14260_ACEOF
14261ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
14262"
Victor Stinnere0be4232011-10-25 13:06:09 +020014263if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014264 ac_have_decl=1
14265else
14266 ac_have_decl=0
14267fi
14268
14269cat >>confdefs.h <<_ACEOF
14270#define HAVE_DECL_ISNAN $ac_have_decl
14271_ACEOF
14272ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
14273"
Victor Stinnere0be4232011-10-25 13:06:09 +020014274if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014275 ac_have_decl=1
14276else
14277 ac_have_decl=0
14278fi
14279
14280cat >>confdefs.h <<_ACEOF
14281#define HAVE_DECL_ISFINITE $ac_have_decl
14282_ACEOF
14283
14284
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014285# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
14286# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000014287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
14288$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014289if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014291else
14292
Matthias Kloseb9621712010-04-24 17:59:49 +000014293if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014294 ac_cv_tanh_preserves_zero_sign=no
14295else
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014297/* end confdefs.h. */
14298
14299#include <math.h>
14300#include <stdlib.h>
14301int main() {
14302 /* return 0 if either negative zeros don't exist
14303 on this platform or if negative zeros exist
14304 and tanh(-0.) == -0. */
14305 if (atan2(0., -1.) == atan2(-0., -1.) ||
14306 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
14307 else exit(1);
14308}
14309
14310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014311if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014312 ac_cv_tanh_preserves_zero_sign=yes
14313else
Matthias Kloseb9621712010-04-24 17:59:49 +000014314 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014318fi
14319
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014320fi
14321
Matthias Kloseb9621712010-04-24 17:59:49 +000014322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
14323$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014324if test "$ac_cv_tanh_preserves_zero_sign" = yes
14325then
14326
Matthias Kloseb9621712010-04-24 17:59:49 +000014327$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000014328
14329fi
14330
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014331if test "$ac_cv_func_log1p" = yes
14332then
14333 # On some versions of AIX, log1p(-0.) returns 0. instead of
14334 # -0. See issue #9920.
14335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
14336$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014337 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014338 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014339else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014340
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014341 if test "$cross_compiling" = yes; then :
14342 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014343else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014344 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14345/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014346
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014347 #include <math.h>
14348 #include <stdlib.h>
14349 int main() {
14350 /* Fail if the signs of log1p(-0.) and -0. can be
14351 distinguished. */
14352 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
14353 return 0;
14354 else
14355 return 1;
14356 }
14357
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014358_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014359if ac_fn_c_try_run "$LINENO"; then :
14360 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014361else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014362 ac_cv_log1p_drops_zero_sign=yes
14363fi
14364rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14365 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014366fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014367
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014368fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014369
Mark Dickinsonec0d3552010-11-20 10:29:12 +000014370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
14371$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
14372fi
14373if test "$ac_cv_log1p_drops_zero_sign" = yes
14374then
14375
14376$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
14377
14378fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000014379
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000014380LIBS=$LIBS_SAVE
14381
Mark Dickinsona614f042009-11-28 12:48:43 +000014382# For multiprocessing module, check that sem_open
14383# actually works. For FreeBSD versions <= 7.2,
14384# the kernel module that provides POSIX semaphores
14385# isn't loaded by default, so an attempt to call
14386# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000014387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
14388$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014389if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014390 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000014391else
Matthias Kloseb9621712010-04-24 17:59:49 +000014392 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014393 ac_cv_posix_semaphores_enabled=yes
14394else
Matthias Kloseb9621712010-04-24 17:59:49 +000014395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014396/* end confdefs.h. */
14397
14398#include <unistd.h>
14399#include <fcntl.h>
14400#include <stdio.h>
14401#include <semaphore.h>
14402#include <sys/stat.h>
14403
14404int main(void) {
14405 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
14406 if (a == SEM_FAILED) {
14407 perror("sem_open");
14408 return 1;
14409 }
14410 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014411 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000014412 return 0;
14413}
14414
14415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014416if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000014417 ac_cv_posix_semaphores_enabled=yes
14418else
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000014420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14422 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000014423fi
14424
14425
Mark Dickinsona614f042009-11-28 12:48:43 +000014426fi
14427
Matthias Kloseb9621712010-04-24 17:59:49 +000014428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
14429$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000014430if test $ac_cv_posix_semaphores_enabled = no
14431then
14432
Matthias Kloseb9621712010-04-24 17:59:49 +000014433$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000014434
14435fi
14436
Mark Dickinson10683072009-04-18 21:18:19 +000014437# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000014438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
14439$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014440if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014441 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014442else
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014444 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000014445else
Matthias Kloseb9621712010-04-24 17:59:49 +000014446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000014447/* end confdefs.h. */
14448
14449#include <unistd.h>
14450#include <fcntl.h>
14451#include <stdio.h>
14452#include <semaphore.h>
14453#include <sys/stat.h>
14454
14455int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000014456 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000014457 int count;
14458 int res;
14459 if(a==SEM_FAILED){
14460 perror("sem_open");
14461 return 1;
14462
14463 }
14464 res = sem_getvalue(a, &count);
14465 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000014466 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000014467 return res==-1 ? 1 : 0;
14468}
14469
Mark Dickinson10683072009-04-18 21:18:19 +000014470_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014471if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014472 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000014473else
Matthias Kloseb9621712010-04-24 17:59:49 +000014474 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014475fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014476rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14477 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014478fi
14479
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014480
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014481fi
14482
Matthias Kloseb9621712010-04-24 17:59:49 +000014483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
14484$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014485if test $ac_cv_broken_sem_getvalue = yes
14486then
14487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014489
14490fi
14491
Serhiy Storchakac2f7d872016-05-04 09:44:44 +030014492ac_fn_c_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include <dlfcn.h>
14493"
14494if test "x$ac_cv_have_decl_RTLD_LAZY" = xyes; then :
14495 ac_have_decl=1
14496else
14497 ac_have_decl=0
14498fi
14499
14500cat >>confdefs.h <<_ACEOF
14501#define HAVE_DECL_RTLD_LAZY $ac_have_decl
14502_ACEOF
14503ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
14504"
14505if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
14506 ac_have_decl=1
14507else
14508 ac_have_decl=0
14509fi
14510
14511cat >>confdefs.h <<_ACEOF
14512#define HAVE_DECL_RTLD_NOW $ac_have_decl
14513_ACEOF
14514ac_fn_c_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include <dlfcn.h>
14515"
14516if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes; then :
14517 ac_have_decl=1
14518else
14519 ac_have_decl=0
14520fi
14521
14522cat >>confdefs.h <<_ACEOF
14523#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl
14524_ACEOF
14525ac_fn_c_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include <dlfcn.h>
14526"
14527if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes; then :
14528 ac_have_decl=1
14529else
14530 ac_have_decl=0
14531fi
14532
14533cat >>confdefs.h <<_ACEOF
14534#define HAVE_DECL_RTLD_LOCAL $ac_have_decl
14535_ACEOF
14536ac_fn_c_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include <dlfcn.h>
14537"
14538if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes; then :
14539 ac_have_decl=1
14540else
14541 ac_have_decl=0
14542fi
14543
14544cat >>confdefs.h <<_ACEOF
14545#define HAVE_DECL_RTLD_NODELETE $ac_have_decl
14546_ACEOF
14547ac_fn_c_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include <dlfcn.h>
14548"
14549if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes; then :
14550 ac_have_decl=1
14551else
14552 ac_have_decl=0
14553fi
14554
14555cat >>confdefs.h <<_ACEOF
14556#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl
14557_ACEOF
14558ac_fn_c_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include <dlfcn.h>
14559"
14560if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes; then :
14561 ac_have_decl=1
14562else
14563 ac_have_decl=0
14564fi
14565
14566cat >>confdefs.h <<_ACEOF
14567#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl
14568_ACEOF
14569
14570
Mark Dickinsonbd792642009-03-18 20:06:12 +000014571# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000014572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
14573$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014574# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014575if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000014576 enableval=$enable_big_digits; case $enable_big_digits in
14577yes)
14578 enable_big_digits=30 ;;
14579no)
14580 enable_big_digits=15 ;;
1458115|30)
14582 ;;
14583*)
Victor Stinnere0be4232011-10-25 13:06:09 +020014584 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 +000014585esac
Matthias Kloseb9621712010-04-24 17:59:49 +000014586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
14587$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014588
14589cat >>confdefs.h <<_ACEOF
14590#define PYLONG_BITS_IN_DIGIT $enable_big_digits
14591_ACEOF
14592
14593
14594else
Matthias Kloseb9621712010-04-24 17:59:49 +000014595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14596$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000014597fi
14598
14599
Guido van Rossumef2255b2000-03-10 22:30:29 +000014600# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000014601ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020014602if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014603
14604
Matthias Kloseb9621712010-04-24 17:59:49 +000014605$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014606
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014607 wchar_h="yes"
14608
Guido van Rossumef2255b2000-03-10 22:30:29 +000014609else
Martin v. Löwis11437992002-04-12 09:54:03 +000014610 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000014611
14612fi
14613
Michael W. Hudson54241132001-12-07 15:38:26 +000014614
Martin v. Löwis11437992002-04-12 09:54:03 +000014615
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014616# determine wchar_t size
14617if test "$wchar_h" = yes
14618then
Matthias Kloseb9621712010-04-24 17:59:49 +000014619 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14622# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000014623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
14624$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014625if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014627else
Matthias Kloseb9621712010-04-24 17:59:49 +000014628 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
14629"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014630
Martin v. Löwis11437992002-04-12 09:54:03 +000014631else
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 if test "$ac_cv_type_wchar_t" = yes; then
14633 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14634$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014635as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020014636See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014637 else
14638 ac_cv_sizeof_wchar_t=0
14639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014640fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014641
Martin v. Löwis11437992002-04-12 09:54:03 +000014642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
14644$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645
14646
14647
Martin v. Löwis11437992002-04-12 09:54:03 +000014648cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014649#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014650_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014651
Michael W. Hudson54241132001-12-07 15:38:26 +000014652
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014653fi
14654
Matthias Kloseb9621712010-04-24 17:59:49 +000014655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
14656$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014657have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000014658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014659/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014660
14661#include <tcl.h>
14662#if TCL_UTF_MAX != 6
14663# error "NOT UCS4_TCL"
14664#endif
14665int
14666main ()
14667{
14668
14669 ;
14670 return 0;
14671}
14672_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014673if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014674
14675
Matthias Kloseb9621712010-04-24 17:59:49 +000014676$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014677
14678 have_ucs4_tcl=yes
14679
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014681rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
14683$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000014684
Skip Montanaro6dead952003-09-25 14:50:04 +000014685# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014686if test "$wchar_h" = yes
14687then
14688 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000014689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
14690$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014691 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014692 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014693else
14694
Matthias Kloseb9621712010-04-24 17:59:49 +000014695 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014696 ac_cv_wchar_t_signed=yes
14697else
Matthias Kloseb9621712010-04-24 17:59:49 +000014698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014699/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014700
14701 #include <wchar.h>
14702 int main()
14703 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014704 /* Success: exit code 0 */
14705 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014706 }
14707
14708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014709if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014710 ac_cv_wchar_t_signed=yes
14711else
Matthias Kloseb9621712010-04-24 17:59:49 +000014712 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14715 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014716fi
14717
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000014718fi
14719
Matthias Kloseb9621712010-04-24 17:59:49 +000014720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
14721$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014722fi
14723
Georg Brandl52d168a2008-01-07 18:10:24 +000014724# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014725if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000014726 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000014727then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014728 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014729
Matthias Kloseb9621712010-04-24 17:59:49 +000014730$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000014731
Georg Brandl52d168a2008-01-07 18:10:24 +000014732else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014733 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000014734fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020014735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
14736$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000014737
14738# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000014739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
14740$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014741if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000014743else
Matthias Kloseb9621712010-04-24 17:59:49 +000014744 ac_cv_c_bigendian=unknown
14745 # See if we're dealing with a universal compiler.
14746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14747/* end confdefs.h. */
14748#ifndef __APPLE_CC__
14749 not a universal capable compiler
14750 #endif
14751 typedef int dummy;
14752
Skip Montanaro6dead952003-09-25 14:50:04 +000014753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014754if ac_fn_c_try_compile "$LINENO"; then :
14755
14756 # Check for potential -arch flags. It is not universal unless
14757 # there are at least two -arch flags with different values.
14758 ac_arch=
14759 ac_prev=
14760 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
14761 if test -n "$ac_prev"; then
14762 case $ac_word in
14763 i?86 | x86_64 | ppc | ppc64)
14764 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
14765 ac_arch=$ac_word
14766 else
14767 ac_cv_c_bigendian=universal
14768 break
14769 fi
14770 ;;
14771 esac
14772 ac_prev=
14773 elif test "x$ac_word" = "x-arch"; then
14774 ac_prev=arch
14775 fi
14776 done
14777fi
14778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14779 if test $ac_cv_c_bigendian = unknown; then
14780 # See if sys/param.h defines the BYTE_ORDER macro.
14781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014782/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014783#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014784 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014785
Martin v. Löwis11437992002-04-12 09:54:03 +000014786int
14787main ()
14788{
Matthias Kloseb9621712010-04-24 17:59:49 +000014789#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
14790 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
14791 && LITTLE_ENDIAN)
14792 bogus endian macros
14793 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014794
14795 ;
14796 return 0;
14797}
14798_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014799if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014800 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000014801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014802/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000014803#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000014804 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000014805
Martin v. Löwis11437992002-04-12 09:54:03 +000014806int
14807main ()
14808{
Guido van Rossumef2255b2000-03-10 22:30:29 +000014809#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000014810 not big endian
14811 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014812
14813 ;
14814 return 0;
14815}
14816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014817if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014818 ac_cv_c_bigendian=yes
14819else
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000014821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000014823fi
14824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14825 fi
14826 if test $ac_cv_c_bigendian = unknown; then
14827 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014829/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000014830#include <limits.h>
14831
Martin v. Löwis11437992002-04-12 09:54:03 +000014832int
14833main ()
14834{
Matthias Kloseb9621712010-04-24 17:59:49 +000014835#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14836 bogus endian macros
14837 #endif
14838
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 ;
14840 return 0;
14841}
14842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014843if ac_fn_c_try_compile "$LINENO"; then :
14844 # It does; now see whether it defined to _BIG_ENDIAN or not.
14845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14846/* end confdefs.h. */
14847#include <limits.h>
14848
14849int
14850main ()
14851{
14852#ifndef _BIG_ENDIAN
14853 not big endian
14854 #endif
14855
14856 ;
14857 return 0;
14858}
14859_ACEOF
14860if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014862else
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014864fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14866fi
14867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14868 fi
14869 if test $ac_cv_c_bigendian = unknown; then
14870 # Compile a test program.
14871 if test "$cross_compiling" = yes; then :
14872 # Try to guess by grepping values from an object file.
14873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14874/* end confdefs.h. */
14875short int ascii_mm[] =
14876 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14877 short int ascii_ii[] =
14878 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14879 int use_ascii (int i) {
14880 return ascii_mm[i] + ascii_ii[i];
14881 }
14882 short int ebcdic_ii[] =
14883 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14884 short int ebcdic_mm[] =
14885 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14886 int use_ebcdic (int i) {
14887 return ebcdic_mm[i] + ebcdic_ii[i];
14888 }
14889 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014890
Matthias Kloseb9621712010-04-24 17:59:49 +000014891int
14892main ()
14893{
14894return use_ascii (foo) == use_ebcdic (foo);
14895 ;
14896 return 0;
14897}
14898_ACEOF
14899if ac_fn_c_try_compile "$LINENO"; then :
14900 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
14901 ac_cv_c_bigendian=yes
14902 fi
14903 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
14904 if test "$ac_cv_c_bigendian" = unknown; then
14905 ac_cv_c_bigendian=no
14906 else
14907 # finding both strings is unlikely to happen, but who knows?
14908 ac_cv_c_bigendian=unknown
14909 fi
14910 fi
14911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014913else
Matthias Kloseb9621712010-04-24 17:59:49 +000014914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014915/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014916$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014917int
14918main ()
14919{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014920
Matthias Kloseb9621712010-04-24 17:59:49 +000014921 /* Are we little or big endian? From Harbison&Steele. */
14922 union
14923 {
14924 long int l;
14925 char c[sizeof (long int)];
14926 } u;
14927 u.l = 1;
14928 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014929
14930 ;
14931 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000014932}
Martin v. Löwis11437992002-04-12 09:54:03 +000014933_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014934if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000014935 ac_cv_c_bigendian=no
14936else
Matthias Kloseb9621712010-04-24 17:59:49 +000014937 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000014938fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14940 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000014941fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014942
Matthias Kloseb9621712010-04-24 17:59:49 +000014943 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014944fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14946$as_echo "$ac_cv_c_bigendian" >&6; }
14947 case $ac_cv_c_bigendian in #(
14948 yes)
14949 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14950;; #(
14951 no)
14952 ;; #(
14953 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000014954
Matthias Kloseb9621712010-04-24 17:59:49 +000014955$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014956
Matthias Kloseb9621712010-04-24 17:59:49 +000014957 ;; #(
14958 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014959 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020014960 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000014961 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000014962
Michael W. Hudson54241132001-12-07 15:38:26 +000014963
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014964# ABI version string for Python extension modules. This appears between the
14965# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
14966# from the following attributes which affect the ABI of this Python build (in
14967# this order):
14968#
14969# * The Python implementation (always 'cpython-' for us)
14970# * The major and minor version numbers
14971# * --with-pydebug (adds a 'd')
14972# * --with-pymalloc (adds a 'm')
14973# * --with-wide-unicode (adds a 'u')
14974#
14975# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000014976# would get a shared library ABI version tag of 'cpython-32dmu' and shared
14977# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014978
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
14980$as_echo_n "checking ABIFLAGS... " >&6; }
14981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
14982$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
14984$as_echo_n "checking SOABI... " >&6; }
doko@ubuntu.comd3899c12015-04-15 20:23:14 +020014985SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}${PLATFORM_TRIPLET:+-$PLATFORM_TRIPLET}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000014986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
14987$as_echo "$SOABI" >&6; }
14988
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014989
14990case $ac_sys_system in
Ned Deily3b812482015-04-15 17:11:47 -070014991 Linux*|GNU*|Darwin)
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070014992 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
14993 *)
14994 EXT_SUFFIX=${SHLIB_SUFFIX};;
14995esac
14996
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000014997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
14998$as_echo_n "checking LDVERSION... " >&6; }
14999LDVERSION='$(VERSION)$(ABIFLAGS)'
15000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
15001$as_echo "$LDVERSION" >&6; }
15002
doko@python.org87421192013-01-26 11:39:31 +010015003
doko@ubuntu.com55532312016-06-14 08:55:19 +020015004if test x$PLATFORM_TRIPLET = x; then
15005 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
15006else
15007 LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
15008fi
doko@python.org87421192013-01-26 11:39:31 +010015009
15010
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015011# Check whether right shifting a negative integer extends the sign bit
15012# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000015013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
15014$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015015if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015016 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000015017else
Martin v. Löwis11437992002-04-12 09:54:03 +000015018
Matthias Kloseb9621712010-04-24 17:59:49 +000015019if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015020 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015021else
Matthias Kloseb9621712010-04-24 17:59:49 +000015022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015023/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015024
15025int main()
15026{
Vladimir Marangozova6180282000-07-12 05:05:06 +000015027 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015028}
15029
Martin v. Löwis11437992002-04-12 09:54:03 +000015030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015031if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000015032 ac_cv_rshift_extends_sign=yes
15033else
Matthias Kloseb9621712010-04-24 17:59:49 +000015034 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000015035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015036rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15037 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000015038fi
15039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040fi
15041
Matthias Kloseb9621712010-04-24 17:59:49 +000015042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
15043$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000015044if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015045then
Martin v. Löwis11437992002-04-12 09:54:03 +000015046
Matthias Kloseb9621712010-04-24 17:59:49 +000015047$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015048
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015049fi
15050
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015051# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000015052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
15053$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015054if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015055 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015056else
Martin v. Löwis11437992002-04-12 09:54:03 +000015057
Matthias Kloseb9621712010-04-24 17:59:49 +000015058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015059/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015060#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015061int
15062main ()
15063{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015064
15065 FILE *f = fopen("/dev/null", "r");
15066 flockfile(f);
15067 getc_unlocked(f);
15068 funlockfile(f);
15069
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 ;
15071 return 0;
15072}
15073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015074if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015075 ac_cv_have_getc_unlocked=yes
15076else
Matthias Kloseb9621712010-04-24 17:59:49 +000015077 ac_cv_have_getc_unlocked=no
15078fi
15079rm -f core conftest.err conftest.$ac_objext \
15080 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015082
Matthias Kloseb9621712010-04-24 17:59:49 +000015083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
15084$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015085if test "$ac_cv_have_getc_unlocked" = yes
15086then
Martin v. Löwis11437992002-04-12 09:54:03 +000015087
Matthias Kloseb9621712010-04-24 17:59:49 +000015088$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000015089
15090fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000015091
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015092# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000015093# save the value of LIBS so we don't actually link Python with readline
15094LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015095
Gregory P. Smith18820942008-09-07 06:24:49 +000015096# On some systems we need to link readline to a termcap compatible
15097# library. NOTE: Keep the precedence of listed libraries synchronised
15098# with setup.py.
15099py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000015100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
15101$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020015102for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000015103 if test -z "$py_libtermcap"; then
15104 READLINE_LIBS="-lreadline"
15105 else
15106 READLINE_LIBS="-lreadline -l$py_libtermcap"
15107 fi
15108 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000015109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015110/* end confdefs.h. */
15111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015112/* Override any GCC internal prototype to avoid an error.
15113 Use char because int might match the return type of a GCC
15114 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015115#ifdef __cplusplus
15116extern "C"
15117#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015118char readline ();
15119int
15120main ()
15121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015122return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015123 ;
15124 return 0;
15125}
15126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015127if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000015128 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015130rm -f core conftest.err conftest.$ac_objext \
15131 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000015132 if test $py_cv_lib_readline = yes; then
15133 break
15134 fi
15135done
15136# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
15137#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000015138if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
15140$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015141else
Matthias Kloseb9621712010-04-24 17:59:49 +000015142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
15143$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000015144
Matthias Kloseb9621712010-04-24 17:59:49 +000015145$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015146
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000015147fi
15148
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015149# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000015150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
15151$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015152if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015153 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015154else
15155 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015156LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015158/* end confdefs.h. */
15159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015160/* Override any GCC internal prototype to avoid an error.
15161 Use char because int might match the return type of a GCC
15162 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015163#ifdef __cplusplus
15164extern "C"
15165#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015166char rl_callback_handler_install ();
15167int
15168main ()
15169{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015170return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015171 ;
15172 return 0;
15173}
15174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015175if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015176 ac_cv_lib_readline_rl_callback_handler_install=yes
15177else
Matthias Kloseb9621712010-04-24 17:59:49 +000015178 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015180rm -f core conftest.err conftest.$ac_objext \
15181 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015182LIBS=$ac_check_lib_save_LIBS
15183fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
15185$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015186if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015187
Matthias Kloseb9621712010-04-24 17:59:49 +000015188$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015189
15190fi
15191
15192
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015193# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015195/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015196#include <readline/readline.h>
15197_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015198if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015199 have_readline=yes
15200else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015201 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015202
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015203fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015204rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015205if test $have_readline = yes
15206then
Matthias Kloseb9621712010-04-24 17:59:49 +000015207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015208/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015209#include <readline/readline.h>
15210
15211_ACEOF
15212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015213 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015214
Matthias Kloseb9621712010-04-24 17:59:49 +000015215$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015216
15217fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015218rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015219
Matthias Kloseb9621712010-04-24 17:59:49 +000015220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000015221/* end confdefs.h. */
15222#include <readline/readline.h>
15223
15224_ACEOF
15225if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000015227
Matthias Kloseb9621712010-04-24 17:59:49 +000015228$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000015229
15230fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015231rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000015232
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000015233fi
15234
Martin v. Löwis0daad592001-09-30 21:09:59 +000015235# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
15237$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015238if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015239 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000015240else
Martin v. Löwis11437992002-04-12 09:54:03 +000015241 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015242LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015243cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015244/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015246/* Override any GCC internal prototype to avoid an error.
15247 Use char because int might match the return type of a GCC
15248 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015249#ifdef __cplusplus
15250extern "C"
15251#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015252char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015253int
15254main ()
15255{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015256return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 ;
15258 return 0;
15259}
15260_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015261if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015262 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000015263else
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000015265fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015266rm -f core conftest.err conftest.$ac_objext \
15267 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015268LIBS=$ac_check_lib_save_LIBS
15269fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
15271$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015272if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015273
Matthias Kloseb9621712010-04-24 17:59:49 +000015274$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000015275
Martin v. Löwis0daad592001-09-30 21:09:59 +000015276fi
15277
Michael W. Hudson54241132001-12-07 15:38:26 +000015278
Thomas Wouters89d996e2007-09-08 17:39:28 +000015279# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000015280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
15281$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015282if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015283 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000015284else
15285 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015286LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015287cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015288/* end confdefs.h. */
15289
15290/* Override any GCC internal prototype to avoid an error.
15291 Use char because int might match the return type of a GCC
15292 builtin and then its argument prototype would still apply. */
15293#ifdef __cplusplus
15294extern "C"
15295#endif
15296char rl_completion_display_matches_hook ();
15297int
15298main ()
15299{
15300return rl_completion_display_matches_hook ();
15301 ;
15302 return 0;
15303}
15304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015305if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015306 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
15307else
Matthias Kloseb9621712010-04-24 17:59:49 +000015308 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000015309fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015310rm -f core conftest.err conftest.$ac_objext \
15311 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000015312LIBS=$ac_check_lib_save_LIBS
15313fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
15315$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015316if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000015317
Matthias Kloseb9621712010-04-24 17:59:49 +000015318$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000015319
15320fi
15321
15322
Martin Panter5dbbf1a2016-04-03 02:54:58 +000015323# also in 4.0, but not in editline
15324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
15325$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
15326if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
15327 $as_echo_n "(cached) " >&6
15328else
15329 ac_check_lib_save_LIBS=$LIBS
15330LIBS="-lreadline $READLINE_LIBS $LIBS"
15331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15332/* end confdefs.h. */
15333
15334/* Override any GCC internal prototype to avoid an error.
15335 Use char because int might match the return type of a GCC
15336 builtin and then its argument prototype would still apply. */
15337#ifdef __cplusplus
15338extern "C"
15339#endif
15340char rl_resize_terminal ();
15341int
15342main ()
15343{
15344return rl_resize_terminal ();
15345 ;
15346 return 0;
15347}
15348_ACEOF
15349if ac_fn_c_try_link "$LINENO"; then :
15350 ac_cv_lib_readline_rl_resize_terminal=yes
15351else
15352 ac_cv_lib_readline_rl_resize_terminal=no
15353fi
15354rm -f core conftest.err conftest.$ac_objext \
15355 conftest$ac_exeext conftest.$ac_ext
15356LIBS=$ac_check_lib_save_LIBS
15357fi
15358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
15359$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
15360if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
15361
15362$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
15363
15364fi
15365
15366
Martin v. Löwis0daad592001-09-30 21:09:59 +000015367# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
15369$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015370if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015371 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000015372else
Martin v. Löwis11437992002-04-12 09:54:03 +000015373 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000015374LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015375cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015376/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015378/* Override any GCC internal prototype to avoid an error.
15379 Use char because int might match the return type of a GCC
15380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015381#ifdef __cplusplus
15382extern "C"
15383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015384char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015385int
15386main ()
15387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015388return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015389 ;
15390 return 0;
15391}
15392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015393if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015394 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000015395else
Matthias Kloseb9621712010-04-24 17:59:49 +000015396 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000015397fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015398rm -f core conftest.err conftest.$ac_objext \
15399 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015400LIBS=$ac_check_lib_save_LIBS
15401fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
15403$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015404if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000015405
Matthias Kloseb9621712010-04-24 17:59:49 +000015406$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000015407
Guido van Rossum353ae582001-07-10 16:45:32 +000015408fi
15409
Jack Jansendd19cf82001-12-06 22:36:17 +000015410
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015411# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000015412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015413/* end confdefs.h. */
15414#include <readline/readline.h>
15415_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015416if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015417 have_readline=yes
15418else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015419 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000015420
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015421fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015422rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015423if test $have_readline = yes
15424then
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015426/* end confdefs.h. */
15427#include <readline/readline.h>
15428
15429_ACEOF
15430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000015431 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015432
Matthias Kloseb9621712010-04-24 17:59:49 +000015433$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015434
15435fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000015436rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015437
15438fi
15439
Benjamin Petersond1e22ba2014-11-26 14:35:12 -060015440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for append_history in -lreadline" >&5
15441$as_echo_n "checking for append_history in -lreadline... " >&6; }
15442if ${ac_cv_lib_readline_append_history+:} false; then :
15443 $as_echo_n "(cached) " >&6
15444else
15445 ac_check_lib_save_LIBS=$LIBS
15446LIBS="-lreadline $READLINE_LIBS $LIBS"
15447cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15448/* end confdefs.h. */
15449
15450/* Override any GCC internal prototype to avoid an error.
15451 Use char because int might match the return type of a GCC
15452 builtin and then its argument prototype would still apply. */
15453#ifdef __cplusplus
15454extern "C"
15455#endif
15456char append_history ();
15457int
15458main ()
15459{
15460return append_history ();
15461 ;
15462 return 0;
15463}
15464_ACEOF
15465if ac_fn_c_try_link "$LINENO"; then :
15466 ac_cv_lib_readline_append_history=yes
15467else
15468 ac_cv_lib_readline_append_history=no
15469fi
15470rm -f core conftest.err conftest.$ac_objext \
15471 conftest$ac_exeext conftest.$ac_ext
15472LIBS=$ac_check_lib_save_LIBS
15473fi
15474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_append_history" >&5
15475$as_echo "$ac_cv_lib_readline_append_history" >&6; }
15476if test "x$ac_cv_lib_readline_append_history" = xyes; then :
15477
15478$as_echo "#define HAVE_RL_APPEND_HISTORY 1" >>confdefs.h
15479
15480fi
15481
15482
Martin v. Löwis82bca632006-02-10 20:49:30 +000015483# End of readline checks: restore LIBS
15484LIBS=$LIBS_no_readline
15485
Matthias Kloseb9621712010-04-24 17:59:49 +000015486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
15487$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015488if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015489 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015490else
Martin v. Löwis11437992002-04-12 09:54:03 +000015491
Matthias Kloseb9621712010-04-24 17:59:49 +000015492if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000015493 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015494else
Matthias Kloseb9621712010-04-24 17:59:49 +000015495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015496/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015497
15498int main()
15499{
15500 int val1 = nice(1);
15501 if (val1 != -1 && val1 == nice(2))
15502 exit(0);
15503 exit(1);
15504}
15505
Martin v. Löwis11437992002-04-12 09:54:03 +000015506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015507if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015508 ac_cv_broken_nice=yes
15509else
Matthias Kloseb9621712010-04-24 17:59:49 +000015510 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015511fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15513 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015514fi
15515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015516fi
15517
Matthias Kloseb9621712010-04-24 17:59:49 +000015518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
15519$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015520if test "$ac_cv_broken_nice" = yes
15521then
Martin v. Löwis11437992002-04-12 09:54:03 +000015522
Matthias Kloseb9621712010-04-24 17:59:49 +000015523$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000015524
15525fi
15526
Matthias Kloseb9621712010-04-24 17:59:49 +000015527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
15528$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015529if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015531else
Matthias Kloseb9621712010-04-24 17:59:49 +000015532 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015533 ac_cv_broken_poll=no
15534else
Matthias Kloseb9621712010-04-24 17:59:49 +000015535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015536/* end confdefs.h. */
15537
15538#include <poll.h>
15539
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015540int main()
15541{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015542 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015543 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015544
15545 close (42);
15546
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015547 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015548 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015549 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015550 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015551 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015552 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015553 return 1;
15554}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015555
15556_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015557if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015558 ac_cv_broken_poll=yes
15559else
Matthias Kloseb9621712010-04-24 17:59:49 +000015560 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15563 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015564fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000015566fi
15567
Matthias Kloseb9621712010-04-24 17:59:49 +000015568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
15569$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015570if test "$ac_cv_broken_poll" = yes
15571then
15572
Matthias Kloseb9621712010-04-24 17:59:49 +000015573$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015574
15575fi
15576
Brett Cannon43802422005-02-10 20:48:03 +000015577# 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 +000015578# (which is not required by ISO C or UNIX spec) and/or if we support
15579# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000015580ac_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 +000015581#include <$ac_cv_struct_tm>
15582
Matthias Kloseb9621712010-04-24 17:59:49 +000015583"
Victor Stinnere0be4232011-10-25 13:06:09 +020015584if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000015585
15586cat >>confdefs.h <<_ACEOF
15587#define HAVE_STRUCT_TM_TM_ZONE 1
15588_ACEOF
15589
15590
15591fi
15592
15593if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
15594
Matthias Kloseb9621712010-04-24 17:59:49 +000015595$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015596
15597else
Matthias Kloseb9621712010-04-24 17:59:49 +000015598 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
15599"
Victor Stinnere0be4232011-10-25 13:06:09 +020015600if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015601 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602else
Matthias Kloseb9621712010-04-24 17:59:49 +000015603 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015604fi
15605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015606cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015607#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015608_ACEOF
15609
Matthias Kloseb9621712010-04-24 17:59:49 +000015610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
15611$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015612if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015614else
Matthias Kloseb9621712010-04-24 17:59:49 +000015615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015616/* end confdefs.h. */
15617#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618#if !HAVE_DECL_TZNAME
15619extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000015620#endif
15621
15622int
15623main ()
15624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015625return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000015626 ;
15627 return 0;
15628}
15629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015630if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000015631 ac_cv_var_tzname=yes
15632else
Matthias Kloseb9621712010-04-24 17:59:49 +000015633 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000015634fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015635rm -f core conftest.err conftest.$ac_objext \
15636 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000015637fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
15639$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000015640 if test $ac_cv_var_tzname = yes; then
15641
Matthias Kloseb9621712010-04-24 17:59:49 +000015642$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000015643
15644 fi
15645fi
15646
Nicholas Bastine62c5c82004-03-21 23:45:42 +000015647
Martin v. Löwis1d459062005-03-14 21:23:33 +000015648# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000015649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
15650$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015651if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015652 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015653else
15654
Matthias Kloseb9621712010-04-24 17:59:49 +000015655if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015656 ac_cv_working_tzset=no
15657else
Matthias Kloseb9621712010-04-24 17:59:49 +000015658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015659/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015660
15661#include <stdlib.h>
15662#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000015663#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000015664
15665#if HAVE_TZNAME
15666extern char *tzname[];
15667#endif
15668
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015669int main()
15670{
Brett Cannon18367812003-09-19 00:59:16 +000015671 /* Note that we need to ensure that not only does tzset(3)
15672 do 'something' with localtime, but it works as documented
15673 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000015674 This includes making sure that tzname is set properly if
15675 tm->tm_zone does not exist since it is the alternative way
15676 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000015677
15678 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000015679 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000015680 */
15681
Martin v. Löwis1d459062005-03-14 21:23:33 +000015682 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000015683 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
15684
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015685 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015686 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015687 if (localtime(&groundhogday)->tm_hour != 0)
15688 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015689#if HAVE_TZNAME
15690 /* For UTC, tzname[1] is sometimes "", sometimes " " */
15691 if (strcmp(tzname[0], "UTC") ||
15692 (tzname[1][0] != 0 && tzname[1][0] != ' '))
15693 exit(1);
15694#endif
Brett Cannon18367812003-09-19 00:59:16 +000015695
Neal Norwitz7f2588c2003-04-11 15:35:53 +000015696 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015697 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000015698 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015699 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015700#if HAVE_TZNAME
15701 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
15702 exit(1);
15703#endif
Brett Cannon18367812003-09-19 00:59:16 +000015704
15705 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
15706 tzset();
15707 if (localtime(&groundhogday)->tm_hour != 11)
15708 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015709#if HAVE_TZNAME
15710 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
15711 exit(1);
15712#endif
15713
15714#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000015715 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
15716 exit(1);
15717 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
15718 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000015719#endif
Brett Cannon18367812003-09-19 00:59:16 +000015720
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015721 exit(0);
15722}
15723
15724_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015725if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015726 ac_cv_working_tzset=yes
15727else
Matthias Kloseb9621712010-04-24 17:59:49 +000015728 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015730rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15731 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015732fi
15733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734fi
15735
Matthias Kloseb9621712010-04-24 17:59:49 +000015736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
15737$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015738if test "$ac_cv_working_tzset" = yes
15739then
15740
Matthias Kloseb9621712010-04-24 17:59:49 +000015741$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000015742
15743fi
15744
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015745# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
15747$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015748if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015749 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015750else
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015752/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015753#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015754int
15755main ()
15756{
15757
15758struct stat st;
15759st.st_mtim.tv_nsec = 1;
15760
15761 ;
15762 return 0;
15763}
15764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015765if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000015766 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015767else
Matthias Kloseb9621712010-04-24 17:59:49 +000015768 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015769fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15771fi
15772
Matthias Kloseb9621712010-04-24 17:59:49 +000015773{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
15774$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015775if test "$ac_cv_stat_tv_nsec" = yes
15776then
15777
Matthias Kloseb9621712010-04-24 17:59:49 +000015778$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000015779
15780fi
15781
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015782# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000015783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
15784$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015785if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015786 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015787else
Matthias Kloseb9621712010-04-24 17:59:49 +000015788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015789/* end confdefs.h. */
15790#include <sys/stat.h>
15791int
15792main ()
15793{
15794
15795struct stat st;
15796st.st_mtimespec.tv_nsec = 1;
15797
15798 ;
15799 return 0;
15800}
15801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015802if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015803 ac_cv_stat_tv_nsec2=yes
15804else
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015806fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15808fi
15809
Matthias Kloseb9621712010-04-24 17:59:49 +000015810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
15811$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015812if test "$ac_cv_stat_tv_nsec2" = yes
15813then
15814
Matthias Kloseb9621712010-04-24 17:59:49 +000015815$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000015816
15817fi
15818
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015819# first curses header check
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020015820ac_save_cppflags="$CPPFLAGS"
Xavier de Gayee13c3202016-12-13 16:04:14 +010015821if test "$cross_compiling" = no; then
15822 CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
15823fi
doko@ubuntu.com1a4f5612014-04-17 20:13:44 +020015824
15825for ac_header in curses.h ncurses.h
15826do :
15827 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
15828ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
15829if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
15830 cat >>confdefs.h <<_ACEOF
15831#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
15832_ACEOF
15833
15834fi
15835
15836done
15837
15838
15839# On Solaris, term.h requires curses.h
15840for ac_header in term.h
15841do :
15842 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
15843#ifdef HAVE_CURSES_H
15844#include <curses.h>
15845#endif
15846
15847"
15848if test "x$ac_cv_header_term_h" = xyes; then :
15849 cat >>confdefs.h <<_ACEOF
15850#define HAVE_TERM_H 1
15851_ACEOF
15852
15853fi
15854
15855done
15856
15857
Jack Jansen666b1e72001-10-31 12:11:48 +000015858# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000015859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
15860$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015861if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015862 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015863else
Matthias Kloseb9621712010-04-24 17:59:49 +000015864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015865/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015866#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015867int
15868main ()
15869{
Jack Jansen666b1e72001-10-31 12:11:48 +000015870
15871 int rtn;
15872 rtn = mvwdelch(0,0,0);
15873
Martin v. Löwis11437992002-04-12 09:54:03 +000015874 ;
15875 return 0;
15876}
15877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015878if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015879 ac_cv_mvwdelch_is_expression=yes
15880else
Matthias Kloseb9621712010-04-24 17:59:49 +000015881 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15884fi
15885
Matthias Kloseb9621712010-04-24 17:59:49 +000015886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
15887$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000015888
15889if test "$ac_cv_mvwdelch_is_expression" = yes
15890then
Martin v. Löwis11437992002-04-12 09:54:03 +000015891
Matthias Kloseb9621712010-04-24 17:59:49 +000015892$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015893
15894fi
15895
Matthias Kloseb9621712010-04-24 17:59:49 +000015896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
15897$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020015898if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000015899 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000015900else
Matthias Kloseb9621712010-04-24 17:59:49 +000015901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015902/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000015903#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015904int
15905main ()
15906{
Jack Jansen666b1e72001-10-31 12:11:48 +000015907
15908 WINDOW *w;
15909 w->_flags = 0;
15910
Martin v. Löwis11437992002-04-12 09:54:03 +000015911 ;
15912 return 0;
15913}
15914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015915if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000015916 ac_cv_window_has_flags=yes
15917else
Matthias Kloseb9621712010-04-24 17:59:49 +000015918 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000015919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015920rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15921fi
15922
Matthias Kloseb9621712010-04-24 17:59:49 +000015923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
15924$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000015925
Jack Jansen666b1e72001-10-31 12:11:48 +000015926
15927if test "$ac_cv_window_has_flags" = yes
15928then
Martin v. Löwis11437992002-04-12 09:54:03 +000015929
Matthias Kloseb9621712010-04-24 17:59:49 +000015930$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000015931
15932fi
15933
Matthias Kloseb9621712010-04-24 17:59:49 +000015934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
15935$as_echo_n "checking for is_term_resized... " >&6; }
15936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015937/* end confdefs.h. */
15938#include <curses.h>
15939int
15940main ()
15941{
15942void *x=is_term_resized
15943 ;
15944 return 0;
15945}
15946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015947if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000015948
Matthias Kloseb9621712010-04-24 17:59:49 +000015949$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015950
Matthias Kloseb159a552010-04-25 21:00:44 +000015951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015952$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015953else
Matthias Kloseb9621712010-04-24 17:59:49 +000015954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15955$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015956
15957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15959
Matthias Kloseb9621712010-04-24 17:59:49 +000015960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
15961$as_echo_n "checking for resize_term... " >&6; }
15962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015963/* end confdefs.h. */
15964#include <curses.h>
15965int
15966main ()
15967{
15968void *x=resize_term
15969 ;
15970 return 0;
15971}
15972_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015973if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015974
Matthias Kloseb9621712010-04-24 17:59:49 +000015975$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015976
Matthias Kloseb159a552010-04-25 21:00:44 +000015977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000015978$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015979else
Matthias Kloseb9621712010-04-24 17:59:49 +000015980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15981$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015982
15983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15985
Matthias Kloseb9621712010-04-24 17:59:49 +000015986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
15987$as_echo_n "checking for resizeterm... " >&6; }
15988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015989/* end confdefs.h. */
15990#include <curses.h>
15991int
15992main ()
15993{
15994void *x=resizeterm
15995 ;
15996 return 0;
15997}
15998_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015999if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016000
Matthias Kloseb9621712010-04-24 17:59:49 +000016001$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016002
Matthias Kloseb159a552010-04-25 21:00:44 +000016003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016004$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016005else
Matthias Kloseb9621712010-04-24 17:59:49 +000016006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16007$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000016008
16009fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020016011# last curses configure check
16012CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016013
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
16015$as_echo "$as_me: checking for device files" >&6;}
16016
16017if test "x$cross_compiling" = xyes; then
16018 if test "${ac_cv_file__dev_ptmx+set}" != set; then
16019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16020$as_echo_n "checking for /dev/ptmx... " >&6; }
16021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16022$as_echo "not set" >&6; }
16023 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16024 fi
16025 if test "${ac_cv_file__dev_ptc+set}" != set; then
16026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16027$as_echo_n "checking for /dev/ptc... " >&6; }
16028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
16029$as_echo "not set" >&6; }
16030 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
16031 fi
16032fi
16033
Matthias Kloseb9621712010-04-24 17:59:49 +000016034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
16035$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016036if ${ac_cv_file__dev_ptmx+:} false; then :
16037 $as_echo_n "(cached) " >&6
16038else
16039 test "$cross_compiling" = yes &&
16040 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16041if test -r "/dev/ptmx"; then
16042 ac_cv_file__dev_ptmx=yes
16043else
16044 ac_cv_file__dev_ptmx=no
16045fi
16046fi
16047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
16048$as_echo "$ac_cv_file__dev_ptmx" >&6; }
16049if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016050
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016051fi
16052
16053if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016054
Matthias Kloseb9621712010-04-24 17:59:49 +000016055$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016056
Martin v. Löwis24a880b2002-12-31 12:55:15 +000016057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
16059$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016060if ${ac_cv_file__dev_ptc+:} false; then :
16061 $as_echo_n "(cached) " >&6
16062else
16063 test "$cross_compiling" = yes &&
16064 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16065if test -r "/dev/ptc"; then
16066 ac_cv_file__dev_ptc=yes
16067else
16068 ac_cv_file__dev_ptc=no
16069fi
16070fi
16071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
16072$as_echo "$ac_cv_file__dev_ptc" >&6; }
16073if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000016074
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020016075fi
16076
16077if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000016078
Matthias Kloseb9621712010-04-24 17:59:49 +000016079$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000016080
Neal Norwitz865400f2003-03-21 01:42:58 +000016081fi
16082
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000016083if test $ac_sys_system = Darwin
16084then
16085 LIBS="$LIBS -framework CoreFoundation"
16086fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000016087
Matthias Kloseb9621712010-04-24 17:59:49 +000016088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
16089$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016090if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016091 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016092else
Matthias Kloseb9621712010-04-24 17:59:49 +000016093 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016094 ac_cv_have_size_t_format="cross -- assuming yes"
16095
Thomas Wouters477c8d52006-05-27 19:21:47 +000016096else
Matthias Kloseb9621712010-04-24 17:59:49 +000016097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000016098/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016099
Thomas Wouters477c8d52006-05-27 19:21:47 +000016100#include <stdio.h>
16101#include <stddef.h>
16102#include <string.h>
16103
Christian Heimes2c181612007-12-17 20:04:13 +000016104#ifdef HAVE_SYS_TYPES_H
16105#include <sys/types.h>
16106#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000016107
16108#ifdef HAVE_SSIZE_T
16109typedef ssize_t Py_ssize_t;
16110#elif SIZEOF_VOID_P == SIZEOF_LONG
16111typedef long Py_ssize_t;
16112#else
16113typedef int Py_ssize_t;
16114#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000016115
Christian Heimes2c181612007-12-17 20:04:13 +000016116int main()
16117{
16118 char buffer[256];
16119
Thomas Wouters477c8d52006-05-27 19:21:47 +000016120 if(sprintf(buffer, "%zd", (size_t)123) < 0)
16121 return 1;
16122
Thomas Wouters89f507f2006-12-13 04:49:30 +000016123 if (strcmp(buffer, "123"))
16124 return 1;
16125
16126 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
16127 return 1;
16128
16129 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000016130 return 1;
16131
16132 return 0;
16133}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016134
Thomas Wouters477c8d52006-05-27 19:21:47 +000016135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016136if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016137 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016138else
Matthias Kloseb9621712010-04-24 17:59:49 +000016139 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000016140fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016141rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16142 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016143fi
16144
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
16147$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000016148if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016149
Matthias Kloseb9621712010-04-24 17:59:49 +000016150$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016151
16152fi
16153
Matthias Kloseb9621712010-04-24 17:59:49 +000016154ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000016155#ifdef HAVE_SYS_TYPES_H
16156#include <sys/types.h>
16157#endif
16158#ifdef HAVE_SYS_SOCKET_H
16159#include <sys/socket.h>
16160#endif
16161
Matthias Kloseb9621712010-04-24 17:59:49 +000016162"
Victor Stinnere0be4232011-10-25 13:06:09 +020016163if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000016164
Martin v. Löwis11437992002-04-12 09:54:03 +000016165else
Guido van Rossum95713eb2000-05-18 20:53:31 +000016166
Matthias Kloseb9621712010-04-24 17:59:49 +000016167$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000016168
16169fi
16170
Michael W. Hudson54241132001-12-07 15:38:26 +000016171
Matthias Kloseb9621712010-04-24 17:59:49 +000016172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
16173$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020016174if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000016175 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016176else
Matthias Kloseb9621712010-04-24 17:59:49 +000016177 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016178 ac_cv_broken_mbstowcs=no
16179else
Matthias Kloseb9621712010-04-24 17:59:49 +000016180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016181/* end confdefs.h. */
16182
Stefan Krah19c21392012-11-22 23:47:32 +010016183#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000016184#include<stdlib.h>
16185int main() {
16186 size_t len = -1;
16187 const char *str = "text";
16188 len = mbstowcs(NULL, str, 0);
16189 return (len != 4);
16190}
16191
16192_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016193if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000016194 ac_cv_broken_mbstowcs=no
16195else
Matthias Kloseb9621712010-04-24 17:59:49 +000016196 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000016197fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16199 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000016200fi
16201
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000016202fi
16203
Matthias Kloseb9621712010-04-24 17:59:49 +000016204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
16205$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000016206if test "$ac_cv_broken_mbstowcs" = yes
16207then
16208
Matthias Kloseb9621712010-04-24 17:59:49 +000016209$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000016210
16211fi
16212
Antoine Pitroub52ec782009-01-25 16:34:23 +000016213# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000016214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
16215$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016216
16217# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000016218if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000016219 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000016220if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000016221then
16222
Matthias Kloseb9621712010-04-24 17:59:49 +000016223$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000016224
Matthias Kloseb9621712010-04-24 17:59:49 +000016225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16226$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016227fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000016228if test "$withval" = no
16229then
16230
16231$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
16232
Matthias Kloseb9621712010-04-24 17:59:49 +000016233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16234$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000016235fi
16236
Antoine Pitrou042b1282010-08-13 21:15:58 +000016237else
16238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
16239$as_echo "no value specified" >&6; }
16240fi
16241
Antoine Pitroub52ec782009-01-25 16:34:23 +000016242
Matthias Kloseb17289e2012-03-15 19:51:34 +010016243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
16244$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
16245if ${ac_cv_computed_gotos+:} false; then :
16246 $as_echo_n "(cached) " >&6
16247else
16248 if test "$cross_compiling" = yes; then :
16249 if test "${with_computed_gotos+set}" = set; then
16250 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
16251 else
16252 ac_cv_computed_gotos=no
16253 fi
16254else
16255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16256/* end confdefs.h. */
16257
16258int main(int argc, char **argv)
16259{
16260 static void *targets[1] = { &&LABEL1 };
16261 goto LABEL2;
16262LABEL1:
16263 return 0;
16264LABEL2:
16265 goto *targets[0];
16266 return 1;
16267}
16268
16269_ACEOF
16270if ac_fn_c_try_run "$LINENO"; then :
16271 ac_cv_computed_gotos=yes
16272else
16273 ac_cv_computed_gotos=no
16274fi
16275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16276 conftest.$ac_objext conftest.beam conftest.$ac_ext
16277fi
16278
16279fi
16280
16281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
16282$as_echo "$ac_cv_computed_gotos" >&6; }
16283case "$ac_cv_computed_gotos" in yes*)
16284
16285$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
16286
16287esac
16288
Benjamin Petersond8d835b2010-10-15 23:14:46 +000016289case $ac_sys_system in
16290AIX*)
16291
16292$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
16293 ;;
16294esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016295
Michael W. Hudson54241132001-12-07 15:38:26 +000016296
Mark Dickinsonb2153e92010-05-05 22:31:36 +000016297
16298
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000016299for h in `(cd $srcdir;echo Python/thread_*.h)`
16300do
16301 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
16302done
16303
Michael W. Hudson54241132001-12-07 15:38:26 +000016304
Alex Dzyoba8a543c02017-03-24 11:23:43 +030016305SRCDIRS="Parser Objects Python Modules Programs"
Matthias Kloseb9621712010-04-24 17:59:49 +000016306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
16307$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016308for dir in $SRCDIRS; do
16309 if test ! -d $dir; then
16310 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000016311 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000016312done
Matthias Kloseb9621712010-04-24 17:59:49 +000016313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
16314$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000016315
Stefan Krah1919b7e2012-03-21 18:25:23 +010016316# Availability of -O2:
16317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
16318$as_echo_n "checking for -O2... " >&6; }
16319saved_cflags="$CFLAGS"
16320CFLAGS="-O2"
16321cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16322/* end confdefs.h. */
16323
16324int
16325main ()
16326{
16327
16328
16329 ;
16330 return 0;
16331}
16332_ACEOF
16333if ac_fn_c_try_compile "$LINENO"; then :
16334 have_O2=yes
16335else
16336 have_O2=no
16337fi
16338rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
16340$as_echo "$have_O2" >&6; }
16341CFLAGS="$saved_cflags"
16342
16343# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
16344# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
16345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
16346$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
16347saved_cflags="$CFLAGS"
16348CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
16349if test "$have_O2" = no; then
16350 CFLAGS=""
16351fi
16352if test "$cross_compiling" = yes; then :
16353 have_glibc_memmove_bug=undefined
16354else
16355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16356/* end confdefs.h. */
16357
16358#include <stdio.h>
16359#include <stdlib.h>
16360#include <string.h>
16361void foo(void *p, void *q) { memmove(p, q, 19); }
16362int main() {
16363 char a[32] = "123456789000000000";
16364 foo(&a[9], a);
16365 if (strcmp(a, "123456789123456789000000000") != 0)
16366 return 1;
16367 foo(a, &a[9]);
16368 if (strcmp(a, "123456789000000000") != 0)
16369 return 1;
16370 return 0;
16371}
16372
16373_ACEOF
16374if ac_fn_c_try_run "$LINENO"; then :
16375 have_glibc_memmove_bug=no
16376else
16377 have_glibc_memmove_bug=yes
16378fi
16379rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16380 conftest.$ac_objext conftest.beam conftest.$ac_ext
16381fi
16382
16383CFLAGS="$saved_cflags"
16384{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
16385$as_echo "$have_glibc_memmove_bug" >&6; }
16386if test "$have_glibc_memmove_bug" = yes; then
16387
16388$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
16389
16390fi
16391
16392if test "$have_gcc_asm_for_x87" = yes; then
16393 # Some versions of gcc miscompile inline asm:
16394 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
16395 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
16396 case $CC in
16397 *gcc*)
16398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
16399$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
16400 saved_cflags="$CFLAGS"
16401 CFLAGS="-O2"
16402 if test "$cross_compiling" = yes; then :
16403 have_ipa_pure_const_bug=undefined
16404else
16405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16406/* end confdefs.h. */
16407
16408 __attribute__((noinline)) int
16409 foo(int *p) {
16410 int r;
16411 asm ( "movl \$6, (%1)\n\t"
16412 "xorl %0, %0\n\t"
16413 : "=r" (r) : "r" (p) : "memory"
16414 );
16415 return r;
16416 }
16417 int main() {
16418 int p = 8;
16419 if ((foo(&p) ? : p) != 6)
16420 return 1;
16421 return 0;
16422 }
16423
16424_ACEOF
16425if ac_fn_c_try_run "$LINENO"; then :
16426 have_ipa_pure_const_bug=no
16427else
16428 have_ipa_pure_const_bug=yes
16429fi
16430rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16431 conftest.$ac_objext conftest.beam conftest.$ac_ext
16432fi
16433
16434 CFLAGS="$saved_cflags"
16435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
16436$as_echo "$have_ipa_pure_const_bug" >&6; }
16437 if test "$have_ipa_pure_const_bug" = yes; then
16438
16439$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
16440
16441 fi
16442 ;;
16443 esac
16444fi
16445
Victor Stinner4f5366e2015-01-09 02:13:19 +010016446# Check for stdatomic.h
16447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdatomic.h" >&5
16448$as_echo_n "checking for stdatomic.h... " >&6; }
16449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16450/* end confdefs.h. */
16451
16452
16453 #include <stdatomic.h>
Victor Stinner923e06f2015-01-14 16:01:46 +010016454 atomic_int value = ATOMIC_VAR_INIT(1);
16455 _Atomic void *py_atomic_address = (void*) &value;
Victor Stinner4f5366e2015-01-09 02:13:19 +010016456 int main() {
16457 int loaded_value = atomic_load(&value);
16458 return 0;
16459 }
16460
16461
16462_ACEOF
16463if ac_fn_c_try_link "$LINENO"; then :
16464 have_stdatomic_h=yes
16465else
16466 have_stdatomic_h=no
16467fi
16468rm -f core conftest.err conftest.$ac_objext \
16469 conftest$ac_exeext conftest.$ac_ext
16470
16471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_stdatomic_h" >&5
16472$as_echo "$have_stdatomic_h" >&6; }
16473
16474if test "$have_stdatomic_h" = yes; then
16475
16476$as_echo "#define HAVE_STD_ATOMIC 1" >>confdefs.h
16477
16478fi
16479
16480# Check for GCC >= 4.7 __atomic builtins
16481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC >= 4.7 __atomic builtins" >&5
16482$as_echo_n "checking for GCC >= 4.7 __atomic builtins... " >&6; }
16483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16484/* end confdefs.h. */
16485
16486
16487 volatile int val = 1;
16488 int main() {
16489 __atomic_load_n(&val, __ATOMIC_SEQ_CST);
16490 return 0;
16491 }
16492
16493
16494_ACEOF
16495if ac_fn_c_try_link "$LINENO"; then :
16496 have_builtin_atomic=yes
16497else
16498 have_builtin_atomic=no
16499fi
16500rm -f core conftest.err conftest.$ac_objext \
16501 conftest$ac_exeext conftest.$ac_ext
16502
16503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_builtin_atomic" >&5
16504$as_echo "$have_builtin_atomic" >&6; }
16505
16506if test "$have_builtin_atomic" = yes; then
16507
16508$as_echo "#define HAVE_BUILTIN_ATOMIC 1" >>confdefs.h
16509
16510fi
16511
Ned Deily322f5ba2013-11-21 23:01:59 -080016512# ensurepip option
16513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
16514$as_echo_n "checking for ensurepip... " >&6; }
16515
16516# Check whether --with-ensurepip was given.
16517if test "${with_ensurepip+set}" = set; then :
16518 withval=$with_ensurepip;
16519else
16520 with_ensurepip=upgrade
16521fi
16522
16523case $with_ensurepip in #(
16524 yes|upgrade) :
16525 ENSUREPIP=upgrade ;; #(
16526 install) :
16527 ENSUREPIP=install ;; #(
16528 no) :
16529 ENSUREPIP=no ;; #(
16530 *) :
16531 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
16532esac
16533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
16534$as_echo "$ENSUREPIP" >&6; }
16535
16536
Victor Stinner35a97c02015-03-08 02:59:09 +010016537# check if the dirent structure of a d_type field and DT_UNKNOWN is defined
16538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the dirent structure of a d_type field" >&5
16539$as_echo_n "checking if the dirent structure of a d_type field... " >&6; }
16540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16541/* end confdefs.h. */
16542
16543
16544 #include <dirent.h>
16545
16546 int main() {
16547 struct dirent entry;
16548 return entry.d_type == DT_UNKNOWN;
16549 }
16550
16551
16552_ACEOF
16553if ac_fn_c_try_link "$LINENO"; then :
16554 have_dirent_d_type=yes
16555else
16556 have_dirent_d_type=no
16557fi
16558rm -f core conftest.err conftest.$ac_objext \
16559 conftest$ac_exeext conftest.$ac_ext
16560{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dirent_d_type" >&5
16561$as_echo "$have_dirent_d_type" >&6; }
16562
16563if test "$have_dirent_d_type" = yes; then
16564
16565$as_echo "#define HAVE_DIRENT_D_TYPE 1" >>confdefs.h
16566
16567fi
16568
Victor Stinner9eb57c52015-03-19 22:21:49 +010016569# check if the Linux getrandom() syscall is available
16570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getrandom() syscall" >&5
16571$as_echo_n "checking for the Linux getrandom() syscall... " >&6; }
16572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16573/* end confdefs.h. */
16574
16575
Victor Stinner1b80b242016-04-12 22:34:58 +020016576 #include <unistd.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016577 #include <sys/syscall.h>
Victor Stinnerdddf4842016-06-07 11:21:42 +020016578 #include <linux/random.h>
Victor Stinner9eb57c52015-03-19 22:21:49 +010016579
16580 int main() {
Victor Stinner9eb57c52015-03-19 22:21:49 +010016581 char buffer[1];
Victor Stinner3abf44e2015-09-18 15:38:37 +020016582 const size_t buflen = sizeof(buffer);
Victor Stinnerdddf4842016-06-07 11:21:42 +020016583 const int flags = GRND_NONBLOCK;
16584 /* ignore the result, Python checks for ENOSYS and EAGAIN at runtime */
Victor Stinner3abf44e2015-09-18 15:38:37 +020016585 (void)syscall(SYS_getrandom, buffer, buflen, flags);
Victor Stinner9eb57c52015-03-19 22:21:49 +010016586 return 0;
16587 }
16588
16589
16590_ACEOF
16591if ac_fn_c_try_link "$LINENO"; then :
16592 have_getrandom_syscall=yes
16593else
16594 have_getrandom_syscall=no
16595fi
16596rm -f core conftest.err conftest.$ac_objext \
16597 conftest$ac_exeext conftest.$ac_ext
16598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom_syscall" >&5
16599$as_echo "$have_getrandom_syscall" >&6; }
16600
16601if test "$have_getrandom_syscall" = yes; then
16602
16603$as_echo "#define HAVE_GETRANDOM_SYSCALL 1" >>confdefs.h
16604
16605fi
16606
Victor Stinner3abf44e2015-09-18 15:38:37 +020016607# check if the getrandom() function is available
16608# the test was written for the Solaris function of <sys/random.h>
16609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the getrandom() function" >&5
16610$as_echo_n "checking for the getrandom() function... " >&6; }
16611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16612/* end confdefs.h. */
16613
16614
16615 #include <sys/random.h>
16616
16617 int main() {
16618 char buffer[1];
16619 const size_t buflen = sizeof(buffer);
16620 const int flags = 0;
16621 /* ignore the result, Python checks for ENOSYS at runtime */
16622 (void)getrandom(buffer, buflen, flags);
16623 return 0;
16624 }
16625
16626
16627_ACEOF
16628if ac_fn_c_try_link "$LINENO"; then :
16629 have_getrandom=yes
16630else
16631 have_getrandom=no
16632fi
16633rm -f core conftest.err conftest.$ac_objext \
16634 conftest$ac_exeext conftest.$ac_ext
16635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getrandom" >&5
16636$as_echo "$have_getrandom" >&6; }
16637
16638if test "$have_getrandom" = yes; then
16639
16640$as_echo "#define HAVE_GETRANDOM 1" >>confdefs.h
16641
16642fi
16643
Guido van Rossum627b2d71993-12-24 10:39:16 +000016644# generate output files
doko@python.org87421192013-01-26 11:39:31 +010016645ac_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 +000016646
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016647ac_config_files="$ac_config_files Modules/ld_so_aix"
16648
Martin v. Löwis11437992002-04-12 09:54:03 +000016649cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016650# This file is a shell script that caches the results of configure
16651# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000016652# scripts and configure runs, see configure's option --config-cache.
16653# It is not useful on other systems. If it contains results you don't
16654# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016655#
Martin v. Löwis11437992002-04-12 09:54:03 +000016656# config.status only pays attention to the cache file if you give it
16657# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016658#
Skip Montanaro6dead952003-09-25 14:50:04 +000016659# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000016660# loading this file, other *unset* `ac_cv_foo' will be assigned the
16661# following values.
16662
16663_ACEOF
16664
Guido van Rossumf78abae1997-01-21 22:02:36 +000016665# The following way of writing the cache mishandles newlines in values,
16666# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016667# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016668# Ultrix sh set writes to stderr and can't be redirected directly,
16669# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016670(
16671 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
16672 eval ac_val=\$$ac_var
16673 case $ac_val in #(
16674 *${as_nl}*)
16675 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016676 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
16677$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016678 esac
16679 case $ac_var in #(
16680 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000016681 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16682 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683 esac ;;
16684 esac
16685 done
16686
Martin v. Löwis11437992002-04-12 09:54:03 +000016687 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688 case $as_nl`(ac_space=' '; set) 2>&1` in #(
16689 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000016690 # `set' does not quote correctly, so add quotes: double-quote
16691 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016693 "s/'/'\\\\''/g;
16694 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016695 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000016696 *)
16697 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016698 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000016699 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016700 esac |
16701 sort
16702) |
Martin v. Löwis11437992002-04-12 09:54:03 +000016703 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016704 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000016705 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016706 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000016707 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16708 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16710 :end' >>confcache
16711if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
16712 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016713 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016714 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
16715$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020016716 if test ! -f "$cache_file" || test -h "$cache_file"; then
16717 cat confcache >"$cache_file"
16718 else
16719 case $cache_file in #(
16720 */* | ?:*)
16721 mv -f confcache "$cache_file"$$ &&
16722 mv -f "$cache_file"$$ "$cache_file" ;; #(
16723 *)
16724 mv -f confcache "$cache_file" ;;
16725 esac
16726 fi
16727 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016728 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016729 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
16730$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016731 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016732fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016733rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000016734
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016735test "x$prefix" = xNONE && prefix=$ac_default_prefix
16736# Let make expand exec_prefix.
16737test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000016738
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016739DEFS=-DHAVE_CONFIG_H
16740
Skip Montanaro6dead952003-09-25 14:50:04 +000016741ac_libobjs=
16742ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016743U=
Skip Montanaro6dead952003-09-25 14:50:04 +000016744for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
16745 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016746 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000016747 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016748 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
16749 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000016750 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
16751 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000016752done
16753LIBOBJS=$ac_libobjs
16754
16755LTLIBOBJS=$ac_ltlibobjs
16756
16757
Martin v. Löwis11437992002-04-12 09:54:03 +000016758
Matthias Kloseb9621712010-04-24 17:59:49 +000016759
Victor Stinnere0be4232011-10-25 13:06:09 +020016760: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000016761ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000016762ac_clean_files_save=$ac_clean_files
16763ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000016764{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
16765$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
16766as_write_fail=0
16767cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016768#! $SHELL
16769# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016770# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016771# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000016772# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000016773
Martin v. Löwis11437992002-04-12 09:54:03 +000016774debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000016775ac_cs_recheck=false
16776ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000016777
Matthias Kloseb9621712010-04-24 17:59:49 +000016778SHELL=\${CONFIG_SHELL-$SHELL}
16779export SHELL
16780_ASEOF
16781cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16782## -------------------- ##
16783## M4sh Initialization. ##
16784## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000016785
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016786# Be more Bourne compatible
16787DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000016788if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000016789 emulate sh
16790 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000016791 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000016792 # is contrary to our usage. Disable this feature.
16793 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016794 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016795else
Matthias Kloseb9621712010-04-24 17:59:49 +000016796 case `(set -o) 2>/dev/null` in #(
16797 *posix*) :
16798 set -o posix ;; #(
16799 *) :
16800 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016801esac
Michael W. Hudson54241132001-12-07 15:38:26 +000016802fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000016803
16804
Matthias Kloseb9621712010-04-24 17:59:49 +000016805as_nl='
16806'
16807export as_nl
16808# Printing a long string crashes Solaris 7 /usr/bin/printf.
16809as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
16810as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
16811as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
16812# Prefer a ksh shell builtin over an external printf program on Solaris,
16813# but without wasting forks for bash or zsh.
16814if test -z "$BASH_VERSION$ZSH_VERSION" \
16815 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
16816 as_echo='print -r --'
16817 as_echo_n='print -rn --'
16818elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
16819 as_echo='printf %s\n'
16820 as_echo_n='printf %s'
16821else
16822 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16823 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16824 as_echo_n='/usr/ucb/echo -n'
16825 else
16826 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16827 as_echo_n_body='eval
16828 arg=$1;
16829 case $arg in #(
16830 *"$as_nl"*)
16831 expr "X$arg" : "X\\(.*\\)$as_nl";
16832 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16833 esac;
16834 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16835 '
16836 export as_echo_n_body
16837 as_echo_n='sh -c $as_echo_n_body as_echo'
16838 fi
16839 export as_echo_body
16840 as_echo='sh -c $as_echo_body as_echo'
16841fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016842
16843# The user is always right.
16844if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016845 PATH_SEPARATOR=:
16846 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
16847 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16848 PATH_SEPARATOR=';'
16849 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016850fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016852
16853# IFS
16854# We need space, tab and new line, in precisely that order. Quoting is
16855# there to prevent editors from complaining about space-tab.
16856# (If _AS_PATH_WALK were called with IFS unset, it would disable word
16857# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858IFS=" "" $as_nl"
16859
16860# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020016861as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000016862case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863 *[\\/]* ) as_myself=$0 ;;
16864 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000016865for as_dir in $PATH
16866do
16867 IFS=$as_save_IFS
16868 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000016869 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
16870 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016871IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000016872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016873 ;;
16874esac
16875# We did not find ourselves, most probably we were run as `sh COMMAND'
16876# in which case we are not to be found in the path.
16877if test "x$as_myself" = x; then
16878 as_myself=$0
16879fi
16880if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016881 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
16882 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883fi
16884
Matthias Kloseb9621712010-04-24 17:59:49 +000016885# Unset variables that we do not need and which cause bugs (e.g. in
16886# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
16887# suppresses any "Segmentation fault" message there. '((' could
16888# trigger a bug in pdksh 5.2.14.
16889for as_var in BASH_ENV ENV MAIL MAILPATH
16890do eval test x\${$as_var+set} = xset \
16891 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016892done
16893PS1='$ '
16894PS2='> '
16895PS4='+ '
16896
16897# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000016898LC_ALL=C
16899export LC_ALL
16900LANGUAGE=C
16901export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016902
Matthias Kloseb9621712010-04-24 17:59:49 +000016903# CDPATH.
16904(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16905
16906
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016907# as_fn_error STATUS ERROR [LINENO LOG_FD]
16908# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000016909# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16910# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016911# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000016912as_fn_error ()
16913{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016914 as_status=$1; test $as_status -eq 0 && as_status=1
16915 if test "$4"; then
16916 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16917 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000016918 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016919 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000016920 as_fn_exit $as_status
16921} # as_fn_error
16922
16923
16924# as_fn_set_status STATUS
16925# -----------------------
16926# Set $? to STATUS, without forking.
16927as_fn_set_status ()
16928{
16929 return $1
16930} # as_fn_set_status
16931
16932# as_fn_exit STATUS
16933# -----------------
16934# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16935as_fn_exit ()
16936{
16937 set +e
16938 as_fn_set_status $1
16939 exit $1
16940} # as_fn_exit
16941
16942# as_fn_unset VAR
16943# ---------------
16944# Portably unset VAR.
16945as_fn_unset ()
16946{
16947 { eval $1=; unset $1;}
16948}
16949as_unset=as_fn_unset
16950# as_fn_append VAR VALUE
16951# ----------------------
16952# Append the text in VALUE to the end of the definition contained in VAR. Take
16953# advantage of any shell optimizations that allow amortized linear growth over
16954# repeated appends, instead of the typical quadratic growth present in naive
16955# implementations.
16956if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16957 eval 'as_fn_append ()
16958 {
16959 eval $1+=\$2
16960 }'
16961else
16962 as_fn_append ()
16963 {
16964 eval $1=\$$1\$2
16965 }
16966fi # as_fn_append
16967
16968# as_fn_arith ARG...
16969# ------------------
16970# Perform arithmetic evaluation on the ARGs, and store the result in the
16971# global $as_val. Take advantage of shells that can avoid forks. The arguments
16972# must be portable across $(()) and expr.
16973if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16974 eval 'as_fn_arith ()
16975 {
16976 as_val=$(( $* ))
16977 }'
16978else
16979 as_fn_arith ()
16980 {
16981 as_val=`expr "$@" || test $? -eq 1`
16982 }
16983fi # as_fn_arith
16984
16985
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016986if expr a : '\(a\)' >/dev/null 2>&1 &&
16987 test "X`expr 00001 : '.*\(...\)'`" = X001; then
16988 as_expr=expr
16989else
16990 as_expr=false
16991fi
16992
16993if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
16994 as_basename=basename
16995else
16996 as_basename=false
16997fi
16998
Matthias Kloseb9621712010-04-24 17:59:49 +000016999if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17000 as_dirname=dirname
17001else
17002 as_dirname=false
17003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017005as_me=`$as_basename -- "$0" ||
17006$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17007 X"$0" : 'X\(//\)$' \| \
17008 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017009$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017010 sed '/^.*\/\([^/][^/]*\)\/*$/{
17011 s//\1/
17012 q
17013 }
17014 /^X\/\(\/\/\)$/{
17015 s//\1/
17016 q
17017 }
17018 /^X\/\(\/\).*/{
17019 s//\1/
17020 q
17021 }
17022 s/.*/./; q'`
17023
Matthias Kloseb9621712010-04-24 17:59:49 +000017024# Avoid depending upon Character Ranges.
17025as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17026as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17027as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17028as_cr_digits='0123456789'
17029as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017030
17031ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000017032case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017033-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017034 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000017036 xy) ECHO_C='\c';;
17037 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
17038 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017039 esac;;
17040*)
17041 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000017042esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017043
Martin v. Löwis11437992002-04-12 09:54:03 +000017044rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045if test -d conf$$.dir; then
17046 rm -f conf$$.dir/conf$$.file
17047else
17048 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000017049 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017051if (echo >conf$$.file) 2>/dev/null; then
17052 if ln -s conf$$.file conf$$ 2>/dev/null; then
17053 as_ln_s='ln -s'
17054 # ... but there are two gotchas:
17055 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17056 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017057 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000017058 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017059 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017060 elif ln conf$$.file conf$$ 2>/dev/null; then
17061 as_ln_s=ln
17062 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017063 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000017064 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017065else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017066 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000017067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17069rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000017070
Matthias Kloseb9621712010-04-24 17:59:49 +000017071
17072# as_fn_mkdir_p
17073# -------------
17074# Create "$as_dir" as a directory, including parents if necessary.
17075as_fn_mkdir_p ()
17076{
17077
17078 case $as_dir in #(
17079 -*) as_dir=./$as_dir;;
17080 esac
17081 test -d "$as_dir" || eval $as_mkdir_p || {
17082 as_dirs=
17083 while :; do
17084 case $as_dir in #(
17085 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17086 *) as_qdir=$as_dir;;
17087 esac
17088 as_dirs="'$as_qdir' $as_dirs"
17089 as_dir=`$as_dirname -- "$as_dir" ||
17090$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17091 X"$as_dir" : 'X\(//\)[^/]' \| \
17092 X"$as_dir" : 'X\(//\)$' \| \
17093 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17094$as_echo X"$as_dir" |
17095 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17096 s//\1/
17097 q
17098 }
17099 /^X\(\/\/\)[^/].*/{
17100 s//\1/
17101 q
17102 }
17103 /^X\(\/\/\)$/{
17104 s//\1/
17105 q
17106 }
17107 /^X\(\/\).*/{
17108 s//\1/
17109 q
17110 }
17111 s/.*/./; q'`
17112 test -d "$as_dir" && break
17113 done
17114 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017115 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000017116
17117
17118} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000017119if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017120 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000017121else
Skip Montanarof0d5f792004-08-15 14:08:23 +000017122 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000017123 as_mkdir_p=false
17124fi
17125
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017126
17127# as_fn_executable_p FILE
17128# -----------------------
17129# Test if FILE is an executable regular file.
17130as_fn_executable_p ()
17131{
17132 test -f "$1" && test -x "$1"
17133} # as_fn_executable_p
17134as_test_x='test -x'
17135as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017136
17137# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017138as_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 +000017139
17140# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000017141as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017142
17143
Martin v. Löwis11437992002-04-12 09:54:03 +000017144exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000017145## ----------------------------------- ##
17146## Main body of $CONFIG_STATUS script. ##
17147## ----------------------------------- ##
17148_ASEOF
17149test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017150
Matthias Kloseb9621712010-04-24 17:59:49 +000017151cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17152# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000017153# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017154# values after options handling.
17155ac_log="
Ned Deily4829bc62016-09-12 17:29:04 -040017156This file was extended by python $as_me 3.7, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017157generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000017158
17159 CONFIG_FILES = $CONFIG_FILES
17160 CONFIG_HEADERS = $CONFIG_HEADERS
17161 CONFIG_LINKS = $CONFIG_LINKS
17162 CONFIG_COMMANDS = $CONFIG_COMMANDS
17163 $ $0 $@
17164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017165on `(hostname || uname -n) 2>/dev/null | sed 1q`
17166"
17167
Martin v. Löwis11437992002-04-12 09:54:03 +000017168_ACEOF
17169
Matthias Kloseb9621712010-04-24 17:59:49 +000017170case $ac_config_files in *"
17171"*) set x $ac_config_files; shift; ac_config_files=$*;;
17172esac
17173
17174case $ac_config_headers in *"
17175"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
17176esac
17177
17178
17179cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017180# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010017181config_files="$ac_config_files"
17182config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017184_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017185
Matthias Kloseb9621712010-04-24 17:59:49 +000017186cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017187ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000017188\`$as_me' instantiates files and other configuration actions
17189from templates according to the current configuration. Unless the files
17190and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000017191
Matthias Kloseb9621712010-04-24 17:59:49 +000017192Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000017193
17194 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017195 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000017196 --config print configuration, then exit
17197 -q, --quiet, --silent
17198 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 -d, --debug don't remove temporary files
17200 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000017201 --file=FILE[:TEMPLATE]
17202 instantiate the configuration file FILE
17203 --header=FILE[:TEMPLATE]
17204 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000017205
17206Configuration files:
17207$config_files
17208
17209Configuration headers:
17210$config_headers
17211
Benjamin Petersonc2fcbf42016-08-03 22:01:32 -070017212Report bugs to <https://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017214_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017215cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17216ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000017217ac_cs_version="\\
Ned Deily4829bc62016-09-12 17:29:04 -040017218python config.status 3.7
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017219configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000017220 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000017221
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017222Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000017223This config.status script is free software; the Free Software Foundation
17224gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017225
17226ac_pwd='$ac_pwd'
17227srcdir='$srcdir'
17228INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010017229MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000017230test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000017231_ACEOF
17232
Matthias Kloseb9621712010-04-24 17:59:49 +000017233cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17234# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000017235ac_need_defaults=:
17236while test $# != 0
17237do
17238 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017239 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17241 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000017242 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000017243 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017244 --*=)
17245 ac_option=`expr "X$1" : 'X\([^=]*\)='`
17246 ac_optarg=
17247 ac_shift=:
17248 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017249 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017250 ac_option=$1
17251 ac_optarg=$2
17252 ac_shift=shift
17253 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017254 esac
17255
Skip Montanaro6dead952003-09-25 14:50:04 +000017256 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000017257 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000017258 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17259 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000017261 $as_echo "$ac_cs_version"; exit ;;
17262 --config | --confi | --conf | --con | --co | --c )
17263 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017264 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000017265 debug=: ;;
17266 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000017267 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017268 case $ac_optarg in
17269 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017270 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000017271 esac
17272 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017273 ac_need_defaults=false;;
17274 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000017275 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000017276 case $ac_optarg in
17277 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
17278 esac
17279 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000017280 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017281 --he | --h)
17282 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017283 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017284Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017285 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000017286 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000017287 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
17288 | -silent | --silent | --silen | --sile | --sil | --si | --s)
17289 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017290
17291 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017292 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000017293Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017294
Matthias Kloseb9621712010-04-24 17:59:49 +000017295 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017296 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017297
17298 esac
17299 shift
17300done
17301
Skip Montanaro6dead952003-09-25 14:50:04 +000017302ac_configure_extra_args=
17303
17304if $ac_cs_silent; then
17305 exec 6>/dev/null
17306 ac_configure_extra_args="$ac_configure_extra_args --silent"
17307fi
17308
17309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017310cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000017311if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000017312 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000017313 shift
17314 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
17315 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017316 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000017317 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000017318fi
17319
Martin v. Löwis11437992002-04-12 09:54:03 +000017320_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017321cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017322exec 5>>config.log
17323{
17324 echo
17325 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
17326## Running $as_me. ##
17327_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000017328 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017331_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017333_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017334
Matthias Kloseb9621712010-04-24 17:59:49 +000017335cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017336
17337# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000017338for ac_config_target in $ac_config_targets
17339do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017340 case $ac_config_target in
17341 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
17342 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
17343 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000017344 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
17345 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017346 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
17347 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000017348 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010017349 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017350 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017351
Victor Stinnere0be4232011-10-25 13:06:09 +020017352 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017353 esac
17354done
17355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017356
Martin v. Löwis11437992002-04-12 09:54:03 +000017357# If the user did not use the arguments to specify the items to instantiate,
17358# then the envvar interface is used. Set only those that are not.
17359# We use the long form for the default assignment because of an extremely
17360# bizarre bug on SunOS 4.1.3.
17361if $ac_need_defaults; then
17362 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17363 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17364fi
17365
Skip Montanaro6dead952003-09-25 14:50:04 +000017366# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017367# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000017368# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017369# Hook for its removal unless debugging.
17370# Note that there is a small window in which the directory will not be cleaned:
17371# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000017372$debug ||
17373{
Victor Stinnere0be4232011-10-25 13:06:09 +020017374 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017375 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020017376 : "${ac_tmp:=$tmp}"
17377 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000017379 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000017380}
Martin v. Löwis11437992002-04-12 09:54:03 +000017381# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000017382
Martin v. Löwis11437992002-04-12 09:54:03 +000017383{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017384 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017385 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000017386} ||
17387{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017388 tmp=./conf$$-$RANDOM
17389 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017390} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017391ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000017392
Matthias Kloseb9621712010-04-24 17:59:49 +000017393# Set up the scripts for CONFIG_FILES section.
17394# No need to generate them if there are no CONFIG_FILES.
17395# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017396if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017397
Matthias Kloseb9621712010-04-24 17:59:49 +000017398
17399ac_cr=`echo X | tr X '\015'`
17400# On cygwin, bash can eat \r inside `` if the user requested igncr.
17401# But we know of no other shell where ac_cr would be empty at this
17402# point, so we can use a bashism as a fallback.
17403if test "x$ac_cr" = x; then
17404 eval ac_cr=\$\'\\r\'
17405fi
17406ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
17407if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017408 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000017409else
17410 ac_cs_awk_cr=$ac_cr
17411fi
17412
Victor Stinnere0be4232011-10-25 13:06:09 +020017413echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000017414_ACEOF
17415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017416
Matthias Kloseb9621712010-04-24 17:59:49 +000017417{
17418 echo "cat >conf$$subs.awk <<_ACEOF" &&
17419 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
17420 echo "_ACEOF"
17421} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017422 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
17423ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017424ac_delim='%!_!# '
17425for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000017426 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017427 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017428
Matthias Kloseb9621712010-04-24 17:59:49 +000017429 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
17430 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017431 break
17432 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017433 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017434 else
17435 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000017436 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017437done
Matthias Kloseb9621712010-04-24 17:59:49 +000017438rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439
Matthias Kloseb9621712010-04-24 17:59:49 +000017440cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020017441cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017443sed -n '
17444h
17445s/^/S["/; s/!.*/"]=/
17446p
17447g
17448s/^[^!]*!//
17449:repl
17450t repl
17451s/'"$ac_delim"'$//
17452t delim
17453:nl
17454h
17455s/\(.\{148\}\)..*/\1/
17456t more1
17457s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17458p
17459n
17460b repl
17461:more1
17462s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17463p
17464g
17465s/.\{148\}//
17466t nl
17467:delim
17468h
17469s/\(.\{148\}\)..*/\1/
17470t more2
17471s/["\\]/\\&/g; s/^/"/; s/$/"/
17472p
17473b
17474:more2
17475s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17476p
17477g
17478s/.\{148\}//
17479t delim
17480' <conf$$subs.awk | sed '
17481/^[^""]/{
17482 N
17483 s/\n//
17484}
17485' >>$CONFIG_STATUS || ac_write_fail=1
17486rm -f conf$$subs.awk
17487cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17488_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020017489cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017490 for (key in S) S_is_set[key] = 1
17491 FS = ""
17492
17493}
17494{
17495 line = $ 0
17496 nfields = split(line, field, "@")
17497 substed = 0
17498 len = length(field[1])
17499 for (i = 2; i < nfields; i++) {
17500 key = field[i]
17501 keylen = length(key)
17502 if (S_is_set[key]) {
17503 value = S[key]
17504 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17505 len += length(value) + length(field[++i])
17506 substed = 1
17507 } else
17508 len += 1 + keylen
17509 }
17510
17511 print line
17512}
17513
17514_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017516cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17517if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17518 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17519else
17520 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020017521fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017522 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000017523_ACEOF
17524
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017525# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17526# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017527# trailing colons and then remove the whole line if VPATH becomes empty
17528# (actually we leave an empty line to preserve line numbers).
17529if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017530 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17531h
17532s///
17533s/^/:/
17534s/[ ]*$/:/
17535s/:\$(srcdir):/:/g
17536s/:\${srcdir}:/:/g
17537s/:@srcdir@:/:/g
17538s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017539s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017540x
17541s/\(=[ ]*\).*/\1/
17542G
17543s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544s/^[^=]*=[ ]*$//
17545}'
17546fi
17547
Matthias Kloseb9621712010-04-24 17:59:49 +000017548cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017549fi # test -n "$CONFIG_FILES"
17550
Matthias Kloseb9621712010-04-24 17:59:49 +000017551# Set up the scripts for CONFIG_HEADERS section.
17552# No need to generate them if there are no CONFIG_HEADERS.
17553# This happens for instance with `./config.status Makefile'.
17554if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020017555cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017556BEGIN {
17557_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017558
Matthias Kloseb9621712010-04-24 17:59:49 +000017559# Transform confdefs.h into an awk script `defines.awk', embedded as
17560# here-document in config.status, that substitutes the proper values into
17561# config.h.in to produce config.h.
17562
17563# Create a delimiter string that does not exist in confdefs.h, to ease
17564# handling of long lines.
17565ac_delim='%!_!# '
17566for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020017567 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
17568 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017569 break
17570 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017571 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017572 else
17573 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
17574 fi
17575done
17576
17577# For the awk script, D is an array of macro values keyed by name,
17578# likewise P contains macro parameters if any. Preserve backslash
17579# newline sequences.
17580
17581ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
17582sed -n '
17583s/.\{148\}/&'"$ac_delim"'/g
17584t rset
17585:rset
17586s/^[ ]*#[ ]*define[ ][ ]*/ /
17587t def
17588d
17589:def
17590s/\\$//
17591t bsnl
17592s/["\\]/\\&/g
17593s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17594D["\1"]=" \3"/p
17595s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
17596d
17597:bsnl
17598s/["\\]/\\&/g
17599s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17600D["\1"]=" \3\\\\\\n"\\/p
17601t cont
17602s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17603t cont
17604d
17605:cont
17606n
17607s/.\{148\}/&'"$ac_delim"'/g
17608t clear
17609:clear
17610s/\\$//
17611t bsnlc
17612s/["\\]/\\&/g; s/^/"/; s/$/"/p
17613d
17614:bsnlc
17615s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17616b cont
17617' <confdefs.h | sed '
17618s/'"$ac_delim"'/"\\\
17619"/g' >>$CONFIG_STATUS || ac_write_fail=1
17620
17621cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17622 for (key in D) D_is_set[key] = 1
17623 FS = ""
17624}
17625/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17626 line = \$ 0
17627 split(line, arg, " ")
17628 if (arg[1] == "#") {
17629 defundef = arg[2]
17630 mac1 = arg[3]
17631 } else {
17632 defundef = substr(arg[1], 2)
17633 mac1 = arg[2]
17634 }
17635 split(mac1, mac2, "(") #)
17636 macro = mac2[1]
17637 prefix = substr(line, 1, index(line, defundef) - 1)
17638 if (D_is_set[macro]) {
17639 # Preserve the white space surrounding the "#".
17640 print prefix "define", macro P[macro] D[macro]
17641 next
17642 } else {
17643 # Replace #undef with comments. This is necessary, for example,
17644 # in the case of _POSIX_SOURCE, which is predefined and required
17645 # on some systems where configure will not decide to define it.
17646 if (defundef == "undef") {
17647 print "/*", prefix defundef, macro, "*/"
17648 next
17649 }
17650 }
17651}
17652{ print }
17653_ACAWK
17654_ACEOF
17655cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017656 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017657fi # test -n "$CONFIG_HEADERS"
17658
17659
17660eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
17661shift
17662for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017663do
17664 case $ac_tag in
17665 :[FHLC]) ac_mode=$ac_tag; continue;;
17666 esac
17667 case $ac_mode$ac_tag in
17668 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020017669 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017670 :[FH]-) ac_tag=-:-;;
17671 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
17672 esac
17673 ac_save_IFS=$IFS
17674 IFS=:
17675 set x $ac_tag
17676 IFS=$ac_save_IFS
17677 shift
17678 ac_file=$1
17679 shift
17680
17681 case $ac_mode in
17682 :L) ac_source=$1;;
17683 :[FH])
17684 ac_file_inputs=
17685 for ac_f
17686 do
17687 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020017688 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017689 *) # Look for the file first in the build tree, then in the source tree
17690 # (if the path is not absolute). The absolute path cannot be DOS-style,
17691 # because $ac_f cannot contain `:'.
17692 test -f "$ac_f" ||
17693 case $ac_f in
17694 [\\/$]*) false;;
17695 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
17696 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020017697 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017698 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000017699 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17700 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017701 done
17702
17703 # Let's still pretend it is `configure' which instantiates (i.e., don't
17704 # use $as_me), people would be surprised to read:
17705 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000017706 configure_input='Generated from '`
17707 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17708 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709 if test x"$ac_file" != x-; then
17710 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000017711 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
17712$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017713 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000017714 # Neutralize special characters interpreted by sed in replacement strings.
17715 case $configure_input in #(
17716 *\&* | *\|* | *\\* )
17717 ac_sed_conf_input=`$as_echo "$configure_input" |
17718 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17719 *) ac_sed_conf_input=$configure_input;;
17720 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017721
17722 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020017723 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17724 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017725 esac
17726 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017727 esac
17728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017729 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000017730$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017731 X"$ac_file" : 'X\(//\)[^/]' \| \
17732 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017733 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000017734$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17736 s//\1/
17737 q
17738 }
17739 /^X\(\/\/\)[^/].*/{
17740 s//\1/
17741 q
17742 }
17743 /^X\(\/\/\)$/{
17744 s//\1/
17745 q
17746 }
17747 /^X\(\/\).*/{
17748 s//\1/
17749 q
17750 }
17751 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000017752 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000017753 ac_builddir=.
17754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017755case "$ac_dir" in
17756.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
17757*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017758 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000017760 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017761 case $ac_top_builddir_sub in
17762 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
17763 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
17764 esac ;;
17765esac
17766ac_abs_top_builddir=$ac_pwd
17767ac_abs_builddir=$ac_pwd$ac_dir_suffix
17768# for backward compatibility:
17769ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000017770
17771case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017772 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000017773 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017774 ac_top_srcdir=$ac_top_builddir_sub
17775 ac_abs_top_srcdir=$ac_pwd ;;
17776 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000017777 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017778 ac_top_srcdir=$srcdir
17779 ac_abs_top_srcdir=$srcdir ;;
17780 *) # Relative name.
17781 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
17782 ac_top_srcdir=$ac_top_build_prefix$srcdir
17783 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017784esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017785ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000017786
Martin v. Löwis11437992002-04-12 09:54:03 +000017787
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017788 case $ac_mode in
17789 :F)
17790 #
17791 # CONFIG_FILE
17792 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017793
17794 case $INSTALL in
17795 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017796 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017797 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010017798 ac_MKDIR_P=$MKDIR_P
17799 case $MKDIR_P in
17800 [\\/$]* | ?:[\\/]* ) ;;
17801 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
17802 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000017803_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017804
Matthias Kloseb9621712010-04-24 17:59:49 +000017805cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806# If the template does not know about datarootdir, expand it.
17807# FIXME: This hack should be removed a few years after 2.60.
17808ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000017809ac_sed_dataroot='
17810/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017811 p
17812 q
17813}
17814/@datadir@/p
17815/@docdir@/p
17816/@infodir@/p
17817/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000017818/@mandir@/p'
17819case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820*datarootdir*) ac_datarootdir_seen=yes;;
17821*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000017822 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
17823$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017825cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017826 ac_datarootdir_hack='
17827 s&@datadir@&$datadir&g
17828 s&@docdir@&$docdir&g
17829 s&@infodir@&$infodir&g
17830 s&@localedir@&$localedir&g
17831 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000017832 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017833esac
17834_ACEOF
17835
17836# Neutralize VPATH when `$srcdir' = `.'.
17837# Shell code in configure.ac might set extrasub.
17838# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000017839cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17840ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000017841$extrasub
17842_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000017843cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000017844:t
17845/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000017846s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000017848s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017849s&@srcdir@&$ac_srcdir&;t t
17850s&@abs_srcdir@&$ac_abs_srcdir&;t t
17851s&@top_srcdir@&$ac_top_srcdir&;t t
17852s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
17853s&@builddir@&$ac_builddir&;t t
17854s&@abs_builddir@&$ac_abs_builddir&;t t
17855s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
17856s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010017857s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017858$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000017859"
Victor Stinnere0be4232011-10-25 13:06:09 +020017860eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17861 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017863test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020017864 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
17865 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
17866 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000017867 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017868which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000017869$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017870which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000017871
Victor Stinnere0be4232011-10-25 13:06:09 +020017872 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000017873 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020017874 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
17875 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000017876 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017877 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017878 ;;
17879 :H)
17880 #
17881 # CONFIG_HEADER
17882 #
Martin v. Löwis11437992002-04-12 09:54:03 +000017883 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017884 {
17885 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017886 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
17887 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017888 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020017889 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000017890 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17891$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017892 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017893 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020017894 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017895 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017896 fi
17897 else
Matthias Kloseb9621712010-04-24 17:59:49 +000017898 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020017899 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017900 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000017901 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017902 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017904
17905 esac
17906
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000017907
17908 case $ac_file$ac_mode in
17909 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
17910
17911 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017912done # for ac_tag
17913
Guido van Rossum627b2d71993-12-24 10:39:16 +000017914
Matthias Kloseb9621712010-04-24 17:59:49 +000017915as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000017916_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000017917ac_clean_files=$ac_clean_files_save
17918
Matthias Kloseb9621712010-04-24 17:59:49 +000017919test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017920 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000017921
Martin v. Löwis11437992002-04-12 09:54:03 +000017922
17923# configure is writing to config.log, and then calls config.status.
17924# config.status does its own redirection, appending to config.log.
17925# Unfortunately, on DOS this fails, as config.log is still kept open
17926# by configure, so config.status won't be able to write to it; its
17927# output is simply discarded. So we exec the FD to /dev/null,
17928# effectively closing config.log, so it can be properly (re)opened and
17929# appended to by config.status. When coming back to configure, we
17930# need to make the FD available again.
17931if test "$no_create" != yes; then
17932 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017933 ac_config_status_args=
17934 test "$silent" = yes &&
17935 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000017936 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000017937 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000017938 exec 5>>config.log
17939 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17940 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020017941 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000017942fi
17943if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17944 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17945$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000017946fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000017947
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017948
Christian Heimes75ed8902013-11-20 01:11:18 +010017949echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017950if test ! -f Modules/Setup
17951then
17952 cp $srcdir/Modules/Setup.dist Modules/Setup
17953fi
17954
Christian Heimes75ed8902013-11-20 01:11:18 +010017955echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017956if test ! -f Modules/Setup.local
17957then
17958 echo "# Edit this file for local setup changes" >Modules/Setup.local
17959fi
17960
Christian Heimes75ed8902013-11-20 01:11:18 +010017961echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000017962$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
17963 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000017964 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000017965mv config.c Modules
Brett Cannon63d98bc2016-09-06 17:12:40 -070017966
17967if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
17968 echo "" >&6
17969 echo "" >&6
Christian Heimes938da642016-09-24 12:34:25 +020017970 echo "If you want a release build with all optimizations active (LTO, PGO, etc)," >&6
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)1016b2f2016-11-20 21:07:42 +000017971 echo "please run ./configure --enable-optimizations" >&6
Brett Cannon63d98bc2016-09-06 17:12:40 -070017972 echo "" >&6
17973 echo "" >&6
17974fi
17975